0
$\begingroup$

So I've got parametric ellipse equasion like in this post: What is the parametric equation of a rotated Ellipse (given the angle of rotation)

$$x(\alpha) = R_x \cos(\alpha) \cos(\theta) - R_y \sin(\alpha) \sin(\theta) + C_x \\ y(\alpha) = R_x \cos(\alpha) \sin(\theta) + R_y \sin(\alpha) \cos(\theta) + C_y$$

My question is how to find all $\alpha$ values for which ellipse intersects given vertical or horizontal line, e.g. $x=1$ or $y=2$.?

$\endgroup$
0
0
$\begingroup$

You’ve got an equation of the form $A\cos\alpha+B\sin\alpha = C$, so you could solve it directly, getting an unpleasant-looking expression involving $\arcsin$ and $\arctan$. However, you can take advantage of the fact that you’re working with a scaled and translated ellipse for a potentially simpler solution.

The parameterization that you’ve got in your question can be viewed as the unit circle $(\cos\alpha,\sin\alpha)$ scaled, rotated and translated. So, if you undo this transformation, the problem is reduced to finding the intersection of a line with the unit circle. Specifically, the line $x=h$ back-maps to $(R_x\cos\theta)x-(R_y\sin\theta)y+C_x=h$, while the line $y=k$ back-maps to $(R_x\sin\theta)x+(R_y\cos\theta)y+C_y=k$.

$\endgroup$
4
  • $\begingroup$ thanks @amd, that trick with transformation is great :D $\endgroup$ Jul 27 '19 at 11:39
  • $\begingroup$ For sake of finding my mistakes: I've tried to solve it with $Acos\alpha - Bsin\alpha = C$ before and it gives me no result, or a single result, but there's two results also possible, so I wonder where I got wrong. I've tried it as follows: $$A=R_xcos\alpha \\ B=R_ysin\alpha \\ C=x(\alpha)-C_x$$ so knowing that $A cos\alpha - B sin\alpha\equiv Rsin(\alpha-\gamma)$ thing I've got $\alpha=arcsin(\frac{C}{\sqrt{A^2+B^2}})+arctan\frac{B}{A}$ but I've stuck here. $\endgroup$ Jul 27 '19 at 12:07
  • $\begingroup$ @tak_se_paczam You have to consider both solutions of $R^2=A^2+B^2$. Also, I believe that you meant to write $A=R_x\cos\theta$ and $B=R_y\sin\theta$ in your comment. $\endgroup$
    – amd
    Jul 27 '19 at 22:01
  • $\begingroup$ thanks for your help :) $\endgroup$ Jul 27 '19 at 23:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.