Triangle¶
Qualified name: manim.mobject.geometry.polygram.Triangle
- class Triangle(**kwargs)[source]¶
Bases:
RegularPolygonAn equilateral triangle.
- Parameters:
kwargs (Any) – Additional arguments to be passed to
RegularPolygon
Examples
Example: TriangleExample ¶
from manim import * class TriangleExample(Scene): def construct(self): triangle_1 = Triangle() triangle_2 = Triangle().scale(2).rotate(60*DEGREES) tri_group = Group(triangle_1, triangle_2).arrange(buff=1) self.add(tri_group)
class TriangleExample(Scene): def construct(self): triangle_1 = Triangle() triangle_2 = Triangle().scale(2).rotate(60*DEGREES) tri_group = Group(triangle_1, triangle_2).arrange(buff=1) self.add(tri_group)Methods
Attributes
alwaysCall a method on a mobject every frame.
animateUsed to animate the application of any method of
self.animation_overridescolordepthThe depth of the mobject.
fill_colorIf there are multiple colors (for gradient) this returns the first one
heightThe height of the mobject.
n_points_per_curvesheen_factorstroke_colorwidthThe width of the mobject.
- _original__init__(**kwargs)¶
Initialize self. See help(type(self)) for accurate signature.
- Parameters:
kwargs (Any)
- Return type:
None