With MMA 12, I have a cone & sphere in 3D, that intersect. The area where they intersect I've managed to color (yellow), but I would like to surround that area with a more prominent line of a different color. I cannot figure out how to apply the boundary line.

Here is what I've managed so far:

Subscript[\[ScriptCapitalR], 1] = Cone[{{0, 0, 0}, {0, 3, 3}}, 0.9];
Subscript[\[ScriptCapitalR], 2] = Sphere[{-2, 0, 0}, 3];
intersection = RegionIntersection[Subscript[\[ScriptCapitalR], 1], 
Subscript[\[ScriptCapitalR], 2]];

g = Graphics3D[{{Opacity[0.12], Darker@Green, 
Subscript[\[ScriptCapitalR], 1]}, {Opacity[0.5], LightRed, 
Subscript[\[ScriptCapitalR], 2]}, Opacity[0.7], Yellow, 
EdgeForm[], MeshPrimitives[DiscretizeRegion[intersection], 2], 
Boxed -> False}];
Show[g, ImageSize -> 500]


1 Answer 1

boundary = RegionPlot3D[DiscretizeRegion @ intersection,
  PlotStyle -> None, BoundaryStyle -> Directive[Red, Thick]]

enter image description here

Show[g, boundary, ImageSize -> 500]

enter image description here

  • 1
    $\begingroup$ Hey thanks kglr! You know I played with the boundary command, but you know, I THINK I missed setting it equal to a variable and adding in show!! Thank you very much. That's what I was looking for! $\endgroup$
    – fiz
    Commented Feb 14 at 1:05

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.