#### Archived

This topic is now archived and is closed to further replies.

# cone surface triangulation

This topic is 5295 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

hi all Give me some hints, how to triangulate cone surface. Im also interested in how to find cylinder, torus triangulation. Maybe is a generic algorithm. lekki

##### Share on other sites
My choice:
Use coordinates that fit to your geometry: (height, angle) for cylinders and cones, (angle1, angle2) for tori. Dividing the surface into quads or triangles becomes quite easy, then (quad ((h,a), (h+dh,a), (h+dh, a+da), (h, a+da)) for cylinders, for example).

##### Share on other sites
the generic solution:

find a good parametric representation of your surface, most probably in 2 coordinates since its a surface, and then just create an equally spaced grid of quads, mapping its position to 3d using your parametric representation.

so for example a sphere:

parametric representation in u and v:
x=cos(u)*cos(v)*r
y=sin(u)*cos(v)*r
z=sin(v)*r

loop through domain of u with given stepsize
loop through domain of v with given stepsize
create vertex at (x(u,v),y(u,v),z(u,v))
connect the vertices with triangles.

##### Share on other sites
For spheres there is also another option that works with subdividing a tetrahedron. I´ve written a post here not too long ago about that and if I remember correctly oliii even had some example sourcecode demonstrating that method (though he didn´t start with a tetrahedron but that´s not the important point for the method).

EDIT: You can also apply the subdivision to other geometries like cylinders which should be quite straightforward.

[edited by - Atheist on May 18, 2004 5:57:49 PM]

##### Share on other sites
"For spheres there is also another option that works with subdividing a tetrahedron. I´ve written a post here not too long ago about that and if I remember correctly oliii even had some example sourcecode demonstrating that method (though he didn´t start with a tetrahedron but that´s not the important point for the method)."

This is the method I use for general ellipsoids. I start with a regular unit octohedron, and then recursively subdivide each face into four new faces. Normalizing all the vertices then transforms it into a unit sphere, and multiplying them by the radius vector transforms it into an ellipse of the proper size.

Another way to triangulate a cone would be to create an orthonormal basis from the origin and the direction vector. Then iterate from 0 to 2pi in some increment and multiply the sin and cos times the local x and y axes to get your circle points. Your other point is simply the origin plus the direction vector. Triangulation is then straightforward.

1. 1
Rutin
38
2. 2
3. 3
4. 4
5. 5

• 12
• 16
• 12
• 14
• 9
• ### Forum Statistics

• Total Topics
633357
• Total Posts
3011503
• ### Who's Online (See full list)

There are no registered users currently online

×