ScratchData LogoScratchData
Back to rdococ's profile

Fast Gravity Sim

RDrdococ•Created November 14, 2023
Fast Gravity Sim
8
7
175 views
View on Scratch

Instructions

<space>: Switch algorithms <click>: Place particles <v>: Switch visualizations (Barnes-Hut only) An approximate (and probably buggy) gravity simulation using a 2D variant of the Barnes-Hut algorithm. 200 particles are simulated here. The performance is not very good, but it's much faster than brute-force. The algorithm constructs a data structure that lets us approximate forces from groups of distant particles as single masses.

Project Details

Project ID924614917
CreatedNovember 14, 2023
Last ModifiedDecember 8, 2023
SharedNovember 14, 2023
Visibilityvisible
CommentsAllowed