Rotate around point whilst maintaining forward facing direction

438 Views Asked by At

I have a stationary point, the origin (O) at (0, 0, 0) and a moving Point (P) that I wish to have rotating around O with a fixed radius (d). However, rather than just rotating around I always want to ensure that point P is facing in the direction of travel.

Imagine tying a rope to yourself, and the other end to a pole in your garden. If you were to run you would be running in a circle around the pole, but would be facing in your (every changing) direction of travel.

Can anyone advise me either of the algorithms required, or at least some better search terms, since "Rotate Around a Point" doesn't provide what I'm looking for.

Visual Example of above

2

There are 2 best solutions below

1
On

It is not easy to imagine a point "facing in the direction of travel": I suppose your $P$ is rather some sort of extended object. If so, you just need to rotate $P$ around itself of the same angle $P$ rotates around $O$, and in the same direction, supposing of course that $P$ starts in the right position.

0
On

A parametric equation of the path is $(d\cos(\alpha),0,d\sin(\alpha) ); \,\, 0\le\alpha<2\pi$. Still, a point does not have a direction, so you need to apply a vector. This vector will have to be parallel to the tangent to the circle. For example the short vector $$\varepsilon(-\sin(\alpha),0,\cos(\alpha))$$ points in the direction of the movement if $\alpha$ moves from $0$ to $2\pi$ ($\varepsilon>0).$