Skip to main content
100%

Gist aad210d07e4d4699b07d41be7364a0a2

✓ Published0🌍 Public
SStephen
Last edited Oct 18, 2019
Created on Oct 18, 2019

This example explores a particle-generation idea using the HTML5 Canvas API and the `random.noise2D` function from the `noisejs` library. It shows a system that seeds a set of particles and then propagates their positions by passing starting coordinates through 2D Perlin noise to obtain an angle value. The next location for each particle is calculated using basic trigonometry, `Math.cos` and `Math.sin`, based on that noise-derived angle. The visualization then draws line segments between consecutive points with canvas `moveTo` and `lineTo` methods, creating organic, flow-like paths.

AI-generated description

Similar vizzes