dayvidpham / dhpham-website

My personal portfolio website at https://dhpham.com
https://dhpham-website.vercel.app
MIT License
1 stars 0 forks source link

3-dim Perlin noise for 2-dim canvas #2

Open dayvidpham opened 3 months ago

dayvidpham commented 3 months ago

Make waves random and dynamic over time using original Perlin noise

dayvidpham commented 3 months ago

Core functionality implemented in 9d2e88a2069f2e0f5387985875c58004476e607a. Can refactor the Wave constructor to accept params to control the noise level.

dayvidpham commented 3 months ago

Optimize allocations for each noise() call in 14ff41f3a8467c40ec40a3f12481de9a2a63fa2e. All buffers are now statically allocated instead of creating many 3-element arrays for each intermediate step. Still using some one-line helper functions to logically organize the transformations, but this is not strictly necessary.