SuyashMore / 2D-Sphere-Collision-Simulation

Gravity and 2d-Impluse Resolution Simulation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C++ 2D Particle Simulation

Gravity and Collision Simulation using C++ SFML Graphics Library.

Build and Run with Microsoft Visual Studio 2017

Variable Parameters (change in simulation.cpp)

#define WALL_FRICTION 0.5f
#define FLOOR_FRICTION 0.8f
#define CEIL_FRICTION 0.3f
#define GRAVITY 5.0f
#define D_TIME 0.003f

#define RADIUS 20.0f
#define FORCE_MULTIPLIER 0.2f
#define MINIMUM_FORCE_TO_RELEASE 20.0f
#define CLOCK_CORRECTION 0.5f

Example

alt text

References

How to Create a Custom 2D Physics Engine: The Basics and Impulse Resolution

About

Gravity and 2d-Impluse Resolution Simulation


Languages

Language:C++ 100.0%