# Help with 3d trig and moving object

1. Jan 9, 2010

### free-node-5

first off, sorry if this isn't the correct section for this question
maybe if it's not, someone could move it to a better place
It's not for any class but someone told me that it was similar to mechanics

I have an object in 3d space, say a cone for example, with the tip pointing up (positive Z direction)
The plane on which it rests is the x,y plane

It can have rotations of the form (x,y,z) in radians

To begin, a specific direction is chosen as a Z angle, and the object is to move in the path of an arc through a 2d path, but in the direction of the Z angle

I managed to come up with and test some equations for moving the object along it's path, but I need some equations to make it point (rotation) in the direction that it is moving on the arc

(up at the beginning, sideways in the middle, and down at the end)

The movement is controlled by using an independent variable 't' as the radians traveled on the arc

Here are the equations I'm using for the motion:
xComponent = Cos(theta)
yComponent = Sin(theta)

x = radius * xComponent * Cos( t )
y = radius * yComponent * llCos( t )
z = radius * Sin( t )

Can anyone help me figure out the equations for the rotations?
Any help would be greatly appreciated
Thanks