File Exchange

image thumbnail

N-body animation

version 1.31 (1.54 KB) by Silas Henderson
System of point-masses following inverse square law

4 Downloads

Updated 17 Sep 2020

View Version History

View License

Short script for N-body simulation. Parameters adjustable in script.

https://youtu.be/6kEXKts7JBY

Notes:
Default is 50 planets.
Try 15 planets if animation is slow/chunky.
Uses SI Euler, so main computational cost is graphics.
Dot sizes are proportional to planet masses.
Feel free to modify/improve.

Cite As

Silas Henderson (2020). N-body animation (https://www.mathworks.com/matlabcentral/fileexchange/69834-n-body-animation), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R2018b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Communities
More Files in the  Distance Learning Community

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!