Given two normals on the circumference of a circle, find the change in height between the two.

119 Views Asked by At

I am provided with two unit normals which lie on the circumference of a circle. I am not provided with the points on the circumference that these normals stem from. I do know that the distance between these two points along the $x$ axis is 1. I am supposed to use the fact that a unique unit normal corresponds to a unique point on the surface of a circle (the normal points directly out from the center). I have been able to make some progress using a diagram of the problem:

Diagram of the problem

Where $q$ is the value I want to calculate. From this my workings are:

$$\theta = \arccos(\frac{n_1 \cdot n_2}{\|n_1\|\|n_2\|}),\quad \gamma = \frac{(\pi - \theta)}{2},$$ $$\delta = \arctan(\frac{n_1.y}{n_1.x}),\quad \alpha = \gamma - \delta,\quad \beta = \frac{\pi}{2} - \alpha,$$ $$q = \frac{\sin(\alpha)}{\sin(\beta)}$$

A couple of simplifications can be made: $\arccos(\frac{n_1 \cdot n_2}{\|n_1\|\|n_2\|})$ is simply $\arccos(n_1 \cdot n_2)$, as both normals have magnitude 1. We can also say that $q = \frac{\sin(\alpha)}{\sin(\beta)}$ is really $q = \tan(\alpha)$, as $\sin(90-\alpha) = \cos(\alpha)$.

I'm only getting the correct results for the first quadrant of the circle. I'm not sure how to correct the method to give the correct value of $q$ for any two normals. I believe the problem is that I sometimes require the obtuse angle between the normals, but I am always getting the acute angle? For reference I am programming this problem, maybe I can use the atan2 function?

A second query is, do I actually need to use any trigonometric functions here? I think I can avoid the call to arctan when calculating $\delta$:

$$\tan(\alpha) = \tan(\gamma - \delta)\\ = \frac{\tan(\gamma)-\tan(\delta)}{1-\tan(\gamma)\tan(\delta)} $$ Where $\delta=\arctan(\frac{n_1.y}{n_1.x})$ so can I just avoid the $\arctan$?

Any tips would be great, thank you.

1

There are 1 best solutions below

3
On BEST ANSWER

Let $e^1=(1,0)$ and $e^2=(0,1)$ be the standard orts and $n=n_1-n_2$. Then $1=r |n\cdot e^1|$ and $q=r n\cdot e^2$, so $q=\frac {n\cdot e^2}{|n\cdot e^1|}$.