File Exchange

image thumbnail

solar system formation 2d

version 1.0 (8 KB) by

2d balls with friction and gravitations



View License
There are 400 balls in 2d that has finite size and can pass trough each other with friction. At distances more than size they have gravitation forces. Initially system rotated slightly as global. Code well vectorized, bsxfun used.

The result of simulation is here:

It is possible to see sun formation but no planets. Probably because to few points used (not enough computation power).

run test2.m to start simulation and recodring to history file. set history file name in history_viewer_cluster.m and run history_viewer_cluster.m

Comments and Ratings (1)

MATLAB Release
MATLAB 7.11 (R2010b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video