Cells¶
- class manim_eng.components.cells.Cells(n: int, voltage: str | None = None, **kwargs: Any)¶
Bases:
VoltageSourceBaseCircuit symbol for a cell set with an arbitrary number of cells.
- Parameters:
n (int) – Number of cells.
voltage (str | None) – Voltage label to set on creation, if desired. Takes a TeX math mode string.
Attributes
Cells.animateUsed to animate the application of any method of
self.Cells.animation_overridesCells.anodeReturn the anode (positive terminal) of the source.
Cells.cathodeReturn the cathode (negative terminal) of the source.
Cells.colorCells.depthThe depth of the mobject.
Cells.fill_colorIf there are multiple colors (for gradient) this returns the first one
Cells.heightThe height of the mobject.
Cells.leftReturn the left-hand terminal of the component.
Cells.n_points_per_curveCells.negativeReturn the negative (left-hand) terminal of the source.
Cells.positiveReturn the positive (right-hand) terminal of the source.
Cells.rightReturn the right-hand terminal of the component.
Cells.sheen_factorCells.stroke_colorCells.terminalsThe list of terminals of the component.
Cells.widthThe width of the mobject.
- _construct() None¶
Construct the shape of the component.
Code to build the component’s symbol goes in here and not in
__init__()(contrary to Manim’s standard). This is because the baseComponentclass has to perform initialisation both before (to set up the groups etc.) and after (to set the anchor positions for annotations) the component’s shape setup.