I am trying to find an algorithm to derive the 4 angles, from the centre of a rotated ellipse to its extremities. In other words, from the centre to the points where the bounding box touches the ellipse's line.
I have already figured out how to get the bounding box by using:
leftX/rightX = h± sqrt(a*a*cos(PI)*cos(PI) + b*b*sin(PI)*sin(PI))
topY/bottomY = k± sqrt(a*a*sin(PI)*sin(PI) + b*b*cos(PI)*cos(PI))
The above gives me the bounding box AND:
the x of the left and right points
the y of the top and bottom points
But I need the x and y of the left and right points and the x and y of the top and bottom points in order to calculate the angles.
I feel like I missing something simple but could not find it.
The Image illustrates the point at the top of the bounding box.