1D Wave Simulation
✓ Published0🌍 Public
CCurran Kelleher
Last edited Jun 4, 2015
Created on Jun 3, 2015
A 1D wave simulation visualizes the propagation of a disturbance across a row of connected cells, rendered as an animated line on an HTML5 Canvas. The simulation initializes a single pulse and then models wave motion by having each cell’s velocity influenced by its neighbors, with dampening and mass conservation corrections. Users can interact by clicking and dragging the mouse to pull the wave surface, altering the height of nearby cells. The code uses the Canvas 2D API for drawing and custom event listeners for mouse interaction, with a requestAnimationFrame loop driving the animation.
AI-generated descriptionA wave simulation using HTML5 Canvas. Click on it!
<!-- Start of SimpleHitCounter Code --> <div align="center"><a href="http://www.simplehitcounter.com" target="_blank"><img src="http://simplehitcounter.com/hit.php?uid=1905612&f=16777215&b=0" border="0" height="18" width="83" alt="web counter"></a><br><a href="http://www.simplehitcounter.com" target="_blank" style="text-decoration:none;">web counter</a></div> <!-- End of SimpleHitCounter Code -->