views:

233

answers:

2

I have as input an array of 3D points. And I need to draw a pipe that connects those points with each other so the first point is connected to the second one, the second to the third, ... The pipe has a square-shape (not a cilinder, but more a cuboid-shape like this figure) with a width of d. And the difference between two points goes always in just one direction (so when deltaX != 0 that means deltaY == 0 and deltaZ == 0).

What are the OpenGL commands to draw this model?

A: 

OpenGL has no high-level primitives such as square-shaped pipes. If you manage to decompose your pipe into triangles, you can find all the commands you need in the tutorials on opengl.org.

Malte Clasen
+1  A: 

Give the GLE Tubing and Extrusion Library a try.

genpfault