> Thanks for the algorithm. By any chance, can you point me to a relevant ressalate 
> implementation? So far, the research I made on the subject led me to 
> ideas about multiplying polygons, not splitting them into triangles. Do you know of 
> any grafic library for the Palm that would already implement these 
> algorithms?

You don't really need a tesselation algorithm for 4 point convex polygons since any 
polygon that has points A,B,C and D can be logically split into the two triangles A, 
B, C and A, C, D. If you have to do more complex shapes, the two main methods used in 
2D and 3D vector graphics are Triangle Strips, and Triangle Fans and you should be 
able to derive algorithms for producing strips and fans for polygons or 3D ribbons 
with more than 4 points.

It's also possible to modify that triangle algorithm for N-Point polygons, you have to 
find the top point in a list of PolyPoints and draw line spans between those edges 
that go round clockwise, and those that go round anti-clockwise. I should have a 
similar algorithm on some PC proggy kicking about - I'll post it if I can find it.

Note that it's very interesting to know how to split Quadrilateral polygons into 
triangles because when you clip a triangle against the edge of a window or the screen, 
you get a quadrilateral polygon - which means you only have to know how to clip 
triangles :)


--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to