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
Bodies refer to pymunk's object.
Make any mobject movable by gravity.
Make any mobject interactable by rigid objects.
Used internally
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
’sadd
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