Torus
torus
majorRadius = 3;
minorRadius = 1;
ParametricPlot3D[
{Cos[u]*(majorRadius + minorRadius*Cos[v]), Sin[u]*(majorRadius + minorRadius*Cos[v]), minorRadius*Sin[v]},
{u, 0, 2*Pi},
{v, 0, 2*Pi},
PlotPoints -> 100,
Axes -> False,
Boxed -> False,
BoundaryStyle -> Directive[Black, Thin],
PlotStyle -> Directive[White, Opacity[0.7],
Specularity[10, 20]],
Lighting -> "Neutral"]
- majorRadius is the distance from center of torus to tube center.
- minorRadius is the radius of the tube.
- u controls the torus sweep.
- v controls the tube's profile sweep.
torus plotted with disk domain
ParametricPlot3D[{2*Cos[u] + Cos[v]*Cos[u], 2*Sin[u] + Cos[v]*Sin[u],
Sin[v]}, Element[{u, v}, Disk[{0, 0}, 3]], PlotPoints -> 20,
MaxRecursion -> 0,
PlotStyle ->
Directive[Green, Opacity[1], EdgeForm[{Thickness[0.001], Blue}],
FaceForm[Red, Yellow]], Axes -> False, Boxed -> False]