VConstraint¶
Qualified name: manim\_pymunk.constraints.constraint.VConstraint
- class VConstraint(**kwargs)[source]¶
Bases:
VGroupThe Manim base class for visualizing Pymunk physical constraints.
Methods
Installs physical constraints into the Pymunk physical space.
Updates the visual representation of constraints in real time.
Attributes
alwaysCall a method on a mobject every frame.
animateUsed to animate the application of any method of
self.colordepthThe 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.
- __check_data()¶
Verify the validity of constraint parameters. Requires subclass implementation
- _abc_impl = <_abc._abc_data object>¶
- _bezier_t_values: npt.NDArray[float]¶
- _original__init__(**kwargs)¶
Initialize self. See help(type(self)) for accurate signature.
- animation_overrides = {}¶
- background_image: Image | str | None¶
- background_stroke_color: ManimColor¶
- background_stroke_opacity: float¶
- background_stroke_width: float¶
- cap_style: CapStyleType¶
- close_new_points: bool¶
- install(space)[source]¶
Installs physical constraints into the Pymunk physical space. This method should be overridden by subclasses to implement the following:
Create Pymunk constraint objects
Initialize the vision component
Add constraints to the physical space
Bind an updater to keep the vision synchronized.
- Parameters:
space (Space)
- joint_type: LineJointType¶
- make_smooth_after_applying_functions: bool¶
- mob_updater(mob, dt)[source]¶
Updates the visual representation of constraints in real time. This method should be overridden by subclasses and called in every frame, to synchronize the state of the visual components and the physics engine regarding constraints.
- Parameters:
mob (Mobject)
dt (float)
- n_points_per_cubic_curve: int¶
- pre_function_handle_to_anchor_scale_factor: float¶
- shade_in_3d: bool¶
- submobjects: list[VMobject]¶
- tolerance_for_point_equality: float¶