If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
planetarium (newtonian gravity simulator)
5 posts
• Page 1 of 1
planetarium (newtonian gravity simulator)
A very quick fun project. Simulator of Newtonian gravity. You can add celestial bodies (with specific mass, position and velocity vectors) and observe how they behave under each others gravitational influence. By clicking on a planet, you can center the view on that planet. You can change the zoom factor ( 1~ 1AU per 1 grid, 20 ~ 1AU per 20 grids)
Time scale can be set anywhere from real-time (very boring) through week per second upto a year per second. Higher settings may cause the orbits to go havoc because of time-sampling precision.
The controls are in following units:
velocity - m/s
position - AU (astronomical unit = 150million km = radius of earth's orbit)
mass - earth-mass (the mass of earth = 5.97*10^24 kg)
There is also an option to "add solar system" which adds sun and all 8 planets of the solar system (approximated version).
Have fun
Time scale can be set anywhere from real-time (very boring) through week per second upto a year per second. Higher settings may cause the orbits to go havoc because of time-sampling precision.
The controls are in following units:
velocity - m/s
position - AU (astronomical unit = 150million km = radius of earth's orbit)
mass - earth-mass (the mass of earth = 5.97*10^24 kg)
There is also an option to "add solar system" which adds sun and all 8 planets of the solar system (approximated version).
Have fun
- Attachments
-
- planetary simulator (newtonian).fsm
- (4.45 KiB) Downloaded 1036 times
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: planetarium (newtonian gravity simulator)
KG that is AMAZING!
I found that it's really tricky to make a change or add a planet to the Solar System without causing the whole system to blow up. If that's really the case then it implies, rather worryingly, that the stability of our own system could be destroyed even without a near miss to the Earth. It would just take a massive object to enter our system pretty much anywhere and wreak havoc very easily.
It simply amazes me what a clever person can achieve with such a small block of Ruby code and this demonstrates the power of the language admirably, as well as your coding skills and creative vision.
Cheers
A very worried Spogg
I found that it's really tricky to make a change or add a planet to the Solar System without causing the whole system to blow up. If that's really the case then it implies, rather worryingly, that the stability of our own system could be destroyed even without a near miss to the Earth. It would just take a massive object to enter our system pretty much anywhere and wreak havoc very easily.
It simply amazes me what a clever person can achieve with such a small block of Ruby code and this demonstrates the power of the language admirably, as well as your coding skills and creative vision.
Cheers
A very worried Spogg
-
Spogg - Posts: 3327
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: planetarium (newtonian gravity simulator)
Instead of demonstrating clever coding or power of ruby, this example rather demonstrates the simplicity of rules (of Newtonian physics) and the remarkable patterns that emerge from them.
what is even more remarkable stable orbits only exist in 3D, where strength of force-fields (gravity and electromagnetism) decay by factor of r^2 (force is being spread on a surface of a sphere). In 1D and 2D any two objects that attract each other are bound to spiral into each other and crash, while in 4D and above they just curve each other's trajectories when close to each other and do not affect each other once they get further away.
But to make you calm, nearest star is 160000times further than Neptun (the edge of the view on my simulator when scale is set to 1AU per grid). It is very unlikely for a celestal body to pass near solar system close enough to disrupt orbits of planets. What can happen though is to disrupt orbits of Oort cloud comets. They orbit as far as 0.8 Light-years from sun (1/5 the distance from nearest star). They are impossible to detect unless they are as close as Jupiter, which is basically too late (few months/weeks from hitting earth). Luckily Jupiter is massive and eats such comets for dinner. It is believed that Jupiter is the sole reason why we aren't hit by comets much more often (understand: order of 10milion years instead of 100M years like we are now).
Solar system is rather special. It has rocky planets on the inside and gas giants on the outside (most systems have it vice versa). And also we have only one sun (most stars are double and triple systems, which don't support orbits in habitable zone), not to mention sun itself has above average size (though sun is in the middle of the scale, statistically most stars are smaller).
It is believed that most planets in the universe are rogue planets, which were catapulted out of their solar systems. So far we have discovered only a few (because they are small and very dim). Remarkably, such planets might be the origin or life, because when universe was only few milion years old, it's temperature was matching habitable zone for a few milion years. Also the first life on earth used earth's radioactive core as a source of energy, which happens to be only energy source on rouge planets. Based on growth of diversity of life on earth (today and in the past based on fossils) the very first organism can be extrapolated 8bilion years ago - far before earth even existed. The stability and instability of planetary orbits may be equally responsible for our very existence...
what is even more remarkable stable orbits only exist in 3D, where strength of force-fields (gravity and electromagnetism) decay by factor of r^2 (force is being spread on a surface of a sphere). In 1D and 2D any two objects that attract each other are bound to spiral into each other and crash, while in 4D and above they just curve each other's trajectories when close to each other and do not affect each other once they get further away.
But to make you calm, nearest star is 160000times further than Neptun (the edge of the view on my simulator when scale is set to 1AU per grid). It is very unlikely for a celestal body to pass near solar system close enough to disrupt orbits of planets. What can happen though is to disrupt orbits of Oort cloud comets. They orbit as far as 0.8 Light-years from sun (1/5 the distance from nearest star). They are impossible to detect unless they are as close as Jupiter, which is basically too late (few months/weeks from hitting earth). Luckily Jupiter is massive and eats such comets for dinner. It is believed that Jupiter is the sole reason why we aren't hit by comets much more often (understand: order of 10milion years instead of 100M years like we are now).
Solar system is rather special. It has rocky planets on the inside and gas giants on the outside (most systems have it vice versa). And also we have only one sun (most stars are double and triple systems, which don't support orbits in habitable zone), not to mention sun itself has above average size (though sun is in the middle of the scale, statistically most stars are smaller).
It is believed that most planets in the universe are rogue planets, which were catapulted out of their solar systems. So far we have discovered only a few (because they are small and very dim). Remarkably, such planets might be the origin or life, because when universe was only few milion years old, it's temperature was matching habitable zone for a few milion years. Also the first life on earth used earth's radioactive core as a source of energy, which happens to be only energy source on rouge planets. Based on growth of diversity of life on earth (today and in the past based on fossils) the very first organism can be extrapolated 8bilion years ago - far before earth even existed. The stability and instability of planetary orbits may be equally responsible for our very existence...
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: planetarium (newtonian gravity simulator)
Fascinating!
So Mr Spogg can sleep tonight.
Thanks for that KG.
Cheers
Spogg
So Mr Spogg can sleep tonight.
Thanks for that KG.
Cheers
Spogg
-
Spogg - Posts: 3327
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: planetarium (newtonian gravity simulator)
Strangely I was unable to put a moon to orbit around earth. Basically moon shares the orbit with earth, while they wobble each others orbits, giving impression they orbit each other. Whenever I try to put moon around earth, while earth orbits sun, the moon seems completely independent of earth.
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 4 guests