0
$\begingroup$

I have 2 lines in a 2D XY plane (plane 1) that are 135° apart and meet at a point. If I create a new XY plane (plane 2) equal to plane 1 but which is rotated on the X axis by x° (e.g. 30°), I want to know the formula to calculate the angle between the 2 lines on plane 1 if they are projected onto plane 2. I expect the angle will be less on plane 2 than the angle on plane 1.

An image conveys 1000 words:

enter image description here

This is modelled in Fusion 360, and if I rotate Object B around the x axis by 30°, then the angle becomes 130.9° instead of 135°. I want to know the formula for calculating this?

$\endgroup$

3 Answers 3

3
$\begingroup$

Let the origin be at the intersection of the $3$ planes.

I follow the $xyz$-orientations of the first diagram: upward as positive $x$, leftward as positive $y$, and out from screen as positive $z$.

Along the plane of object $A$, points have positive $x$- and $z$-coordinates that satisfy:

$$(x ,y ,x\tan(180^\circ-135^\circ)) = (x, y, x)$$

Along the plane of the new object $B$ that is rotated away from the $xz$-plane, points have positive $y$- and $z$-coordinates that satisfy: $$(x, z\tan30^\circ, z) = \left(x, \frac{z}{\sqrt3}, z\right)$$

Combining the two conditions, points along the intersection ray of objects $A$ and $B$ have positive coordinates that satisfy:

$$\left(x, \frac{x}{\sqrt3}, x\right) = \left(\sqrt3 y, y, \sqrt3 y\right) = \left(z, \frac{z}{\sqrt3}, z\right)$$

Picking any point on this intersection ray, for example $\left(\sqrt3, 1, \sqrt3\right)$, to find the angle $\theta$ between this ray and the negative $x$-axis by dot product,

$$\begin{align*} \left(\sqrt3, 1,\sqrt3 \right)\cdot(-1,0,0) &= -\sqrt3\\ \left\|\left(\sqrt3, 1,\sqrt3 \right)\right\| \left\|(-1,0,0)\right\|\cos\theta &= -\sqrt3\\ \sqrt7\cdot1\cos\theta &= -\sqrt3\\ \cos\theta &= -\frac{\sqrt3}{\sqrt7}\\ \theta &= 130.9^\circ \end{align*}$$

$\endgroup$
1
  • $\begingroup$ thanks for your answer! $\endgroup$
    – njminchin
    Jul 25, 2022 at 2:01
1
$\begingroup$

Suppose we have two vectors $v_1, v_2$ that lie in the $XY$ plane. Then

$v_1 = (v_{1x} , v_{1y}, 0) $ and $v_2 = (v_{2x}, v_{2y}, 0) $

We can assume that $v_1$ and $v_2$ are unit vectors.

Now, we want to project both vectors on the plane whose normal is known, it is a rotation of the $k$ vector (where $k$ is the unit vector along the $Z$ axis) by an angle $\theta$ about the $X$ axis. It easy to see that the normal vector to the rotated plane $n$ is

$n = (0, -\sin(\theta) , \cos(\theta) ) $

The projection of a vector $v$ onto this plane is along the unit vector $u = k = (0, 0, 1) $ and is given by

$ v' = \text{Proj}_\pi v = (I - \dfrac{{u n}^T}{u^T n} ) v $

Using the $n$ found above, this becomes

$ v' = \begin{bmatrix} 1 && 0 && 0 \\ 0 && 1 && 0 \\ 0 && \tan(\theta) && 0 \end{bmatrix} v $

Hence, the projections of $v_1, v_2$ are

$v_1' = ( v_{1x} , \ v_{1y} , \ \tan(\theta) v_{1y} ) $

$v_2' = ( v_{2x} , \ v_{2y} , \ \tan(\theta) v_{2y} ) $

Now the angle $\phi$ between the original vectors $v_1$ and $v_2$ is given by

