Can someone help me compute the points needed to draw a tunnel?? I figured out that a tunnel is actually just a long cylinder, and that cylinder can be composed of n circles. So if I have a tunnel stretching from point 0,0,z1 to point 0,0,z2 all I do is compute the points of the circle lying around point 0,0,z1 and point 0,0,z2 (points are computed in the XY plane) and connect the points to create tons of triangles.
But if the points lies at x1,y1,z1 and x2,y2,z2 I have to take the direction of vector [x2-x1, y2-y1, z2-z1] into account when computing the points (because the tunnel should be centered around that vector) and I can''t figure out how to do that.
In short, what I want is to compute the points of a circle and the orientation of that circle should be based on a direction vector so that the direction vector is perpendicular to the circle.
If someone can point me to a good tutorial on the subject that''d be cool!

Thanks in advance!
Real programmers don''t document, if it was hard to write it should be hard to understand