RandalMunroeSourceBase¶
- class manim_eng.components.base.xkcd.RandalMunroeSourceBase(pattern: Sequence[bool], voltage: str | None = None, **kwargs: Any)¶
Bases:
VoltageSourceBaseBase class for Randall Munroe’s cell circuit symbols.
- Parameters:
pattern (Sequence[bool]) – The pattern of long to short plates.
Truedenotes long,Falsedenotes short.voltage (str | None) – Voltage label to set on creation, if desired. Takes a TeX math mode string.
Attributes
RandalMunroeSourceBase.animateUsed to animate the application of any method of
self.RandalMunroeSourceBase.animation_overridesRandalMunroeSourceBase.anodeReturn the anode (positive terminal) of the source.
RandalMunroeSourceBase.cathodeReturn the cathode (negative terminal) of the source.
RandalMunroeSourceBase.colorRandalMunroeSourceBase.depthThe depth of the mobject.
RandalMunroeSourceBase.fill_colorIf there are multiple colors (for gradient) this returns the first one
RandalMunroeSourceBase.heightThe height of the mobject.
RandalMunroeSourceBase.leftReturn the left-hand terminal of the component.
RandalMunroeSourceBase.n_points_per_curveRandalMunroeSourceBase.negativeReturn the negative (left-hand) terminal of the source.
RandalMunroeSourceBase.positiveReturn the positive (right-hand) terminal of the source.
RandalMunroeSourceBase.rightReturn the right-hand terminal of the component.
RandalMunroeSourceBase.sheen_factorRandalMunroeSourceBase.stroke_colorRandalMunroeSourceBase.terminalsThe list of terminals of the component.
RandalMunroeSourceBase.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.