ScratchData LogoScratchData
Back to crkcity's profile

Fractal Winter: Tree and Snowflakes Swaying

CRcrkcity•Created January 23, 2022
Fractal Winter: Tree and Snowflakes Swaying
17
8
79 views
View on Scratch

Instructions

Fractal tree and fractal snowflakes blow in wind. Tree moves left and right by changing all branching angles. Timing is partly random but wind and angle change follows a sine wave function.

Description

Code repeats branching, each time shrinking length, creating a self-similar pattern known as "fractal." The (Koch) snowflakes are also self-similar fractals. To create swaying effect in wind, used sine function to oscillate angle then redrew branches for every new angle. To do this in a smooth animated way turned out to require some workarounds in Scratch, making code less pretty and concise. Snow blows with same "wind." The swaying in wind idea was from a suggestion from @s_federici on my fractal fern, followed up on also by @papipupepappa Note similarity of fractal branching in lungs, trees, and arterial systems.

Project Details

Project ID632494826
CreatedJanuary 23, 2022
Last ModifiedFebruary 22, 2022
SharedFebruary 22, 2022
Visibilityvisible
CommentsAllowed