# How to get the necessary local yaw angles to produce a circle?

This is a geometry question

Say I want to generate the points (x,y) for a circle as you see in the figure

However the only way I can describe these points is through local yaw angles.(the green arrows)

The equations to generate (x,y) from yaw angles are:

$$\Delta_t$$ is a constant, and the only thing I can give is φ The rest are calculated.(of course the first point is known - the origin)

So my question is, what are the values of the local yaw φ angles in order to construct a circle?

EDIT： Made a mistake using phi small and capital in the equation. I will rewrite it with the first one being theta

The equation is more understandable as

$$\theta_{n+1}=\sum\phi_t\Delta t_n$$

and the only thing I can specify is $$\phi_t$$

• If both $v_n$ and $\phi_n$ are constant (i.e., do not depend on $n$), and $\Delta t$ is small you will get a reasonable approximation of a circle. Ratio $v_n/\phi_n$ will define the circle's radius. Jan 13 at 16:03
• so the radius is vn/ϕn ? Jan 13 at 16:05
• Not sure what is $\theta$, but yes, $v/\phi$ will approximate the radius. The smaller is your $\Delta t$ the closer $v/\phi$ will be to the radius. Jan 13 at 16:12
• Sorry I made a mistake writing the greek letters. The one that I can specify is the small phi , because the capital phi is calculated. In your comment $\phi$ is φ？ Jan 13 at 16:15
• @blamocur I clarified the equation. Could you take a look? Jan 13 at 16:23

Let $$R$$ be the required radius, and let's assume that the motion is around the origin (0,0) and that it starts from point $$(0,R)$$.
At time $$n$$ we are at point $$x_n, y_n$$, and (if we our algorithm is correct) we have $$x_n^2 + y_n^2 = R^2$$.
Our goal is to find $$\phi_n$$ such that $$x_{n+1}, y_{n+1}$$ stays on the circle, i.e., $$x_{n+1}^2 + y_{n+1}^2 = R^2$$. By plugging this into the formula from the original post we get $$\left(v_n^2 \Delta t_n^2 \cos^2\phi_n + 2v_n \Delta t_n \cos \phi_n x_n + x_n^2 \right) +$$ $$+\left(v_n^2 \Delta t_n^2 \sin^2\phi_n + 2v_n \Delta t_n \sin \phi_n y_n + y_n^2 \right) = R^2 \;\;\;\Longrightarrow$$ $$v_n^2 \Delta t_n^2 + 2v_n\Delta t_n \left(x_n\cos\phi_n + y_n\sin\phi_n \right) = 0 \;\;\;\Longrightarrow$$ $$x_n\cos\phi_n + y_n\sin\phi_n = -\frac{v_n\Delta t_n}{2}$$ Since $$x_n = R\cos\theta_n$$ and $$y_n = R\sin\theta_n$$ we get $$x_n\cos\phi_n + y_n\sin\phi_n = R \cos\left(\theta_n-\phi_n \right) \;\;\;\Longrightarrow$$ $$\cos\left(\theta_n - \phi_n \right) = -\frac{v_n\Delta t_n}{2R} \;\;\;\Longrightarrow$$$$\phi_n = \theta_n - \arccos\frac{v_n\Delta t_n}{2R}$$