0
$\begingroup$

I implemented a code for generating rotated ellipses following the formula given in this answer and while it works just fine, I want the ellipse to rotate around one of the foci, not around it's centre. I don't know the parametric formula for this effect. I have the effect going in a Desmos graph. I've looked already to some of the answers related to this question, but I can't find the right solution.

My solution so far is:

x = a*cos(ang)*cos(r) - b*sin(ang)*sin(r) + c
y = a*cos(ang)*sin(r) + b*sin(ang)*cos(r) + c

where a is the semi-major axis, b is the semi-minor axis, c = sqrt(a^2-b^2), ang is an angle in radians (from 0 to 3600, to get more points into the shape) and r is the angle of rotation.

$\endgroup$

1 Answer 1

1
$\begingroup$

If $\alpha $ is rotation angle around the focus situated at origin, the standard polar Newton form is easily modified:

Single radius vector

$$ \dfrac{1}{r}= \dfrac{1- e \cos (\theta- \alpha) }{p}$$

when parameterized to Cartesian:

$$ (x,y)= r (\cos \theta, \sin \theta)$$

enter image description here

$\endgroup$
0

You must log in to answer this question.

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