Circuit¶
- class manim_eng.circuits.circuit.Circuit(*components: Component)¶
Bases:
VMobjectCircuit manager to conveniently handle components and their connections.
- Parameters:
*components (Component) – Components to add to the circuit at initialisation.
Attributes
Circuit.animateUsed to animate the application of any method of
self.Circuit.animation_overridesCircuit.colorCircuit.depthThe depth of the mobject.
Returns a list of all components (including nodes) in the circuit.
Circuit.fill_colorIf there are multiple colors (for gradient) this returns the first one
Circuit.heightThe height of the mobject.
Circuit.n_points_per_curveCircuit.sheen_factorCircuit.stroke_colorCircuit.widthThe width of the mobject.
- add(*components: Component) Self¶
Add one or more components to the circuit.
- Parameters:
*components (Component) – The component(s) to add.
- disconnect(*components_or_terminals: Component | Terminal) Self¶
Disconnect the given components and/or terminals from one another.
Each wire is checked to see if both the start and end terminals have been passed or belong to a component that was passed. If this is the case, the wire will be removed.
- Parameters:
*components_or_terminals (Component | Terminal) – The group of components and terminals to disconnect from one another.
- Raises:
ValueError – If any passed terminal does not belong to a component in this circuit.
See also
isolateRemove a wire if either of its ends is specified.
- property elements: list[Component]¶
Returns a list of all components (including nodes) in the circuit.
- isolate(*components_or_terminals: Component | Terminal) Self¶
Remove all wires attached to each given terminal or component.
Each wire is checked to see if either of its ends is a passed terminal or a terminal on a passed component. If this is the case, the wire will be removed.
- Parameters:
*components_or_terminals (Component | Terminal) – The components and terminals to completely disconnect from the circuit.
- Raises:
ValueError – If any passed terminal does not belong to a component in this circuit.
See also
disconnectRemove a wire if both its ends are specified.