re optimizing projections in article sua tinnqs no names nerdc ufl edu lioness ufcc ufl edu writes my three d library does a lot of projections duh but currently it is projecting an object s vertices on a per triangle basis this is grossly inefficient for of the objects displayed which can be optimized by doing projections one time once for each vertex but objects whose z extents intersect the hither plane can t benefit from this because new vertices must be created during z clipping anyone have any better ideas yes here s what you should do keep the vertices in an array and have the polygons triangles are okay but n sided polygons are slightly more efficient store the indices into the array of the vertices that comprise them you set a flag for each vertex when you transform it so you don t have to transform any vertex more than once you also do backface elimination before processing the polygon so that vertices that belong only to bacfacing polys don t have to be transformed at all whenever you transform a vertex check if it s on the far side of the hither plane if it is you can project it right away and store the result then do your z clip any vertices that get produced will have to have their projection done at that stage bernie roehl university of waterloo dept of electrical and computer engineering mail broehl sunee uwaterloo ca voice x work
