Torus[{x,y,z},{rinner,router}]
represents a torus centered at {x,y,z} with inner radius rinner and outer radius router.
Torus
Torus[{x,y,z},{rinner,router}]
represents a torus centered at {x,y,z} with inner radius rinner and outer radius router.
Details and Options
- Torus is also known as torus of revolution.
- Torus can be used as a geometric region and a 3D graphics primitive.
- Torus[] is equivalent to Torus[{0,0,0},{1/2,1}].
- Torus represents the shell
. - Torus can be used in Graphics3D.
- Graphics rendering is affected by directives such as FaceForm, Specularity, Opacity and color.
Examples
open all close allBasic Examples (2)
A standard torus at the origin:
Graphics3D[Torus[]]Area[Torus[{Subscript[c, 1], Subscript[c, 2], Subscript[c, 3]}, {Subscript[r, inner], Subscript[r, outer]}]]RegionCentroid[Torus[{Subscript[c, 1], Subscript[c, 2], Subscript[c, 3]}, {Subscript[r, inner], Subscript[r, outer]}]]Scope (18)
Graphics (9)
Specification (4)
Graphics3D[{Opacity[0.5], Torus[{0, 0, 0}, {1 / 2, 1}]}]Filled tori with different outer radii:
Graphics3D[{Opacity[0.5], Torus[{0, 0, 0}, {1 / 2, 1}], FilledTorus[{3, 0, 0}, {1 / 2, 2}]}]Filled tori with different inner radii:
Graphics3D[{FaceForm[Yellow, Blue], Torus[{0, 0, 0}, {1 / 2, 1}], FaceForm[Yellow, Blue], FilledTorus[{2, 0, 0}, {1 / 4, 1}]}, PlotRange -> {{-1, 3}, {-.2, 1}, {-1, 1}}]Short form for a torus with radii
at the origin:
Graphics3D[{Opacity[0.5], Torus[]}, Axes -> True]Styling (4)
Table[Graphics3D[{Opacity[0.5], c, Torus[]}], {c, {Red, Green, Blue, Yellow}}]Different properties can be specified for the front and back of faces using FaceForm:
Graphics3D[{FaceForm[Yellow, Blue], Torus[]}, PlotRange -> {{-1, 1}, {-.3, 1}, {-1, 1}}]Filled tori with different specular exponents:
Table[Graphics3D[{Orange, Specularity[White, n], Opacity[0.5], Torus[]}], {n, {5, 20, 100}}]Graphics3D[{Glow[Red], White, Opacity[0.5], Torus[]}]Opacity specifies the face opacity:
Table[Graphics3D[{Opacity[o], Torus[]}], {o, {0.3, 0.5, 0.9}}]Coordinates (1)
Points can be Dynamic:
DynamicModule[{x}, {Slider[Dynamic[x], {-0.5, 0.5}], Graphics3D[{Torus[], Torus[Dynamic[{x, 1, 1}], {1 / 8, 1 / 4}]}]}]Regions (9)
Embedding dimension is the dimension of the space in which the torus lives:
RegionEmbeddingDimension[Torus[{Subscript[c, 1], Subscript[c, 2], Subscript[c, 3]}, {Subscript[``r``, ``inner``], Subscript[``r``, ``outer``]}]]Geometric dimension is the dimension of the shape itself:
RegionDimension[Torus[{Subscript[c, 1], Subscript[c, 2], Subscript[c, 3]}, {Subscript[``r``, ``inner``], Subscript[``r``, ``outer``]}]]ℛ = Torus[{0, 0, 0}, {1 / 2, 1}];{RegionMember[ℛ, {1, 0, 0}], RegionMember[ℛ, {0, 0, 0}], RegionMember[ℛ, {1, 1, 1}]}Get conditions for point membership:
RegionMember[Torus[{Subscript[c, 1], Subscript[c, 2], Subscript[c, 3]}, {Subscript[``r``, ``inner``], Subscript[``r``, ``outer``]}], {x, y, z}]ℛ = Torus[{0, 0, 0}, {1 / 2, 1}];{Area[ℛ], RegionMeasure[ℛ]}c = RegionCentroid[ℛ]Graphics3D[{{Opacity[0.5], LightBlue, ℛ}, {PointSize[Large], Red, Point[c]}}]ℛ = Torus[{0, 0, 0}, {3 / 4, 1}];{RegionDistance[ℛ, {1, 0, 0}], RegionDistance[ℛ, {0, 0, 0}], RegionDistance[ℛ, {1, 1, 1}]}The equidistance contours for a torus:
ContourPlot3D[Evaluate@RegionDistance[ℛ, {x, y, z}], {x, -2, 2}, {y, 0, 2}, {z, -2, 2}, Mesh -> None, Contours -> {0.25, 0.5, 1}, BoxRatios -> Automatic]ℛ = Torus[{0, 0, 0}, {1 / 2, 1}];{SignedRegionDistance[ℛ, {1, 0, 0}], SignedRegionDistance[ℛ, {1 / 2, 1 / 2, 0}], SignedRegionDistance[ℛ, {1, 1, 1}]}ℛ = Torus[{0, 0, 0}, {1 / 2, 1}];{RegionNearest[ℛ, {1, 0, 0}], RegionNearest[ℛ, {1 / 2, 1 / 2, 1 / 2}]}Nearest points to an enclosing sphere:
spherePoints[{n_, m_}, c_, r_] :=
Flatten[Table[c + r{Cos[k 2π / n]Sin[l π / m], Sin[k 2π / n]Sin[l π / m], Cos[l π / m]}, {k, 0., n - 1}, {l, 0., m - 1}], 1];pl = spherePoints[{16, 8}, RegionCentroid[ℛ], 2];
npl = Table[RegionNearest[ℛ, p], {p, pl}];Legended[Graphics3D[{ℛ, {Thin, Gray, Line[Transpose[{pl, npl}]]}, {Red, Point[pl]}, {PointSize[Medium], Blue, Point[npl]}}, Lighting -> "Neutral", Boxed -> False], PointLegend[{Red, Blue}, {"start", "nearest"}]]BoundedRegionQ[Torus[{Subscript[c, 1], Subscript[c, 2], Subscript[c, 3]}, {Subscript[``r``, ``inner``], Subscript[``r``, ``outer``]}]]RegionBounds[Torus[{0, 0, 0}, {Subscript[``r``, ``inner``], Subscript[``r``, ``outer``]}]]ℛ = Torus[{0, 0, 0}, {1 / 2, 1}];BoundedRegionQ[ℛ]b = RegionBounds[ℛ]Graphics3D[{{EdgeForm[White], Opacity[0.2, Yellow], Cuboid@@Transpose[b]}, ℛ}, Boxed -> False]ℛ = Torus[{1, 2, 3}, {2, 4}];MinValue[{x y z - x y, {x, y, z}∈ℛ}, {x, y, z}]Solve equations in a torus region:
ℛ = Torus[{1, 2, 1}, 3];Reduce[x^2 + y^2 + z^2 == 9 && z^2 == x y + (1/4) && {x, y, z}∈ℛ, {x, y, z}]Applications (2)
Graphics3D[With[{c = ColorData["SouthwestColors"]}, {Opacity[.7], Specularity[White, 20], Table[{c[i / 7], Torus[{Cos[2 Pi i / 6], Sin[2Pi i / 6], 0}, {1 / 4, 1}]}, {i, 6}]}], Lighting -> "Neutral", Boxed -> False, ViewPoint -> Top]Use Torus to render nodes in a GraphPlot3D:
GraphPlot3D[Table[i -> Mod[i ^ 2, 50], {i, 0, 50}], SelfLoopStyle -> None, EdgeShapeFunction -> ({Cylinder[#1, 0.1]}&), VertexShapeFunction -> ({Torus[#, 0.3]}&)]Properties & Relations (3)
An implicit specification of a torus generated by ContourPlot3D:
ContourPlot3D[(-(3/4) + Sqrt[x^2 + y^2])^2 + z^2 == (1/16), {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, Mesh -> None]A parametric specification of a torus generated by ParametricPlot3D:
ParametricPlot3D[{((3/4) + (Cos[ϕ]/4)) Cos[θ], ((3/4) + (Cos[ϕ]/4)) Sin[θ], (Sin[ϕ]/4)}, {ϕ, 0, 2π}, {θ, 0, 2π}, Mesh -> None]Torus is the RegionBoundary of FilledTorus:
RegionBoundary[FilledTorus[{x, y, z}, r]]Neat Examples (3)
Graphics3D[Table[{Opacity[.5, Hue[RandomReal[]]], Rotate[Torus[RandomReal[2, {3}], RandomReal[3 / 4]], RandomReal[{0, 2 Pi}], RandomReal[{-1, 1}, 3]]}, {50}]]Graphics3D[{Specularity[White, 30], Table[With[{x = 2Cos[t], y = 2Sin[t], p = 2Sin[t + Pi], q = 2Sin[t + Pi]}, {Hue[t / (5Pi)], Arrowheads[0], Arrow[Tube[{{x, y, t}, {p, q, t}}, .1], .3], Torus[{x, y, t}, .3], Torus[{p, q, t}, .3]}], {t, 0, 5Pi, .3}]}, Boxed -> False, Background -> GrayLevel[.2]]Graphics3D[{Table[{ColorData[35, "ColorList"][[i]], Torus[{0, 0, 0}, {i / 7, 7 - i} ]}, {i, 1, 6}]}, ClipPlanes -> InfinitePlane[{{0, 0, 0}, {0, 0, 1}, {1, 0, 1}}]]See Also
Related Guides
History
Text
Wolfram Research (2021), Torus, Wolfram Language function, https://reference.wolfram.com/language/ref/Torus.html.
CMS
Wolfram Language. 2021. "Torus." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Torus.html.
APA
Wolfram Language. (2021). Torus. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Torus.html
BibTeX
@misc{reference.wolfram_2026_torus, author="Wolfram Research", title="{Torus}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/Torus.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_torus, organization={Wolfram Research}, title={Torus}, year={2021}, url={https://reference.wolfram.com/language/ref/Torus.html}, note=[Accessed: 12-June-2026]}