Skip to main content
3 of 3
shortened as per comment
gpap
  • 9.8k
  • 3
  • 25
  • 67

The "canonical" way is to find a pattern (here, {Black, Thick}) that matches what the boundary is made of and extract it from the graphics object. So given

pt = RegionPlot[{{x^3 - y^2 > 2 y && 
     x^2 + y^3 > 2 x}, {x^3 - y^2 < 2 y && x^2 + y^3 > 2 x}}, {x, -1, 
   1}, {y, -1, .1}, PlotStyle -> {Green, Yellow}, 
  BoundaryStyle -> {Black, Thick}];

bdy=Cases[Normal@First@pt, {Black, Thick, __}, Infinity];

Graphics[bdy]

enter image description here

---EDIT 2---

In diagonally reading your question, I missed the requirement for the boundary between the two.

The following will work on the particular dataset. First, you can extract the points from the bdy:

points = Cases[bdy, Line[a___] -> a, Infinity]

and you will notice that there are two components each corresponding to one region. I thought that Intersection wouldn't work for the two but as @eldo points out, it turns out it does:

bdy = First /@ GatherBy[Intersection@@points, First] (* so that there are no duplicate x coords*);

gives the boundary points which can be fitted to a model of your liking or interpolate or whatever:

 fit = Interpolation[bdy, InterpolationOrder -> 1];

Plot[fit[x], {x, -1, 0},  
 Epilog -> {Red, PointSize -> Tiny, Point[points[[1]]~Join~points[[2]]]},
  PlotStyle -> {Blue, Thick}]

enter image description here

gpap
  • 9.8k
  • 3
  • 25
  • 67