In the simple case, when the ellipse is centered at the origin, and the major and minor axes are parallel to the x and y axes, respectively, then the ellipse can be parameterized by the equations x = a cos(t) and y = b sin(t) , where a and b are the main and the minor axis, and t is the angle that varies from 0 to 2pi. Therefore, in this case, to answer your question, the radius at an angle t is
r = sqrt( x^2 + y^2 ) = sqrt( a^2 cos^2(t) + b^2 sin^2(t) )
Now this can be complicated in the following ways:
(i) The ellipse is not centered on (0,0)
(ii) The main and minor axes are not parallel to the x and y axes, for example, because the major axis forms an angle t0 from the positive x axis.
(iii) a combination of (i) and (ii).
However, the above solution can also be applied to these cases with the right changes. For (i) subtract the center from x and y in the above equation to get the radius from the center point. For (ii) the equation above will hold for the variables x ', y', where (x ', y') ^ T = R (t0) (x, y) ^ T, where R (t0) is the matrix rotation that correctly orientates the ellipse. So, we form the equation above for x 'and y', then substitute the expressions for x and y, solving the above matrix equation.
source share