ScratchData LogoScratchData
Back to griffpatch's profile

Orbital Velocity v0.2f

GRgriffpatch•Created May 8, 2017
Orbital Velocity v0.2f
5389
4374
99685 views
View on Scratch

Description

Just so you know I'm still alive! ;) - Yeah I know... nothing from me for ages! I'm really very busy outside of scratch - but here is a little something I just needed to have a play with - a gravity simulator moving bodies with randomised orbital velocity. Play around with: [G] = Gravitational Constant [Trails] = Length of trails [Random] = 0 spawn perfect orbits, 2 spawns unstable orbits [Space Key] = Respawn all The interesting thing I learnt while playing with formula for gravitational bodies is how difficult it is to actually get two bodies into a stable orbit without intervention (something putting them there!). All the bodies just either rushed off, rushed towards each other and then away again, or collided... very few got into a stable orbit at all!. So I googled for 'orbital velocity' and fed in the formula and wow, perfect circles! Hmm... except BORING circles, so I added the random element to give some interest back ;). I'm sure I will come back to tweek this a bit more... I kind of had other ideas about what I was going to do with this... So we will see :) Gravity Formula: g = GM/(r*r) Orbital Velocity: v = sqrt(GM/R) change log 11 May 2017 = v0.2f - Adjusted default orbit of large moon co compensate for gravity of both sun & moon. This allows larger bodies to orbit without colliding! Default orbit of moon now set to anti clockwise. 10 May 2017 - v0.2e - Fixed fake moon collisions 10 May 2017 - v0.2d - Switch from static sun camera to a dynamic sun camera (that follow sun, and attempts to match speed, but therefore provides a little give to show changes in motion of the sun). 9 May 2017 - v0.2 - Added Moon + fixes 8 May 2017 - v0.1 - Initial Release

Project Details

Project ID159688495
CreatedMay 8, 2017
Last ModifiedNovember 26, 2023
SharedMay 8, 2017
Visibilityvisible
CommentsAllowed