SpaceScene#

Qualified name: manim\_physics.rigid\_mechanics.rigid\_mechanics.SpaceScene

class SpaceScene(renderer=None, **kwargs)[source]#

Bases: Scene

A basis scene for all of rigid mechanics. The gravity vector can be adjusted with self.GRAVITY.

Methods

add_body

Bodies refer to pymunk's object.

make_rigid_body

Make any mobject movable by gravity.

make_static_body

Make any mobject interactable by rigid objects.

setup

Used internally

stop_rigidity

Stop the mobjects rigidity

Attributes

GRAVITY

camera

add_body(body)[source]#

Bodies refer to pymunk’s object. This method ties Mobjects to their Bodies.

Parameters:

body (Mobject) –

make_rigid_body(*mobs, elasticity=0.8, density=1, friction=0.8)[source]#

Make any mobject movable by gravity. Equivalent to Scene’s add function.

Parameters:
  • mobs (Mobject) – The mobs to be made rigid.

  • elasticity (float) –

  • density (float) –

  • friction (float) – The attributes of the mobjects in regards to interacting with other rigid and static objects.

make_static_body(*mobs, elasticity=1, friction=0.8)[source]#

Make any mobject interactable by rigid objects.

Parameters:
  • mobs (Mobject) – The mobs to be made static.

  • elasticity (float) –

  • friction (float) – The attributes of the mobjects in regards to interacting with rigid objects.

Return type:

None

setup()[source]#

Used internally

stop_rigidity(*mobs)[source]#

Stop the mobjects rigidity

Parameters:

mobs (Mobject) –

Return type:

None