This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

Nichodon
Nichodon presents ...

2016/5/14

Planets

Old account: NikZ
--------------------
Planets
v. 0.8.1 (6-16-17)
--------------------

--- To add a planet, select a mass from the scroll bar, then click and drag on the screen. The more you drag, the more velocity the planet will have. The scroll bar is logarithmic.

--- The yellow trail is the planet's motion in relation to the selected planet. The green trail signifies the planet's actual position in space.

--- Use the arrow keys to select a planet. Then you can change the name of the planet by clicking on the textbox and typing in the new name. Click anywhere else to finish.

--- Play / pause and show / hide buttons are self-explanatory, C means clear, R means remove the selected body. The theme can be changed by clicking on the lower right box.

--- The red crosshair is the barycenter of the system.

--- Upcoming features include detecting escape velocity, display more planet info, and planet simulations.

--- The way I made this was every act, the world clears the image and redraws it (No Actors).

--------------------
Programmer: Me
--------------------

Works on any browser if you append "?js=true" to the end of the URL! (I still need to fix font)

I am making a better version of this at nichodon.github.io/programs/0005

7406 views / 22 in the last 7 days

5 votes | 0 in the last 7 days

Tags: simulation physics nichodon

This scenario is a member of: Nichodon's Suff


Your browser does not support the canvas tag.
A new version of this scenario was uploaded on 2016-07-23 17:31:25 UTC 0.7.1: -Made grid togglable
A new version of this scenario was uploaded on 2016-07-24 22:25:13 UTC 0.7.2: -Sliders easier to use
Game/maniacGame/maniac

2016/7/25

The reason you would use the runge-kutta method is so you can approximate the new location of the planets better. The book "Physics for game programmers" by Grant Palmer has a really good explaination for why you should use the Runge-Kutta method for approximation in a scenario like this. I am going to be using this in my own orbital simulation soon.
NichodonNichodon

2016/7/26

I see. From what I understand, the Runge-Kutta method has many applications in ODE's.
Game/maniacGame/maniac

2016/7/26

Yes
Game/maniacGame/maniac

2016/8/1

Actually now I have done the math. I don't think you can use the runge-kutta method in this type of problem. :(
A new version of this scenario was uploaded on 2016-08-11 23:50:07 UTC 0.7.3: -Added barycenter trails
A new version of this scenario was uploaded on 2016-12-10 19:01:07 UTC 0.7.4: -Added position info
A new version of this scenario was uploaded on 2016-12-11 20:01:10 UTC 0.8: -Added distance info -Tweaks -Bug fixes
A new version of this scenario was uploaded on 2017-06-17 00:35:06 UTC 0.8.1: -Changed title screen -Bug fixes

See all comments

Want to leave a comment? You must first log in.

Who likes this?

NSC Nosson1459 Game/maniac Rugbug_Redfern SPower