View Full Version : Joining quad cylinders 09-10-2003, 06:14 AM
If you have two cylinders meeting at angles from 0-179 degrees,
is there a neat way of drawing the bend? I notice the Windows 3D
Pipes screensaver has nice 90deg bends, but I presume they are a
precalculated standard shape. 09-10-2003, 07:35 AM Yes, the
pipes are precalculated. Assuming 180 means the resulting pipe
should not degenerate to a single one (but look like a shotgun
in the end), you'll need to extrude the cut section (a circle)
of the pipe along an arc which length is calculated from the
angle and the radius depends on the radius of the pipe or the
effect you want to achieve. One not so nice looking way is to do
skinning (formerly called vertex weighting in an extension). In
your case it needs two matrices representing two orientations,
each vertex is transformed by both matrices and a weight per
vertex running from 0.0 to 1.0 blends the two results to the
final vertex postion. This method can result in some ugly
folding. Search for ve