Your browser does not support the canvas tag.

A Simple Gravity Model

Explanation: This is a simple demonstration of the gravity model showing the force between objects based on their mass and distance. Orange dots depict an object with mass equivalent to their area and the white line drawn between them shows the force between two objects. Though it is not a perfectly detailed model, the results are quite stunning when there is a large number of objects with distinct clusters.

Instructions: Simply click the canvas to add a node. Click a existing node to select it and click and drag to move it around the canvas. When selected, the size of a node can be increased or decreased by pressing '+' and '-' key in the keyboard. All nodes can be deselected by pressing 'd' key and the whole sketch can be reset with the 'r' key.

Built with Processing and Processing.js