Hi...

Here are the transformation equations:

in these equations, x,y,z represent the points of the solid you want to rotate

To rotate around the X axis

newX=x

newY=ycosA-zsinA

newZ=ysinA+zcosA

To rotate around the Y axis

newX=xcosA-zsinA

newY=y

newZ=xsinA+zcosA

To rotate around the Z axis

newX=xcosA-ysinA

newY=xsinA+ycosA

newZ=z

assuming the screen axes are X and Y and the depth is Z,

you plot newX and newY

note that you can combine these equations into one for multiple rotations

(if you need those, let me know)

good luck

George

Quote:

> Hello all,

> I am trying to work on rotating a 3 dimentional cube in qbasic and have come

> across a little problem. I'm able to rotate it in two dimentions, but am

> stuck on the third. I know Sine and Cosine have a lot to do with the

> relationship between x and z, and y and z but am still stuck on the

> coverstion from a 3d to a 2d plane. I have seen various graphics routines

> on the net and have looked them over with little luck of EXPLANATION. If

> there is anyone who has a little insight in to this problem of mine, it

> would be much appreciated if you could share it with me

> Thanks to all,

> - Chris Mullens