Monopole¶
- class manim_eng.components.base.monopole.Monopole(direction: ndarray[tuple[Any, ...], dtype[float64]], **kwargs: Any)¶
Bases:
ComponentBase class for monopole components, such as grounds and rails.
Creates a single terminal in the direction of
directionwith its start at the origin.- Parameters:
direction (Vector3D) – The direction the terminal of the component should face.
Attributes
Monopole.animateUsed to animate the application of any method of
self.Monopole.animation_overridesMonopole.colorMonopole.depthThe depth of the mobject.
Monopole.fill_colorIf there are multiple colors (for gradient) this returns the first one
Monopole.heightThe height of the mobject.
Monopole.n_points_per_curveMonopole.sheen_factorMonopole.stroke_colorGet the terminal of the component.
Monopole.terminalsThe list of terminals of the component.
Monopole.widthThe width of the mobject.
- align_monopole(other: Terminal | ndarray[tuple[Any, ...], dtype[float64]] | Node | Monopole, direction: ndarray[tuple[Any, ...], dtype[float64]] | None = None) Self¶
Aligns the monopole’s terminal with another point or component.
Moves this component along the line perpendicular to
directionsuch that the line between the end of this component’s terminal andotherhas direction vectordirection.- Parameters:
- Raises:
ValueError – If
otherbelongs to this component (if it is aTerminal) or ifotheris this component (if it is aNodeorMonopole).
Notes
In geometric terms, the component in moved such that the end of this monopole’s terminal is at the intersection of the lines that
- Have direction vector perpendicular to
directionand go through the current position of the end of this monopole’s terminal; and
- Have direction vector perpendicular to
- Have direction vector
directionand go through the end of other(in the case that it is aTerminal) or throughother(in the case that it is a point).
- Have direction vector
- clear_annotation() Self¶
Fails for monopoles, as they do not have annotations.