Skip to content
No description, website, or topics provided.
C++
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Jelly Square
README.md

README.md

physics-engine

This C++/Qt5.7 project is a simulation of springy & viscous materials using a damped spring model, composed of 16 nodes connected by damped springs. Each square of 4 nodes acts as an element with its own internal pressure.
Click and drag nodes using the left mouse button, fix them in place with the right. Adjust physics coefficients with the sliders:
MASS: Controls the mass of all nodes
SPRING COEFFICIENT: Coefficient of the springs' resistance to being extended or compressed. Higher value = tighter spring.
DAMPING COEFFICIENT: Coefficient of the springs' resistance to velocity.
RESISTANCE: Rough simulation of friction and air resistance that is a multiplied by the velocity of each node. 0-> No movement, 100-> No resistance to velocity. Value of 100 may result in gradual increase of velocity due to floating point rounding errors.
INTERNAL PRESSURE: Coefficient of pressure acting on each node from the centre of mass of the elements it is part of.

PRESS RESET to reset the nodes to their original positions and velocity. Note that the starting resistance is 0, so until this is turned up the nodes will not move.

Limitations:

  1. INVERSION- Currently nodes are able to cross over springs. This results in the internal pressure calculations driving nodes around the screen.
  2. COEFFICIENTS- The maximum viable value of the coefficients is dependent on each other and this is not yet accounted for in the simulation, so certain configurations may cause the nodes to fly off the screen. In this case the simulation will automatically be reset.
You can’t perform that action at this time.