ScratchData LogoScratchData
Back to Suzu's profile

nbody

SUSuzu•Created October 10, 2009
nbody
0
0
154 views
View on Scratch

Description

An N-body simulation in Scratch. It is a fixed time step numerical simulation of GMm/r^2 gravity simulation. To add more masses, do the following steps: - Copy the sprite "1". - Rename the new sprite to the next integer (like "4"). - In the "initialization", change the id variable to the name of sprite, and set the mass, speedX, speedY, x and y as you like. - Go to Stage and click on the block there. - Visit all sprites from 1, double click initialization. The end result should set the id's in the "list" list variable, and masses in the "massList" variable. - Press the green flag.

Project Details

Project ID712558
CreatedOctober 10, 2009
Last ModifiedApril 18, 2021
SharedOctober 10, 2009
Visibilityvisible
CommentsAllowed