# What's the parametric function for a rotated ellipse about one of its foci?

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.

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

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