|
-
Nov 25th, 2007, 02:51 PM
#1
Polygon clipping
Has anyone implemented in VB the Weiler algorithm for polygon clipping by another polygon (not necessarily a rectangle!)?
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
-
Nov 26th, 2007, 01:32 AM
#2
PowerPoster
Re: Polygon clipping
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/
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
-
Nov 26th, 2007, 04:32 AM
#3
Re: Polygon clipping
 Originally Posted by eranga262154
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.
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.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
-
Nov 26th, 2007, 06:50 AM
#4
PowerPoster
Re: Polygon clipping
It's ok pal. That's the only thing I know about clipping.
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
-
Nov 27th, 2007, 05:46 PM
#5
Re: Polygon 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.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
-
Nov 27th, 2007, 11:01 PM
#6
PowerPoster
Re: Polygon clipping
It's explain the clipping algorithm nicely. Thanks krtxmrtz...
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
-
Nov 28th, 2007, 05:17 AM
#7
Re: Polygon clipping
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.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
-
Nov 28th, 2007, 05:23 AM
#8
PowerPoster
Re: Polygon clipping
Thanks pal,
Actually I've used Weiler algorithm, concept of it, on one of my application. That's why I'm looking it.
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
-
Jun 3rd, 2008, 10:57 AM
#9
Re: Polygon clipping
 Originally Posted by eranga262154
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:
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/
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
-
Jun 3rd, 2008, 10:46 PM
#10
PowerPoster
Re: Polygon clipping
Thanks pal.
Yes it's a long time. I'm back to forum. 
Thanks for all informations too.
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|