
January 4th, 2006, 11:15 AM
|
 |
fifo
|
|
Join Date: Oct 2003
Location: Canvas3D()
|
|
|
Joining 2 points in 3d space
I have 2 points in 3d space (P1 = x1, y1, z1) (P2 = x2, y2, z2) that im trying to join up by a long thin cylinder.
When I create my cylinder, the centre point of the cylinder lies down the Y axis. For simplicity we can think of the cylinder as a line with x = 0, z = 0 and y ranges from say 3 to -3.
As far as i can see, in order to join up my points, i need to rotate twice (once about z and once about x) and translate my line.
I can calculate my translation but I can't seem to work out an algorithm to deal with the rotations.
Any pointers would be greatly appreciated.
Many Thanks
__________________
Never trust a man who, when left alone in a room with a tea cosy, doesn't try it on. - Billy Connolly
|