PDA

View Full Version : extrusion



giuseppe500
08-11-2013, 05:36 AM
hello.
I have some 2d shapes that I would like to extrude for a depth, and the result must be a 3d solid.
The 2d shape is a bidimensional set of 2d vertexes.
How i can create the 3d vertexes , the triangles and indexes of the triangles ?
I would use only opengl and c++ math code nor glut or glew ecc....
Thanks.

def
08-11-2013, 06:22 AM
Extrusion is the easy part obviously. But OpenGL does not help you filling in the front face. Although GLUT offers some functions to tesselate, you will need to do that on your own.

sevenfold
08-11-2013, 01:30 PM
hello.
I have some 2d shapes that I would like to extrude for a depth, and the result must be a 3d solid.
The 2d shape is a bidimensional set of 2d vertexes.
How i can create the 3d vertexes , the triangles and indexes of the triangles ?
I would use only opengl and c++ math code nor glut or glew ecc....
Thanks.

It's very easy. Just make a copy of the 2D shape and connect the edges between them. Every edge pair will form a quad, or two triangles if you want.
You don't need OpenGL to do this either.

GClements
08-11-2013, 06:04 PM
There's also the GLE Tubing and Extrusion Library (http://linas.org/gle/), which supports extrusion along arbitrary paths.