1
$\begingroup$

I'm trying to generate a figure similar to the first figure of enter link description here, so I tried to draw a torus, a disk, and a tube which is tangent to the torus. The disk must be inside the torus. But apparently Graphics and Parametricplot3D or Graphics3D cannot be combined using Show. Of course, I will need to change parameters so they fit well, but I have no idea how to combine them. Here is the code:

f1 = ParametricPlot3D[{Cos[2 t] (10 + Cos[2 u]), 
Sin[2 t] (10 + Cos[2 u]), Sin[2 u]}, {t, 0, 2 Pi}, {u, 0, 2 Pi}, 
Boxed -> False, Axes -> False, PlotPoints -> {150, 150}, 
Mesh -> None]

f2 = Graphics[{Green, Disk[{0, 0}, 1]}]

f3 = Graphics3D[
{Cyan, Tube[{{-5, 1, 0}, {5, 1, 0}}, 0.1]}, Boxed -> False, 
ImageSize -> 300]

Show[f1,f2,f3]
$\endgroup$

1 Answer 1

2
$\begingroup$

The problem is combining Graphics with Graphics3D. MMA isn't sure how to do that since the Graphics object is only defined in two dimensions. Switch it to Graphics3D instead, and use a Cylinder[] with a very small height.

f2 = Graphics3D[{Green, Cylinder[{{0, 0, 0}, {0, 0, 0.001}}, 10]}]

Re-run your code and we get:

Microtorus build from Graphics3D.

$\endgroup$

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.