manim.mobject.three_dimensions.Prism

class Prism(dimensions=[3, 2, 1], **kwargs)[source]

Bases: manim.mobject.three_dimensions.Cube

A cuboid.

Examples

Example: ExamplePrism

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

class ExamplePrism(ThreeDScene):
    def construct(self):
        self.set_camera_orientation(phi=60 * DEGREES, theta=150 * DEGREES)
        prismSmall = Prism(dimensions=[1, 2, 3]).rotate(PI / 2)
        prismLarge = Prism(dimensions=[1.5, 3, 4.5]).move_to([2, 0, 0])
        self.add(prismSmall, prismLarge)

Methods

generate_points

Initializes points and therefore the shape.

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.

generate_points()[source]

Initializes points and therefore the shape.

Gets called upon creation. This is an empty method that can be implemented by subclasses.