ManualWire¶
- class manim_eng.circuits.wire.ManualWire(start: Terminal, end: Terminal, corner_points: Sequence[ndarray[tuple[Any, ...], dtype[float64]]] | None = None, updating: bool = False)¶
Bases:
WireBaseWire that requires its path to be manually specified.
- Parameters:
start (Terminal) – The terminal the wire starts at.
end (Terminal) – The terminal the wire ends at.
corner_points (Sequence[Point3D], optional) – The vertices the wire should have between the two terminals. Should not include the positions of the two terminals, as these are inserted automatically when the wire is drawn. These should be in order from
starttoend. If left unspecified, this is taken to be[]and the wire will directly connect the start and end terminals.updating (bool) – Whether the ends of the wire should update automatically to keep connected to the terminals. This is disabled by default. If this is enabled, it is recommended to attach another updater that will update
corner_pointsto prevent strange artefacts.
- Raises:
ValueError – If
startandendare the same.
Attributes
ManualWire.animateUsed to animate the application of any method of
self.ManualWire.animation_overridesManualWire.colorManualWire.depthThe depth of the mobject.
ManualWire.fill_colorIf there are multiple colors (for gradient) this returns the first one
ManualWire.heightThe height of the mobject.
ManualWire.n_points_per_curveManualWire.sheen_factorManualWire.stroke_colorManualWire.widthThe width of the mobject.
- get_corner_points() list[ndarray[tuple[Any, ...], dtype[float64]]]¶
Get the corner points of the wire.
Returns the vertices of the wire, not including the end points (i.e. at the start and end terminals).
- set_corner_points(points: Sequence[ndarray[tuple[Any, ...], dtype[float64]]]) Self¶
Set the corner points of the wire.
- Parameters:
points (Sequence[Point3D]) – The vertices the wire should have between the two terminals. Should not include the positions of the two terminals, as these are inserted automatically when the wire is drawn. These should be in order from
starttoend.