Find a point on a circle given a point and height

895 Views Asked by At

Point on a circle

enter image description here

Given : A point on a circle (point and angle), radius of the circle , height (Orthogonal to horizon ) I would like to find A point on a circle or , and The angle between the given point (x,y) and the new point (?,?)

Thanks !

2

There are 2 best solutions below

0
On BEST ANSWER

This is just a wild guess, given that that intermediary point is just $(x, y-h)$.

Given $\alpha$ and $r$, calculate $(x,y) = (r \cos(\alpha), r\sin(\alpha))$ (plus an offest $\vec{p_0}$ if the circle is not at $(0,0)$.

Then, subtract $h$ from the y-coordinate, which should give you the point $(x,y') = (x, y-h)$:

enter image description here

If the new $y'$ coordinate is fixed then calculate the correct $x'$ coordinate by solving the circle equation in cartesian coordinates $$x'^2 + y'^2 = r^2$$ with $y', r$ fixed and take the $x'$ that has the same sign as $x$. You will receive $(?,?)$ = $(x',y')$.

If you have the new point you can calculate the angle between the points $(x,y)$ and $(x', y')$ as

$$\alpha' = \text{atan2}\left(y'-y, x'-x\right)$$

0
On

Your angle $\alpha$ determines your point $(x,y)=(r\sin \alpha,r\cos \alpha)$ and immediately you obtain $$(?,?)=(r\sin \alpha,r\cos \alpha-h)$$