manim.mobject.three_dimensions.Torus

class Torus(major_radius=3, minor_radius=1, u_min=0, u_max=6.283185307179586, v_min=0, v_max=6.283185307179586, resolution=24, **kwargs)[source]

Bases: manim.mobject.three_dimensions.ParametricSurface

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.

depth

The depth of the mobject.

height

The height of the mobject.

width

The width of the mobject.