shapes_2d¶
The 2-D shapes.
Circle, Square, Rectangle, RegularPolygon,
Polygon, Quad, Line, Point,
Dot and SurroundingRectangle are all cubic bezier circuits
(BezierCircuitCubic), so they stay exactly
smooth at any zoom and morph into one another. They take color,
stroke_color and stroke_width, plus grid_width /
grid_height for shapes that carry a gradient or an image rather than
one flat color.
A second family – Arc, Annulus, Ellipse,
Star, Arrow – comes from the Manim compatibility layer and
is constructed with Manim’s arguments, including stroke_width and
stroke_color in place of the border ones.
The Triangulated classes here build filled triangle meshes instead, for
interiors that need per-fragment shading.
See The Mob Gallery.
Classes
A circle, drawn as a cubic bezier circuit. |
|
A small filled |
|
A straight or circular-arc line segment, drawn as a cubic bezier circuit. |
|
A single point, mostly useful as an invisible anchor. |
|
A 2-D planar polygon with N vertices. |
|
A four-sided polygon, given its four corners. |
|
A rectangle, drawn as a cubic bezier circuit. |
|
A regular polygon: |
|
A square, drawn as a cubic bezier circuit. |
|
A rectangle sized to enclose one or more other Mobs. |
|
An equilateral triangle pointing up. |
|