Video není dostupné.
Omlouváme se.

Simulating Water Colour Paint in P5js

Sdílet
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

Komentáře • 9

  • @BarneyCodes
    @BarneyCodes  Před rokem +4

    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.

  • @StevesMakerspace
    @StevesMakerspace Před rokem +6

    Cool! Nice job, Barney!

  • @liamkoehler8820
    @liamkoehler8820 Před rokem +3

    Really interesting video! I enjoyed playing around with the code afterwards. Disabling the `noStroke` call was a nice visualization actually!

    • @BarneyCodes
      @BarneyCodes  Před rokem +1

      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!

  • @otaviolobato6659
    @otaviolobato6659 Před rokem +4

    Amazing!

  • @vincentcleaver1925
    @vincentcleaver1925 Před rokem +4

    I need to try this for my land and sea tiles in my world mapper!

    • @BarneyCodes
      @BarneyCodes  Před rokem +2

      That sounds amazing! Would love to see your results!