p5.js Coding Tutorial | Pixelated Kaleidoscope

Поділитися
Вставка
  • Опубліковано 20 січ 2025

КОМЕНТАРІ • 16

  • @Techne89
    @Techne89 4 місяці тому +4

    I liked that you showcased both interactive and generative version , people can explore further base on their interest

    • @pattvira
      @pattvira  4 місяці тому

      Glad to hear. Hope you're making some fun stuff with it!

  • @sarthakmalhotra7413
    @sarthakmalhotra7413 4 місяці тому +2

    Your content and the quality of videos are increasing day by day I am really happy for your growth :>

    • @pattvira
      @pattvira  4 місяці тому

      Appreciate it. Thank you!

  • @atys1966
    @atys1966 4 місяці тому +2

    Thank you, a nice starting point for some interesting generative art projects

  • @jiaxingyang4609
    @jiaxingyang4609 3 місяці тому +1

    Great tutorial! 🎉
    I’d like to share some of my thoughts and inspiration with you. Actually, you don’t need to store color information using a 2D array. You just need to paint the corresponding positions on the canvas with color for each random point coordinate you get (e.g., cell1~cell4)!
    In your code, you need a grid to store color information, and when calling p5.fill and p5.rect, you are invoking them for every element in the grid (even if their colors haven’t changed at all). When the size is small and the width and height are large, your code can lead to performance issues, such as reduced frame rates.
    So, you can simply overwrite the canvas with the new colors without remembering what color it should be. Have a try!!^^

  • @spyrex3988
    @spyrex3988 4 місяці тому

    i love your channel so much, u are doing gods work thank u

  • @JoshuaBoyd
    @JoshuaBoyd 4 місяці тому

    Very cool! I think if you converted the cell x/y to polar coordinates, then calculating the additional cells to change when using more than 4 sides of kaleidoscope. Once you turn x/y into r/theta, your additional cells are at theta increments of (2*Pi)/side_count.

    • @pattvira
      @pattvira  4 місяці тому

      Great idea. I'll give it a try! Thanks.

  • @jasondunken
    @jasondunken 4 місяці тому +1

    another way to initialize a 2d (or any d for that matter) array is let array = new Array(cols).fill(new Array(rows).fill(255));

  • @umitsn
    @umitsn 4 місяці тому +1

    Thanks 🙏🏻

  • @ChandrashekarCN
    @ChandrashekarCN 4 місяці тому +1

    💖💖💖💖

  • @raphandrews1
    @raphandrews1 4 місяці тому +1

    wow

  • @onebeartoe
    @onebeartoe 4 місяці тому

    Fun!

  • @BRODZELi
    @BRODZELi 4 місяці тому

    Please youse dark mode.