$ \cos(\phi) = v_1 \cdot v_2 $

while the new angle $\psi$ between the projected vectors $v_1'$ and $v_2'$ is given by

$ \cos(\psi) = \dfrac{ v_1' \cdot v_2' }{ \| v_1' \| \| v_2' \| } $

Using the above-derived equations, it is easy to arrive at

$ \cos(\psi) = \dfrac{ v_{1x} v_{2x} + \sec^2(\theta) v_{1y} v_{2y} }{\sqrt{v_{1x}^2 + \sec^2(\theta) v_{1y}^2 } \sqrt{ v_{2x}^2 + \sec^2(\theta) v_{2y}^2 }} $

And this further simplifies to

$ \cos(\psi) = \dfrac{ \cos(\phi) + \tan^2(\theta) v_{1y} v_{2y} }{\sqrt{1 + \tan^2(\theta) v_{1y}^2 } \sqrt{ 1 +\tan^2(\theta) v_{2y}^2 }} $

In the given example,

$ v_1 = (1, 0, 0) $

$ v_2 = (-\dfrac{1}{\sqrt{2}}, \dfrac{1}{\sqrt{2}} , 0 ) $

Hence, $\phi = 135^\circ \Longrightarrow \cos(\phi) = - \dfrac{1}{\sqrt{2}}$

And $\theta = 30^\circ = \dfrac{\pi}{6} $

Therefore, applying the above formula,

$ \cos(\psi) = \dfrac{ -1/\sqrt{2} }{\sqrt{1 + \dfrac{1}{6} } } = \dfrac{-\sqrt{3}}{\sqrt{7}} \Longrightarrow \psi \approx 130.8933^\circ$

$\endgroup$
-1
$\begingroup$

enter image description here

A trigonometric calculation done using the above 3d sketch. $\Delta PON$ in plane $1$ is normal to the hinge ( intersection of the two planes) faces and pink $\Delta POM$ is in the tilted plane $2.$ Lengths assumed unity wlog as we are concerned only with angles.

$$ OP=ON=1; |PH|= \sin \alpha; PN^{2}=PH^{2} + NH^{2}$$ $$ =\sin^2 \beta +(1+ \cos\beta)^2 =2(1+\cos \beta);$$

$$ PM^2=PN^2+(ON \tan \theta)^2 ;PM=\sqrt{2+2\cos \beta+\tan ^2\theta} ;$$

By Cosine Rule in $\Delta OMP$

$$ \cos \alpha=\frac{(OP^2+OM^2-PM^2)}{2. OP.OM}=\dfrac{1+\sec^2 \theta-2-2 \cos \beta -\tan^2\theta}{2.1.\sec \theta}; \quad$$

$$\boxed{ \cos \alpha=-\cos \theta. \cos \beta } ;$$

The negative sign is due to obtuse angle $\beta.$ Else for an acute angle it would be positive. For given input data

$$ \beta= 135^{\circ}, \theta=30^{\circ},\, \alpha \approx 127.761357^{\circ};$$

When $\theta =90^{\circ}$ we should have $\alpha =90^{\circ}$ when $OM$ lies along hinge.. checks okay. The result has also been verified by a structural construction made as above.

$\endgroup$
2
  • 1
    $\begingroup$ The angle $\theta$ is not the angle $\angle NOM$, because you rotating about $OP$ and not about the normal to the plane $NMO$ $\endgroup$
    – of course
    Jul 26, 2022 at 7:26
  • $\begingroup$ Afraid not so. Vectors $PH,OQ$ are parallel, and normal to plane $YOZ$. The $\angle MON=\theta= 30^{\circ}$ is rotation in plane $YOZ$ got by rotation between unit vectors along vector directions $ ON,OM$ around axis $OQ.$ Added labels for $X,Y,Z$ axes. $\endgroup$
    – Narasimham
    Jul 26, 2022 at 22:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .