ComplexValueTracker#
Qualified name: manim.mobject.value\_tracker.ComplexValueTracker
- class ComplexValueTracker(value=0, **kwargs)[source]#
Bases:
ValueTracker
Tracks a complex-valued parameter.
When the value is set through
animate
, the value will take a straight path from the source point to the destination point.Examples
Example: ComplexValueTrackerExample ¶
from manim import * class ComplexValueTrackerExample(Scene): def construct(self): tracker = ComplexValueTracker(-2+1j) dot = Dot().add_updater( lambda x: x.move_to(tracker.points) ) self.add(NumberPlane(), dot) self.play(tracker.animate.set_value(3+2j)) self.play(tracker.animate.set_value(tracker.get_value() * 1j)) self.play(tracker.animate.set_value(tracker.get_value() - 2j)) self.play(tracker.animate.set_value(tracker.get_value() / (-2 + 3j)))
Methods
Get the current value of this value tracker as a complex number.
Sets a new complex value to the ComplexValueTracker
Attributes
animate
Used to animate the application of any method of
self
.animation_overrides
depth
The depth of the mobject.
height
The height of the mobject.
width
The width of the mobject.