Has anyone implemented in VB the Weiler algorithm for polygon clipping by another polygon (not necessarily a rectangle!)?
Printable View
Has anyone implemented in VB the Weiler algorithm for polygon clipping by another polygon (not necessarily a rectangle!)?
Actually I'm not familiar with Weiler algorithm. But I'm working with one of my project in C++, I found this project. I use this to find some polygon clipping are. You may useful it, just go and see.
http://www.codeguru.com/Cpp/misc/mis...cle.php/c8965/
Unfortunately the Weiler algorithm is only mentioned but not described. Instead, the Sutherland-Hodgman a. is described in more detail and implemented in C but it's good only for clipping by a rectangle.Quote:
Originally Posted by eranga262154
In the meantime I've found in a library a book chapter with various such algorithms (including the W. alg.) and I have photocopied the interesting pages. They look a bit scary at first glance but I hope I can get to understand and eventually translate them to VB.
Thanks for your reply anyway.
It's ok pal. That's the only thing I know about clipping.
I've found Weiler's paper:
http://www.cs.drexel.edu/~david/Clas...214-weiler.pdf
and loads of information about the actual implementation. I guess I'm all set.
It's explain the clipping algorithm nicely. Thanks krtxmrtz...
If you're interested in polygon clipping, these are other algorithms you can Google for:
Sutherland-Hodgman
Liang-Barsky
Maillot
Vatti
Greiner-Hormann
To be sure, they have advantages and drawbacks, for example not all of them can handle concave or self-intersecting polygons.
Thanks pal,
Actually I've used Weiler algorithm, concept of it, on one of my application. That's why I'm looking it.:)
It's been a while since the last post here, but in case you're still interested, here's a very nice paper by 2 Korean guys:Quote:
Originally Posted by eranga262154
http://www.cadanda.com/CAD_A_3_1-4_48.PDF
Also I've found a dll that has all the work alrerady done. It's written in C but if you want to use it with VB you can download the COM wrapper. I've tested it and works very nicely. Go to http://www.cs.man.ac.uk/~toby/alan/software/
Thanks pal.
Yes it's a long time. I'm back to forum. :)
Thanks for all informations too.