Dot3D¶
Qualified name: manim.mobject.three\_d.three\_dimensions.Dot3D
- class Dot3D(point=array([0., 0., 0.]), radius=0.08, color=ManimColor('#FFFFFF'), resolution=(8, 8), **kwargs)[source]¶
Bases:
SphereA spherical dot.
- Parameters:
point (Point3D) – The location of the dot.
radius (float) – The radius of the dot.
color (ManimColor) – The color of the
Dot3D.resolution (int | tuple[int, int] | None) – The number of samples taken of the
Dot3D. A tuple can be used to define different resolutions foruandvrespectively.kwargs (Any)
Examples
Example: Dot3DExample ¶
from manim import * class Dot3DExample(ThreeDScene): def construct(self): self.set_camera_orientation(phi=75*DEGREES, theta=-45*DEGREES) axes = ThreeDAxes() dot_1 = Dot3D(point=axes.coords_to_point(0, 0, 1), color=RED) dot_2 = Dot3D(point=axes.coords_to_point(2, 0, 0), radius=0.1, color=BLUE) dot_3 = Dot3D(point=[0, 0, 0], radius=0.1, color=ORANGE) self.add(axes, dot_1, dot_2,dot_3)
class Dot3DExample(ThreeDScene): def construct(self): self.set_camera_orientation(phi=75*DEGREES, theta=-45*DEGREES) axes = ThreeDAxes() dot_1 = Dot3D(point=axes.coords_to_point(0, 0, 1), color=RED) dot_2 = Dot3D(point=axes.coords_to_point(2, 0, 0), radius=0.1, color=BLUE) dot_3 = Dot3D(point=[0, 0, 0], radius=0.1, color=ORANGE) self.add(axes, dot_1, dot_2,dot_3)Methods
Attributes
alwaysCall a method on a mobject every frame.
animateUsed to animate the application of any method of
self.animation_overridescolordepthThe depth of the mobject.
fill_colorIf there are multiple colors (for gradient) this returns the first one
heightThe height of the mobject.
n_points_per_curvesheen_factorstroke_colorwidthThe width of the mobject.
- _original__init__(point=array([0., 0., 0.]), radius=0.08, color=ManimColor('#FFFFFF'), resolution=(8, 8), **kwargs)¶
Initialize self. See help(type(self)) for accurate signature.
- Parameters:
point (Point3D)
radius (float)
color (ParsableManimColor)
resolution (int | tuple[int, int] | None)
kwargs (Any)
- Return type:
None