Author Topic: QB64 program to simulate a comet skip impact on Earth  (Read 3960 times)

0 Members and 1 Guest are viewing this topic.

Offline John

  • Newbie
  • Posts: 3
    • View Profile
QB64 program to simulate a comet skip impact on Earth
« on: January 31, 2021, 12:15:27 pm »
This is a program I have used to portray what happens if a large comet hits Earth at a very low angle. I used this program to present my theory that comet Swift-Tuttle has previously hit Earth in a poster at the AGU (American Geophysical Union) conference December, 2020. The program is available here and on my web site: www.craters.ca

I chose QB64 due to the high speed of calculations it is able to do compared to visual basic or MS visual studio. It runs about 800 times faster in QB64 than in Visual Studio. As the program deals with about 200,000 individual particles to show the impact effect, speed is essential. The calculations update the event in 1 second increments. The display runs for about 2 hours of real time for a display of events (or 200,000 X 7500 = 1,500,000,000 calculations per run) to show the effects. The results are displayed in a minute or two, so about 60X faster than real life. Typical geological simulations run about 1/1000 real time instead of 60X faster.  You can let it continue running for as long as you wish - the long term results are interesting also.
* CometSkipImpacts.BAS (Filesize: 131.07 KB, Downloads: 226)

FellippeHeitor

  • Guest
Re: QB64 program to simulate a comet skip impact on Earth
« Reply #1 on: January 31, 2021, 12:16:31 pm »
Welcome aboard, John! Glad to see your simulation again, it's gorgeous.

Offline John

  • Newbie
  • Posts: 3
    • View Profile
Re: QB64 program to simulate a comet skip impact on Earth
« Reply #2 on: January 31, 2021, 12:18:13 pm »
Thanks for the compliment.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: QB64 program to simulate a comet skip impact on Earth
« Reply #3 on: January 31, 2021, 12:44:09 pm »
One typo near top in a REMARK: ' SSHIFTS SCREEN TO MIDDLE OF COMPUTER MONITOR

Also, there appears to be nothing assigned to the variable filename$, and maybe that's because you haven't finished that part of the routine yet?

So, my advice. Next time PLANET better! :D

Okay, a long way to drag you to a bad pun, so with that aside, WOW, beautiful animation! It really looks like the Western hemisphere of North America. The absolute best part was the comet impact. It looks like it was a direct hit on the %$% New York Governor Mario Cuomo! Also, while I'm safe out here in Cali, it looks like Steve, in Virginia, has "particles" of Cuomo all over him. Sorry Steve!

I had a good friend, who is a geologist,  in a town I used to live in who would have loved this. It's nice to see it runs so smooth in QB64, too.

So, got any other cheery stuff? 9.0 earthquake sitlation, So Steve can poke fun back at me?

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: QB64 program to simulate a comet skip impact on Earth
« Reply #4 on: January 31, 2021, 12:52:06 pm »
This thing is beautiful. Everyone run this and wait 5 minutes. I would think eventually that some of the particles find themselves in a steady-state orbit around the earth, but you'd probably need many more of them for that effect to show up and persist.

If we could rate programs out of 5 stars ... <insert outer space pun here>

Keep it up!
« Last Edit: January 31, 2021, 01:35:48 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: QB64 program to simulate a comet skip impact on Earth
« Reply #5 on: January 31, 2021, 01:31:42 pm »
Hey I make 5-star programs, too. And in my reviews, one of those stars is half shaded in!

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

Offline John

  • Newbie
  • Posts: 3
    • View Profile
Re: QB64 program to simulate a comet skip impact on Earth
« Reply #6 on: January 31, 2021, 02:53:54 pm »
Re let it run - and some particles should go into orbit

Yes, some do go into orbit, but very few. Remember that the orbits start at the surface, and they do not have anything to change the path once in flight, so the orbit includes the surface they started on, which means that the vast majority hit the surface on the final part of the first orbit, or sooner. Some tossed way out will miss by a tiny bit and continue in orbit. I did not add atmospheric drag, so they can skim the surface and miss by less than 1 km and still remain in orbit.

Let it run for a few hours - its impressive how far some particles go.

And of course, each particle is a 1 km cube - trying to make them smaller was too much computing.