0
$\begingroup$

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

1 Answers 1

1

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.