Dot¶
- class Dot(p: Point, disk: Disk, **kwargs)[source]¶
The Poincaré disk equivalent to Manim’s Dot.
This is basically a convenience wrapper, that automatically handles scaling in the
Disk
associated with the dot.Examples
Example: DotExample ¶
from manim import * from hmanim.poincare import Disk, Dot, Point class DotExample(Scene): def construct(self): disk = Disk( radius=3, color=WHITE, ) self.add(disk) dot = Dot( Point(0.75, 0.25), disk=disk, color=BLUE, ) self.add(dot)
from hmanim.poincare import Disk, Dot, Point class DotExample(Scene): def construct(self): disk = Disk( radius=3, color=WHITE, ) self.add(disk) dot = Dot( Point(0.75, 0.25), disk=disk, color=BLUE, ) self.add(dot)
- move_to(p: Point)[source]¶
Move the dot to the given
hmanim.poincare.point.Point
.- Parameters:
p (hmanim.poincare.point.Point) – The point to move the dot to.
- class DotRotate(mobject=None, *args, use_override=True, **kwargs)[source]¶
An animation that rotates a
Dot
around the origin.Examples
Example: DotRotateExample ¶
from manim import * from hmanim.poincare import Disk, Dot, DotRotate, Point class DotRotateExample(Scene): def construct(self): disk = Disk( radius=3, color=WHITE, ) self.add(disk) dot = Dot( Point(0.75, 0.0), disk=disk, color=BLUE, ) self.add(dot) self.play(DotRotate(dot, TAU / 4))
from hmanim.poincare import Disk, Dot, DotRotate, Point class DotRotateExample(Scene): def construct(self): disk = Disk( radius=3, color=WHITE, ) self.add(disk) dot = Dot( Point(0.75, 0.0), disk=disk, color=BLUE, ) self.add(dot) self.play(DotRotate(dot, TAU / 4))
- interpolate_mobject(alpha: float) None [source]¶
Interpolates the mobject of the
Animation
based on alpha value.- Parameters:
alpha – A float between 0 and 1 expressing the ratio to which the animation is completed. For example, alpha-values of 0, 0.5, and 1 correspond to the animation being completed 0%, 50%, and 100%, respectively.
- class DotTranslate(mobject=None, *args, use_override=True, **kwargs)[source]¶
An animation that translates a
Dot
along the x-axis.Examples
Example: DotTranslateExample ¶
from manim import * from hmanim.poincare import Disk, Dot, DotTranslate, Point class DotTranslateExample(Scene): def construct(self): disk = Disk( radius=3, color=WHITE, ) self.add(disk) dot = Dot( Point(-0.75, 0.25), disk=disk, color=BLUE, ) self.add(dot) self.play(DotTranslate(dot, 3))
from hmanim.poincare import Disk, Dot, DotTranslate, Point class DotTranslateExample(Scene): def construct(self): disk = Disk( radius=3, color=WHITE, ) self.add(disk) dot = Dot( Point(-0.75, 0.25), disk=disk, color=BLUE, ) self.add(dot) self.play(DotTranslate(dot, 3))
- interpolate_mobject(alpha: float) None [source]¶
Interpolates the mobject of the
Animation
based on alpha value.- Parameters:
alpha – A float between 0 and 1 expressing the ratio to which the animation is completed. For example, alpha-values of 0, 0.5, and 1 correspond to the animation being completed 0%, 50%, and 100%, respectively.