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.