MATLAB: Area of intersection of two ellipses

areaellipseintersection

I have two defined ellipses (semi-major, semi-minor and orientation angle) that overlap each other. I'd like to find the largest ellipse that will fit within the intersection (the ellipse that most closely matches the area of the intersection region, like the red one). I'd need to define the red ellipse's semi-major, semi-minor and orientation angle.

Best Answer

You can follow the below steps.
  1. For the two ellipses i.e get coordinates of both the ellipses. Let L1, L2 be your coordinates of both the ellipses.
  2. Use this function interx to get the the intersection points. This will give you four points. https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections?focused=5165138&tab=function
  3. Use this function to fit the ellipse. https://in.mathworks.com/matlabcentral/fileexchange/3215-fit_ellipse