ScratchData LogoScratchData
Back to EdnaC's profile

GravityWellsWithNoTrig

EDEdnaC•Created July 28, 2011
GravityWellsWithNoTrig
10
5
302 views
View on Scratch

Instructions

Space to launch the ship. You can click/drag the two circles (gravity "wells").

Description

The ship and a "guide sprite" play "leapfrog" to respond to the gravity of the two circles. The Ship sends a broadcast to get an updated position. The guide goes to the ship, points in the ship's directions then, moves according to the ship's velocity. Then, it points to the first gravity source, moves by gravity strength/distance^2 and repeats for the other gravity source. The ship then points to the guide, sets its new veloicity to the distance to the guide, and finally goes to the guide. This repeats until the ship hits the edge. You can drag the circles to keep the ship on screen - IF you understand gravity...

Project Details

Project ID1949135
CreatedJuly 28, 2011
Last ModifiedMay 24, 2013
SharedJuly 28, 2011
Visibilityvisible
CommentsAllowed