
Phantom wrote: >>Ronny Westereng wrote: >>>> Hello, my question is this: >>>> After a polygon has been clipped, if one have let's say, a worst >>>> case scenario of 8 edges in the clipped poly. Would it be better >>>> to use some triangulation algorithm to split the poly up and then >>>> use a triangel edge scanner, or would it be better to just scan >>>> each edge one by one and then fill??? I am thinking in respect to >>>> easely implement texture mapping, wich I beleive is easiest done >>>> on triangles. >> >>Check out my polygon filling document on the portal column page. >>Filling convex polygons with more than three edges is not harder to >>do than triangles. For triangles, there are some special cases, but >>it wouldn't be efficient to first triangulate on the fly, and then >>draw slightly faster using a triangle filler. Filling triangles is >>certainly not easier, by the way, just slightly faster. >>Hardware accelerators on the other hand REQUIRE triangles. If you >>pass Glide a rectangle, for example, it will do delaunay triangulation >>itself, and that takes time of course. So in that case, you might >>want to do it yourself. >> >>>> Another thing, I have had a look at Delunay triangulation, but >>>> the texts I have been reading just don't explain the theory clear >>>> enough for me, could eventually someone point me to an easy to grasp >>>> info file on this?? >> >>I'm not an expert on this topic, so I'll leave this to someone else... >>If noone comes up with an answer, let me know. >> Well, I have a triangle algo that is very quick, and I often use tessalation, and I also often use shadow geometry. So, I will tell you the method I find easiest, which is this. In a convex shape you take point one, point two and point three and make your first triangle. Call these a, b and c. Then increment b and c so you have point 3 as b and c as point 4, and draw another. This seems to give good results for me, very quickly.
Conor Stokes
