   3D Tube or Pipe Forumula?
  Hi,can someone tell me the formula for creating 3D tubes? (For example, to simulate a snake)I´ve tried to figure it out on paper, but i´m not sure how to put it into practive...Would be glad if you could give me some hints or a link to a website!Thanks gammastrahler   
  Your question is a little bit vague. What is the goal?I know there exist implicit formulations using an extrusion along a spline path. Perhaps for your app a facetted tube will be sufficient, so that an explicit mesh could be generated by "discrete" extrusion (i.e. going stepwise along a path and generate profiles that are to be connected to build up sections). If you choose a continuous curve as path, you may investigate curvature to get better looking results. If you have a piecewise linear path, well, then simply concatenate cones, possibly with spheres in-between to get closed joints.   ;  haegarr basically covered it, but I thought I'd mention that this was actually covered in some detail in the last couple of months. *goes to look for thread* ...Well, I'm not sure where the thread is, so that may be of no help to you. Anyway, the basic idea is to move a coordinate frame along a curve at regular intervals and create a 'circle of vertices' using the coordinate system at each point. These vertices can then be easily triangulated into a tube.There are some details that have to managed though. What sort of curve you use is actually sort of secondary to the problem; all it really needs to provide is a position (evaluation) and tangent (first derivative) function. There's also the issue of parameterization; using arc length would give you slightly more even spacing at the expense of considerable code complexity, while using the parametric value directly would be much easier and would probably give perfectly adequate results.The trickiest part is probably finding suitable frames along the curve. The Frenet frame may not be adequate, depending on the shape of the curve; a fixed-reference frame might work if the direction of the curve doesn't vary too widely; and a parallel transport frame might be the overall best choice. There's actually an article on curve frames that's very interesting, but I'm too lazy to go looking for it now. You might try googling for it though.   ;  To the OP, The books Graphics Gems 1 and Game Programming Gems 2 both have two articles for exactly what you need   