ScratchData LogoScratchData
Back to TheLogFather's profile

Interactive Pen Water Effect

THTheLogFather•Created May 18, 2015
Interactive Pen Water Effect
1685
1242
21114 views
View on Scratch

Description

I liked @Layzej's pen-based ripple effect, so I thought I'd have a bit of fun and add some real-time interaction with the mouse. >> WARNING: you need a decent computer for this to work well! << Try it on phosphorus: https://phosphorus.github.io/#62815354 Move mouse around to disturb the water (ripples die away if you keep mouse still). Hold down mouse button to make bigger ripples - it's also then continuous (so it won't die away). It uses a basic finite-difference method to solve the wave equation. See https://en.wikipedia.org/wiki/Finite_difference_method Each pixel of the picture corresponds to a point on the finite-difference grid. When the mouse is moved (or button pressed), it injects a 'disturbance' into the grid-points along the path of mouse movement (roughly), which then travels through the grid.

Project Details

Project ID62815354
CreatedMay 18, 2015
Last ModifiedFebruary 1, 2023
SharedMay 19, 2015
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root