Home▸Articles▸Physics & Mechanics

Gravity Playground: A 2D Simulation of Gravitational Forces and Collisions

Explore the fundamental principles that govern motion in a simplified gravitational environment.

mysimulator teamUpdated June 2026≈ 3 min read▶ Open the simulation

What Gravity Playground Is

Gravity Playground is an interactive simulation that allows users to drop various geometric shapes onto a floor and observe their behavior under the influence of gravity. The shapes can be circles, squares, triangles, or pentagons, each with its own mass and shape characteristics.

Users can manipulate several parameters such as toggling gravity on and off, adjusting the bounciness (restitution) of objects, and resetting the simulation to start over.

How Gravity Affects Objects

Gravity is a fundamental force that attracts any two masses in the universe. In this 2D environment, gravity acts downward, pulling all objects toward the floor. The acceleration due to gravity (g) is constant and approximately equal to 9.81 m/s^2 on Earth.

The mass of an object determines its gravitational pull but does not affect how it falls in a vacuum or when air resistance is negligible.

live demo · related simulation● LIVE

Elastic Collisions

When objects collide, they interact with each other according to the laws of conservation of momentum and energy. In this simulation, collisions are elastic, meaning that no kinetic energy is lost during the collision; both linear momentum and kinetic energy are conserved.

The bounciness (restitution coefficient) can be adjusted using a slider, allowing users to observe how different levels of elasticity affect the outcomes of collisions.

Real-World Applications

Understanding gravitational forces and elastic collisions is crucial in many fields such as engineering, physics, and robotics. For example, designing bouncy balls or understanding the behavior of objects in space requires a deep comprehension of these principles.

In video game development, accurate modeling of gravity and collision mechanics enhances player experience by making virtual environments more realistic.

Frequently asked questions

How does changing the bounciness affect collisions?

Adjusting the bounciness slider changes how much kinetic energy is conserved during a collision. Higher values result in more elastic collisions, while lower values lead to less bounce and potentially more deformation.

Why are some shapes more likely to stack than others?

The shape of an object influences its ability to stack due to differences in surface area and geometry. For example, circles or spheres tend to roll rather than stack, while flat objects like squares can nestle together more easily.

How does gravity affect the motion of objects?

Gravity acts as a constant downward force that accelerates objects towards the floor at a rate of approximately 9.81 m/s^2 on Earth, causing them to fall and interact with other objects in the environment.

What is restitution in collisions?

Restitution refers to the coefficient of restitution, which measures how much kinetic energy is conserved during a collision. A value of 1 means a perfectly elastic collision (like bouncing), while values closer to 0 indicate more inelastic behavior.

Try it live

Everything above runs in your browser — open Gravity Playground (2D) and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Gravity Playground (2D) simulation

What did you find?

Add reproduction steps (optional)