0

I've been trying to create a formula that finds the angle with respect to the x-axis to a point from some origin point. This new point must create lines to both the origin point and to some other point that must be perpendicular.

Diagram to show what I'm talking about

You can see that the new point should lie on the circle defined by some radius r in the formula, and that the line from origin to new point is perpendicular to the line from new point to other point.

I understand that there will be two unique solutions and what I'm looking for is a formula that finds any unique solution. Thanks for reading and helping :)

  • Your formula finds the angle to a point from some origin point? There cannot be an angle between two points. Perhaps you mean the angle with respect to the $x-$axis? – aqualubix Jan 31 '23 at 02:32
  • Your question is not very clear, but if I'm understanding it correctly there is no formula as there will be an infinite number of points that satisfy the desired condition. Let O be the origin, and let A be the 'other point'; consider the circle that has OA as a diameter. Then if you take any other point B on the circle as the 'new point', the lines OB and AB will be perpendicular. – A.J. Jan 31 '23 at 03:56
  • @A.J. A constraint for my problem is that the point must be within a radius of the origin. Say that the radius is a variable in the formula. But interesting idea with the circle too. – Sauss Velauss Jan 31 '23 at 04:35
  • @aqualubix Yes, that is correct I've edited the question now to be an angle with respect to the x-axis. – Sauss Velauss Jan 31 '23 at 04:36

1 Answers1

1

enter image description here

In the diagram above, $\theta_1$ and $\theta_2$ are the angles from $B$ and $B'$ respectively, to the x-axis. Let $d$ be the distance from $O$ to $A$, i.e. $d = \sqrt{p^2+q^2}$; and let $\alpha$ be the angle between $OA$ and the x-axis, so clearly $\alpha = \tan^{-1} \left(\frac{q}{p}\right)$.

Then $$\begin{align} \theta_1 &= \angle AOB + \alpha \\ &= \cos^{-1} \left( \frac{r}{d} \right) + \tan^{-1} \left( \frac{q}{p} \right) \\ &= \cos^{-1} \left( \frac{r}{\sqrt{p^2+q^2}} \right) + \tan^{-1} \left( \frac{q}{p} \right) \\ \end{align}$$

Similarly, $$\begin{align} \theta_2 &= \angle AOB' - \alpha \\ &= \cos^{-1} \left( \frac{r}{d} \right) - \tan^{-1} \left( \frac{q}{p} \right) \\ &= \cos^{-1} \left( \frac{r}{\sqrt{p^2+q^2}} \right) - \tan^{-1} \left( \frac{q}{p} \right) \\ \end{align}$$

A.J.
  • 3,892
  • Thank you @A.J. this is a great solution. Previously I had tried to solve the equation where the gradient of OB was equal to the inverse gradient of AB (where the point B was defined in terms of theta). However, this is much more simple and elegant. Thank you <3 – Sauss Velauss Jan 31 '23 at 22:59