Video není dostupné.
Omlouváme se.
Simulating Water Colour Paint in P5js
Vložit
- čas přidán 5. 08. 2024
- Code from video: editor.p5js.org/BarneyCodes/s...
Tyler Hobbs' video about this effect: • "How to Hack a Paintin...
I've attempted to simulate a water colour effect a few times, but could never get anything too convincing. So when I stumbled upon Tyler Hobbs' video explaining his method I knew I had to give it another go. In this video I walk through how I've implemented a version of Hobbs' algorithm in P5js.
I highly encourage you to check out Hobbs' video (linked above) as he does an excellent job of explaining how it all works!
Follow me:
Support the channel: www.youtube.com/@BarneyCodes/...
Twitter: / barneycodes
Reddit: / barneycodes
Chapters:
0:00 Intro
0:40 Simple explanation
1:03 P5 setup and draw
2:24 Polygon constructor
4:11 Polygon grow function
8:31 Drawing the polygons
10:56 The rand() function
11:12 Outro
#creativecoding #p5js #javascript
Just a note: The vertices for the polygon have to be specified in a clockwise direction around the outside of the shape. This is because of the way I "push" new vertices out and spread them inside the grow() function.
Cool! Nice job, Barney!
Thanks Steve, appreciate it!
Really interesting video! I enjoyed playing around with the code afterwards. Disabling the `noStroke` call was a nice visualization actually!
That's great to hear! I'll have to try playing around with the stroke, I don't think I actually tried leaving the stroke on!
Amazing!
Thank you!
I need to try this for my land and sea tiles in my world mapper!
That sounds amazing! Would love to see your results!