PDA

View Full Version : cylinder help



brett01
10-13-2008, 05:14 PM
http://img227.imageshack.us/img227/5980/cylro5.th.jpg (http://img227.imageshack.us/my.php?image=cylro5.jpg)http://img227.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)

Hi i want to create a cylinder with triangles on the top how to do it??can someone help me please.I also want to know how to define normals for a cylinder made of quads.

trinitrotoluene
10-14-2008, 07:56 AM
To make a cap at the top of the cylinder, use triangle fan. Create a vertex on the axis of your cylinder and make a triangle fan with your topmost vertices. For normals, view a cylinder as a stack of circles. So the normals point outside the circle and have the same orientation as a vector that start from it center to a vertex on the circonference. The type of primitives (triangle strip or quad trip) should not have influence.