Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have a start point, {x,y,z} a distance, d and three angles, rotation about the x axis, rotation about the y axis and rotation about the z axis. Each angle is clockwise.

How do I calculate the point in 3D space arrived at by "walking forwards" for d distance while at these three angles.

I know how to do this in 2D by using x = startX + cos(angleX)*d etc. but don't know how to do it in 3D (presumably you only need two of the angles, but what calculations find the resulting x, y and z coordinates?).

I realise this has probably been asked a lot of times. I tried searching for it but found nothing although I'm probably using the wrong terms.

Thanks in advance

share|improve this question

1 Answer 1

up vote 1 down vote accepted

If you really want rotations around all three axes, you can just mutiply the column vector $(d,0,0)^T$ by the matrices given under Rotation in three dimensions, but change the sign of $\theta$ as your rotation is clockwise. The order matters: you want (z matrix)(y matrix)(x matrix)(d,0,0)^T + start point. Note that in the 2D case you only have one angle, which is normally measured counterclockwise from the x axis, so you can express yours as just two angles.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.