3
$\begingroup$
ParametricPlot3D[{(1 + Cos[Theta]) Cos[Phi], (1 + Cos[Theta]) Sin[
Phi], Sin[Theta]}, {Theta, 0, 2 Pi}, {Phi, 0, 2 Pi}]

How do I use Tube to do exactly the same? I tried something like

Graphics3D[  Tube[Table[{(1 + Cos[Theta]) Cos[Phi], (1 + Cos[Theta]) Sin[Phi],     Sin[Theta]}, {Theta, 0, 2 Pi}, {Phi, 0, 2 Pi}]]]


Graphics3D[  Tube[Table[{(1 + Cos[Theta]) Cos[Phi], (1 + Cos[Theta]) Sin[Phi],     Sin[Theta]}, {Theta, 0, 2 Pi, 0.01}, {Phi, 0, 2 Pi, 0.01}]]]

But I feel there must be an easier way to guess the step (i.e. using 0.01? or 0.1? or something else)

What about RegionPlot for the same graph?

$\endgroup$
5
$\begingroup$
pp = ParametricPlot3D[{(1 + Cos[Theta]) Cos[Phi], (1 + Cos[Theta]) Sin[Phi], Sin[Theta]}, 
 {Theta, 0, 2 Pi}, {Phi, 0, 2 Pi}, Mesh -> None]

enter image description here

tube = Tube[Append[#, 0] & /@ CirclePoints[100], 1];

directives = Cases[pp, {dir__, _GraphicsGroup} :> dir, All];

Graphics3D[{## & @@ directives, tube}, Axes -> True]

enter image description here

$\endgroup$

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.