I'm trying to find intersection points of the unrotated axis on rotated ellipse as shown in below visual(black circles)
I have below information of ellipse:
u=3 #x-position of the center
v=6 #y-position of the center
a=np.sqrt(2)#radius on the x-axis
b=1 #radius on the y-axis
t_rot=pi/6 #rotation angle
Also I have bounding box lines:
xa = np.sqrt((a**2*np.cos(t_rot)**2)+(b**2*np.sin(t_rot)**2))
ya = np.sqrt((a**2*np.sin(t_rot)**2)+(b**2*np.cos(t_rot)**2))
as a result for given ellipse info bounding box intersection points:
ya+v = 7.12
-ya+v = 4.88
xa+u = 4.32
-xa+u = 1.68
Is it possible to calculate black dots on the visual with these information?
I know it is quite a general question but I am not sure where to start.
Any suggestion would be helpful.
Thanks!
Best Answer
With respect to the center, the equation of the ellipse is: $$\frac{(x\cos\theta+y\sin\theta)^2}{a^2}+\frac{(x\sin\theta-y\cos\theta)^2}{b^2}=1$$ Your axes are $x=0$ and $y=0$. Plugging in $x=0$, you get $$y^2\left(\frac{\sin^2\theta}{a^2}+\frac{\cos^2\theta}{b^2}\right)=1$$ Can you solve it from here? Similar to $x$, you plug in $y=0$. Then the last step is to add the coordinates of the center.