VConstraint

Qualified name: manim\_pymunk.constraints.constraint.VConstraint

class VConstraint(**kwargs)[source]

Bases: VGroup

The Manim base class for visualizing Pymunk physical constraints.

Methods

install

Installs physical constraints into the Pymunk physical space.

mob_updater

Updates the visual representation of constraints in real time.

Attributes

always

Call a method on a mobject every frame.

animate

Used to animate the application of any method of self.

animation_overrides

color

depth

The depth of the mobject.

fill_color

If there are multiple colors (for gradient) this returns the first one

height

The height of the mobject.

n_points_per_curve

sheen_factor

stroke_color

width

The 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:

  1. Create Pymunk constraint objects

  2. Initialize the vision component

  3. Add constraints to the physical space

  4. 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