John Jenkins

10-09-2002, 01:00 PM

Using direction cosines, I know the difference in the X Y and Z angles of the two points in space. Here is a little background on what I am doing. I am drawing pipes. I draw a ring at the origin and then translate it to its correct position. To make it look correct I have to rotate the ring so that it lines up with the other rings infront and in back of it.

Like I said I have the angles from math.

Let's say the the angles are Z=42 X=68 and Y = 56 (got these from my math book). Well how should I rotate this?

Should I:

glrotate 42,0,0,1

glrotate 68,1,0,0

glrotate 56,0,1,0

I haven't tried it yet but my hunch is that it is not going to work. Is there any way to group these to rotations into one command that the computer can figure out for me?

Can I use one statement like this?

glrotate 68,1,.5,.8

.5 being approximately 42

.8 being approximately 56

Like I said I have the angles from math.

Let's say the the angles are Z=42 X=68 and Y = 56 (got these from my math book). Well how should I rotate this?

Should I:

glrotate 42,0,0,1

glrotate 68,1,0,0

glrotate 56,0,1,0

I haven't tried it yet but my hunch is that it is not going to work. Is there any way to group these to rotations into one command that the computer can figure out for me?

Can I use one statement like this?

glrotate 68,1,.5,.8

.5 being approximately 42

.8 being approximately 56