3
$\begingroup$

I am looking for better, preferably analytical approaches to discretize intersections of algebraic surfaces. When surfaces are not identical, these solutions are either curves or points.

An extremely simplified example of problems with plain old DiscretizeRegion can be seen below. In this case algebraic surfaces are just spheres, and their intersection is a circle. In this example, I extract points in the discretized version for a specific pair of spheres, and rotate them to match a planar circle:

MeshPrimitives[DiscretizeRegion@RegionIntersection[Sphere /@ {-#, #}], 0] /.
    coord : {Repeated[_?NumericQ, {3}]} :> 
     RotationTransform[{#, {0, 0, 1}}][coord][[1 ;; 2]] &@
  {0.09666984222273534`, 0.3622850077710253`, 0.33076353297934696`} // Graphics

enter image description here

That doesn't really look like a good distribution one would expect from just intersecting two spheres. Histogram of line lengths looks equally bad:

RegionMeasure /@ 
    MeshPrimitives[
     DiscretizeRegion@RegionIntersection[Sphere /@ {-#, #}], 1] &@
  {0.09666984222273534`, 0.3622850077710253`, 0.33076353297934696`} // Histogram

enter image description here

I can limit size of these gaps with MaxCellMeasureoption, but it doesn't really remove the problem involving non-uniformity:

RegionMeasure /@ 
    MeshPrimitives[
     DiscretizeRegion[RegionIntersection[Sphere /@ {-#, #}], 
      MaxCellMeasure -> {"Length" -> .01}], 1] &@
  {0.09666984222273534`, 0.3622850077710253`, 0.33076353297934696`} // Histogram

enter image description here

What other methods there are to improve quality of such discretizations? Note that spheres are just an example; I'm looking for a general solution for intersections of arbitrary polynomial surfaces.

EDIT: I think this can be accomplished with SemialgebraicComponentInstances and NDSolve, but it's work in progress.

$\endgroup$
3
  • 1
    $\begingroup$ Maybe you can adapt some of the solutions here to this case? $\endgroup$ Commented Jan 20, 2017 at 12:40
  • $\begingroup$ @J.M. This answer seems quite similar to approach I'm developing: mathematica.stackexchange.com/a/64923/3056 $\endgroup$
    – kirma
    Commented Jan 20, 2017 at 12:45
  • 1
    $\begingroup$ That's what I thought; I also linked to a nice paper in the comments to that answer. $\endgroup$ Commented Jan 20, 2017 at 12:49

0

Your Answer

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

Browse other questions tagged or ask your own question.