Torus

Qualified name: manim.mobject.three\_dimensions.Torus

class Torus(major_radius=3, minor_radius=1, u_range=(0, 6.283185307179586), v_range=(0, 6.283185307179586), resolution=None, **kwargs)[source]

Bases: manim.mobject.three_dimensions.Surface

A torus.

Examples

Example: ExampleTorus

../_images/ExampleTorus-1.png
from manim import *

class ExampleTorus(ThreeDScene):
    def construct(self):
        axes = ThreeDAxes()
        torus = Torus()
        self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)
        self.add(axes, torus)
Parameters
  • major_radius (float) – Distance from the center of the tube to the center of the torus.

  • minor_radius (float) – Radius of the tube.

Methods

func

Attributes

animate

Used to animate the application of a method.

animation_overrides

depth

The depth of the mobject.

height

The height of the mobject.

width

The width of the mobject.