constraint¶
Classes
The Manim base class for visualizing Pymunk physical constraints. |
- class VConstraint(**kwargs)[source]¶
Bases:
VGroupThe Manim base class for visualizing Pymunk physical constraints.
- 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¶