How do you instruct Mathematica to return intersection points between curves as numerical values, when using ParametricRegion to represent at least one of the curves? For example, these are the regions for a line segment and a cubic Bezier curve:

cubicbez[a_, b_, c_, d_, t_] := (1 - t)^3*a + 3*(1 - t)^2*t*b + 3*(1 - t)*t^2*c + t^3*d




Regions r1, r2 and ri

As you can see, Mathematica has no trouble finding the intersection points.

I then ask Mathematica to return the coordinates of the intersection points as follows:


which returns

{{3.20154, 4.60463}, {3.42285, 5.26855}}

when using Mathematica I.e., one of the intersections points (the lower left one) is missing.

What would be the proper way to get the intersection points?

(N.B. I know that you can compute the intersections of a cubic Bezier curve and a line in other ways, e.g. algebraically using Cardano's formula, or using numerical methods, but I'd like to know how to use Mathematica's regions for that purpose.)

  • 5
    $\begingroup$ MeshCoordinates[DiscretizeRegion[ri, CoordinateBounds[ri]]] gives all three points. $\endgroup$
    – kglr
    Jun 7, 2021 at 7:14
  • 1
    $\begingroup$ With version 12.3 one can do: DiscretizeRegion[ri, CoordinateBounds[ri]] // MeshCoordinates or Solve[{x, y} \[Element] r1 && {x, y} \[Element] r2, {x, y}] // N. $\endgroup$
    – rmw
    Jun 7, 2021 at 8:39
  • 1
    $\begingroup$ Version 11.2 give me correct result with same code {{2.95674, 3.87023}, {3.20154, 4.60463}, {3.42285, 5.26855}} $\endgroup$
    – nufaie
    Jun 7, 2021 at 8:50

2 Answers 2


Using the two-argument form of DiscretizeRegion we get three points:

MeshCoordinates[DiscretizeRegion[ri, CoordinateBounds[ri]]]
 {{2.95674, 3.87023}, {3.20154, 4.60463}, {3.42285, 5.26855}}

FWIW, we can also use MeshPrimitives to get the three Points:

MeshPrimitives[DiscretizeRegion@ri, 0]
{Point[{2.95674, 3.87023}], Point[{3.20154, 4.60463}], Point[{3.42285, 5.26855}]}
  • $\begingroup$ The expression MeshPrimitives[DiscretizeRegion@ri, 0] yields only the latter two points for me. Maybe its a bug in Mathematica ... . The option CoordinateBounds[ri], however, works nicely. $\endgroup$
    – FrankM
    Jun 7, 2021 at 13:01

We can also use RegionMember and Solve or Reduce to get the points.

sol = Solve[RegionMember[ri, {x, y}]]
{x, y} /. sol // N

{{2.95674, 3.87023}, {3.20154, 4.60463}, {3.42285, 5.26855}}


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.