p5.js Coding Tutorial | Lava Lamp (Marching Squares) @pattvira
p5.js Coding Tutorial | Lava Lamp (Marching Squares)  @pattvira
Uploaded January 2024 | Updated November 2026, 1 week ago
✨ Get your 'Basic toolkit to Getting Started with Creative Coding' on my website: https://www.pattvira.com. Let me know if you find it useful! ✨
β€”
Links:
πŸ”— p5.js editor: editor.p5js.org
πŸ”— Marching Squares Code: editor.p5js.org/pattvira/sketches/rk3vy7vvx
πŸ”— Introduction to Creative Coding Playlist: youtube.com/playlist?list=PL0beHPVMklwgMz4Z-mNp4_udo9mjBk7pn&si=XhvQaojd6cIrxvdn

References:
πŸ”— Jamie Wong's article on Metaballs: jamie-wong.com/2014/08/19/metaballs-and-marching-squares

Timestamps:
0:00 Intro
0:36 Approach
2:33 Calculating location of circles relative to a point
13:34 Calculating location of circles relative to each cell on a grid
18:55 Setting value of each corner based on location calculations
22:22 Mapping each cell to a contour
27:56 Interpolating points to get smoother contours
p5.js Coding Tutorial | Lava Lamp (Marching Squares)p5.js Coding Tutorial | Color Gradient Animation (lerpColor Function)Reflecting on 2024β€”A Year of Growth and Gratitude 🌟p5.js Coding Tutorial | 3-Dimensional Kinetic TypographyASCII Text Images and Videos #p5js #javascript #coding #shortsp5.js Coding Tutorial | Interactive Colliding Objectsp5.js Coding Tutorial | Conways Game of Life πŸ‘Ύp5.js Coding Tutorial | Snow (Object-oriented Programming)p5.js Coding Tutorial |  Circular Grid Graphics (Nested Loop / 2D Array)p5.js Coding Tutorial | Habit Tracker (Data Visualization)AI built 80% of my app. Here’s how I plan to design the rest.p5.js Coding Tutorial |  Color Changing Ball (If Statements)
Patt Vira |

p5.js Coding Tutorial | Lava Lamp (Marching Squares)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER