ScratchData LogoScratchData
Back to AlSweigart's profile

Fireflies

ALAlSweigart•Created March 19, 2019
Fireflies
15
10
415 views
View on Scratch

Instructions

Using trigonometry, we can simulate a swarm of fireflies. This is just an animation demo. The fireflies are random points on a sphere, which are then rotated in random directions. The 3D coordinates on the sphere are translated to 2D coordinates for the screen, making it look like the fireflies hover around within a certain radius. Their flight path looks random and chaotic, but it's just math!

Project Details

Project ID295340062
CreatedMarch 19, 2019
Last ModifiedSeptember 8, 2019
SharedMarch 20, 2019
Visibilityvisible
CommentsAllowed