Message Boards Message Boards

GROUPS:

Sphere found hiding in torus

Posted 1 month ago
412 Views
|
2 Replies
|
3 Total Likes
|

In Mathematica 12, the line of code below plots a torus in Graphics3D[] using ResourceFunction["Torus"]. It was plotted with Opacity[.2]. I was very surprised to see a sphere inscribed in the torus at approximately $\phi = 3\pi/2$ where $\phi$ is the angle of the outer radius. I take it this is some artifact of the BSpline function used by the “Torus” resource. Is there a mathematical reason for it, and is there any way to get rid of the inner sphere?

Graphics3D[{Opacity[.2], ResourceFunction["Torus"][{0, 0, 0}, {20, 2}]},Boxed->False]

enter image description here

POSTED BY: Gary Palmer
2 Replies
Posted 1 month ago

It looks like ResourceFunction["Torus"] is defined by creating a tube around a BSplineCurve. The default CapForm for Tube is "Round". So, I believe that what you are seeing is the overlap of the end caps of the tube. FWIW, in version 13 Torus is a built-in function, so no need for the ResourceFunction.

POSTED BY: Eric Rimbey
Posted 1 month ago

CapForm[None] did the trick with no downside that I can see.

Graphics3D[{CapForm[None], Opacity[.2], ResourceFunction["Torus"][origin, {10, 1}]}]
POSTED BY: Gary Palmer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract