A Simple Gravity Model

with one comment

Another experiment with processing I did in the last 2 days. This time it is an interactive visualization of newton’s law of gravity applied over a bunch of objects. It 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 visually when there is a large number of objects with distinct clusters. The instructions are as below,

  • Click the canvas to add an object.
  • Click a existing objectto select it
  • Click and drag an existing object to move it around the canvas
  • When selected, the size of an object can be increased or decreased by pressing ‘+’ and ‘-‘ key in the keyboard
  • Objects can be deselected by pressing ‘d’ key
  • The whole sketch can be reset with the ‘r’ key.

You can click the image to go to the interactive demo or follow the link here: http://balaspa.50webs.com/processing/gravity/

Advertisements

Written by sbmkvp

February 12, 2013 at 8:20 pm

One Response

Subscribe to comments with RSS.

  1. […] one is very similar to A Simple Gravity Model except that this one is made with javascript (Raphael.js)  and does not has the gravity model for […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: