Author Topic: SolarSystem (above)  (Read 5299 times)

0 Members and 1 Guest are viewing this topic.

Offline mynameispaul

  • Newbie
  • Posts: 49
    • View Profile
SolarSystem (above)
« on: February 08, 2019, 11:53:00 pm »
This program simulates the movement of the solar system as seen from above.
I think its pretty simple to use so for now i'm not going to write a bunch of help text...but let me know if anyone needs help anyways.
* ASCII_RGB.ini (Filesize: 0.2 KB, Downloads: 184)
* SolarSystem (above).bas (Filesize: 20.7 KB, Downloads: 215)
* SolarSystem.ini (Filesize: 0.77 KB, Downloads: 208)
* SolarSystemData.ffd (Filesize: 0.13 KB, Downloads: 213)
* SolarSystemData.tab (Filesize: 0.53 KB, Downloads: 192)

Offline mynameispaul

  • Newbie
  • Posts: 49
    • View Profile
Re: SolarSystem (above)
« Reply #1 on: February 09, 2019, 01:01:20 am »
 
ss.jpg
   
updated versions of:
SolarSystem (above).bas
SolarSystem.ini

put a user modified field 'OneSecCount' in the config for easier user control.
Program will work even without these updated versions.
« Last Edit: February 09, 2019, 01:35:07 am by mynameispaul »

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: SolarSystem (above)
« Reply #2 on: February 09, 2019, 07:33:00 am »
This VERY cool.

I have had an interest in Astronomy since as long as I could remember. I have always wanted to write a computer simulation but lacked the skill... I would like to know how you managed to write this, either of your own work or someone else's work, but just to know how.

I can remember calculating Lunar eclipses, using just a hand held calculator, and finding out 40 minutes later that there wasn't going to be one... That was just an eclipse. But to calculate the 'average' positions of all the planets would take... I don't know how long it would take... because I didn't have the patience to try... *sigh*

But, THIS program... Calculating all the planets in mere microseconds... Mind blowing. What reference books (if any) did you use. Did you write this program yourself? Whether you did or not, I am impressed with the results... I'm going to guess that you have calculated the 'average' positions of the planets... because... Most of the orbits are not circular (for this presentation, average is fine and besides, it's easier to calculate circular orbits...
I like the "above" method as it's so much "neater" than the "ecliptic" view. I will NOT go into the debate about downgrading the "planet" status of Pluto, but the one thing I did notice is that in this presentation, Pluto's orbit does not move inside of Neptune's orbit. Another reason for my guess about "average" positions. But what you have done is REALLY good. Well done!
Logic is the beginning of wisdom.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: SolarSystem (above)
« Reply #3 on: February 09, 2019, 08:27:47 am »
I'd say it;s rather plain, but some accessories could fix that. Hey, maybe BPlus could code in an asteroid belt and a couple of rings for Saturn? Look Mark, more balls. Go get 'em boy. Sorry, inside the Milky Way joke.

I would have killed for this in the 5th grade. Darn boring paper machete solar systems with light bulb sun. Oh well, it was the 1960's so what are you going to do? The distance ratios were impossible to depict back then, too.

Hey, did you guys know the Mayans represented another planet, about 3x the orbital distance away from Pluto? If discovered, I hope this code is open source!

Kidding aside, thanks for posting this. I don't think I've seen such a simulation in over 20 some years. You think if you were adding up time, it would be 20 sum years, but I digress...

Pete

Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline mynameispaul

  • Newbie
  • Posts: 49
    • View Profile
Re: SolarSystem (above)
« Reply #4 on: February 09, 2019, 09:45:08 am »
johnno56,
thanks for the compliments.
I used various sites to find out how many orbits each planet takes for each one of Earth's and just went from there. Lots of sites will show orbit rates and distances.
I know Pluto does cross paths with Neptune, but trying to have it move in a non-"perfect" circle was a bit beyond my abilities. Maybe one day I will figure out how.

btw anyone, feel free to update the SolarSystemData.TAB file. You can update the CurrentAngle field (5th field) to display the planets in their current position on their orbits. Use 0-360 degrees.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: SolarSystem (above)
« Reply #5 on: February 09, 2019, 11:35:57 am »
You have until 2027 to figure it out. That's when Pluto crosses inside Nepune's orbit again.

Go to Odintown, ask for Bill, he will help.

I still can't figure how anything can travel in an elliptical orbit. It's like saying gravity is weaker at the outer aspects of the orbit. Since other stars are considerably far off, that seems hard to understand how there gravity filed could make such a difference in the orbit of one of our outer planets. Now I'm curious, and I'll have to do some research.

Ah, size matters, especially to matter. Apparently Neptune has a profound affect on Pluto's "chaotic" orbit. There is a 3:2 resonance with the orbit of Neptune, and a 17 degree incline in the orbital ellipse of Pluto. The two realign to a original origin every 500 years. The two can never collide, because Pluto orbits above Neptune at the point the orbits cross.

There would be two math challenges here. One to get the path of a chaotic elliptical orbit based on changing gravitational forces, and the other, a lot easier, to warp that 17% tilt into a 2-D plane.

Oh, I almost forgot my favorite planet, Jupiter. Earth lost out when Obama became President, but I digress... Anyway, Jupiter is so big it actually doesn't orbit the sun. The orbital path would need to be adjusted for the combined gravity Jupiter and the Sun exert on each other. That influence is negligible for other smaller planets but, "... the gas giant is so big that its center of mass with the sun, or barycenter, actually lies 1.07 solar radii from the middle of the sun— or 7% of a sun-radius above the sun's surface. Both the Sun and Jupiter orbit around that point in space.

Pete

« Last Edit: February 09, 2019, 12:01:46 pm by Pete »
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
Re: SolarSystem (above)
« Reply #6 on: February 09, 2019, 11:53:59 am »
but the one thing I did notice is that in this presentation, Pluto's orbit does not move inside of Neptune's orbit.

My gravity simulation program definitely does have Pluto moving inside Neptune at the appropriate times - uses real Ephemeris data as input.

https://www.qb64.org/forum/index.php?topic=581.0


Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: SolarSystem (above)
« Reply #7 on: February 09, 2019, 04:41:28 pm »
Ah, almost forgot about that Qwerkey!

To wrap up that discussion, it turns out that the weak-field relativistic correction to gravity simply involves adding an r^-3 term to the usual gravitational force. I'll write more about this one day... Point is, you can easily capture the recession of Mercury that way.

For Pete:

All orbits are conic sections. Slice a cone with a plane, and you get either a circle, ellipse, parabola, or hyperbola. Circles are just special ellipses and in fact are extremely rare. The non-closed shapes correspond to comets that come and go just once. For recurring objects like Haley's comet, the orbit is in fact a giant ellipse. To make things worse, the sun is not at the center - it's at a focus. Gosh then there's Kepler's laws... just too much for this venue. Anyway, orbits really are ellipses. I can see the discomfort though. Why not something symmetrical? Well it is symmetrical when you account for speed. When something gets closer to the sun, it's moving a lot faster. When it gets far away again, the motion slows. Conservation of energy is the thing that's preserved here.
« Last Edit: February 09, 2019, 04:44:45 pm by STxAxTIC »
You're not done when it works, you're done when it's right.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: SolarSystem (above)
« Reply #8 on: February 09, 2019, 04:59:18 pm »
Slice a perfectly round cone perfectly across a horizontal axis and you get a perfect circle. Slice it any other way in a single direction and you get an egg shape, whatever the hell that's called.  You need a cylinder to slice out an ellipse.

Now that we're past Geometry 101, I have to admit this gravitational stuff is intriguing. Everything with mass having a mathematical effect on everything else with mass around it.

I love it when someone says you don't understand the gravity of the situation... of course you don't, because we don't understand gravity in the first place.

Pete

- It's OK to be a man and have feelings, as long as you're still capable of beating the hell out of the person who made you have them. 

Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: SolarSystem (above)
« Reply #9 on: February 09, 2019, 05:02:53 pm »
Quote
Slice a perfectly round cone perfectly across a horizontal axis and you get a perfect circle.

True

Quote
Slice it any other way in a single direction and you get an egg shape, whatever the hell that's called.

That's the ellipse, I promise.

Quote
You need a cylinder to slice out an ellipse.

Yee hath little faith!
« Last Edit: February 09, 2019, 05:04:14 pm by STxAxTIC »
You're not done when it works, you're done when it's right.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: SolarSystem (above)
« Reply #10 on: February 09, 2019, 05:12:34 pm »
Yeah, but I like my ellipses symmetrical, with some fava beans and a nice Chianti.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: SolarSystem (above)
« Reply #11 on: February 09, 2019, 05:23:26 pm »
Heh, now I'm not sure if you're joking or if you *do* have little faith!
You're not done when it works, you're done when it's right.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: SolarSystem (above)
« Reply #12 on: February 09, 2019, 05:41:22 pm »
Please. I take fave beans very seriously. You don't even have to slice a good one in half to get an ellipse!

Pete :D
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: SolarSystem (above)
« Reply #13 on: February 10, 2019, 04:42:50 pm »
Mynameispaul,

When I got my first 8 bit machine, one of the first programs I keyed in, was a 'planets' program. It took at least a minute to draw each orbit; place the planet and display the coordinates. It may have taken about 10 minutes to view but was worth the wait. This was a 'static' model. To hope for a model that was animated was a bit much to ask of a 4mhz CPU... lol  Since then I have always hoped that I could tinker together a "basic" animated model...

Your program may look "rather plain", but from where I came from, I think it's brilliant! The fact that it's animated (and can be 'real time') and written in basic is a masterpiece in itself. Well done!
Logic is the beginning of wisdom.