1
$\begingroup$

This tetrahedron and sphere intersect:

pts = {{0, 0, 0}, {0.8, 0, 0}, {1, Sqrt[3]/2, 1}, {1, -1, 3/4}, 
           cent = {0.7, -0.0335, 0.43}};
regTet = MeshRegion[pts, Tetrahedron[{1, 2, 3, 5}]];
regSphere = Region[Sphere[cent, .1]];
Show[regTet, regSphere]

enter image description here

Using RegionIntersection to pick out the intersection seems to work:

int = RegionIntersection[regTet, regSphere]

enter image description here

and everything checks out with RegionQ:

{RegionQ[regSphere], RegionQ[regTet], RegionQ[int]}
{True, True, True}

Now I can get the measure of the tetrahedron and of the sphere

{RegionMeasure[regSphere], RegionMeasure[regTet]}
{0.125664, 0.054984}

but when trying to get the measure of the intersection:

RegionMeasure[int]
RegionMeasure::reg: int is not a correctly specified region.

It feels like I must be making a simple mistake... but how do I get the area of the intersection of the surface of the sphere and the tetrahedron.

$\endgroup$
3
$\begingroup$

If you work with graphics primitives instead, things work:

tet = Tetrahedron[{{0, 0, 0}, {0.8, 0, 0}, {1, Sqrt[3]/2, 1}, {0.7, -0.0335, 0.43}}];
sph = Sphere[{0.7, -0.0335, 0.43}, .1];

Show @ Graphics3D[{tet, sph}]
RegionMeasure @ RegionIntersection[tet, sph]

enter image description here

0.0207873

$\endgroup$
  • $\begingroup$ Thanks -- this is a nice work-around. The Region commands seem so tempting... I wish I understood them better. $\endgroup$ – bill s Mar 12 '18 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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