p5.js Coding Tutorial | Quadtree 🌴 (how not to crash your program w +1,000 colliding particles!)

Поділитися
Вставка
  • Опубліковано 4 лис 2024

КОМЕНТАРІ • 20

  • @fa77y
    @fa77y 2 місяці тому +1

    I had so much fun working on this with you, thank you so much!

  • @frederichaudegond5922
    @frederichaudegond5922 2 місяці тому +1

    You are always make discover and understand sooooo much things. 😮
    Thank you, and please continue!

  • @JV_Arg
    @JV_Arg 2 місяці тому +1

    WOW, I was looking for this!!!!. 🔥🔥
    Thanks!!!!!

  • @takikirouani9123
    @takikirouani9123 Місяць тому +2

    The code can be optimized if we compare distances squares instead calculate the distances by sqrt which require more operations

  • @albertjjimenezp
    @albertjjimenezp 2 місяці тому +1

    Excelente explicación, voy a adaptarlo a dart/flutter y me divertiré un buen rato. :) Saludos desde Colombia 👩‍🚀👨‍🚀🗺

  • @JoBarbo
    @JoBarbo 2 місяці тому +1

    As an artist who works with 50k + particles this is definitely interesting! Haven't had the time to dive in yet but can't wait!

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

      @@JoBarbo Yes! Give it a try and lmk how it improves performance!

  • @delekmiller2362
    @delekmiller2362 2 місяці тому

    Great video! Some nice extras that Dan didn't include in his original.

  • @flaviopsilva_
    @flaviopsilva_ Місяць тому

    Good video tutorial

  • @SteveTaylorNZ
    @SteveTaylorNZ 2 місяці тому +1

    That was great, thanks! After getting it working, it seems there's lots of unused squares, so I've also implemented a Binary Space Filling Tree. It divides only into two branches, either horizontally or vertically depending on the shape of the boundary. I wonder if that would be even better for optimising my particle system.

    • @oscarbavi7886
      @oscarbavi7886 2 місяці тому +1

      This could also be added by Patt Vira
      What is the code?
      it's more efficent?

    • @SteveTaylorNZ
      @SteveTaylorNZ 2 місяці тому

      @@oscarbavi7886 Not sure yet. There's quite a burden to construct the tree every frame. Playing with the capacity helps a lot

  • @per1sher
    @per1sher 2 місяці тому +1

    Bravo!!

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

    Did you get new camera and microphone? :o cause u look even more beautiful in this one ^_^ (i mean in the most platonic way).
    and really thank you for another great tutorial :D

  • @Deditzy.
    @Deditzy. 14 днів тому

    I’m stumped as to how the intersects formula for the rectangular boundary works. The formular seems to be computing “contains” rather than intersects. Ie., the rect needs to be fully contained in the boundary for it to register, such that if the rect spans more than two boundaries, it wouldn’t register. Am I wrong?

  • @oscarbavi7886
    @oscarbavi7886 2 місяці тому +1

    where and when we could use quadtree in generative art? can you show examples?
    thanks and congratulations

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

      @@oscarbavi7886 I’ll be doing just that in the next video with a flocking simulation as an example!

    • @oscarbavi7886
      @oscarbavi7886 2 місяці тому

      @@pattvira Ok, I'll wait for the next video, but maybe this type of algorithm has more application in generative art in motion, right? I don't know if it could be applied in static generative art like paintings (generating something using this algorithm) to see the result later, I don't know if I'm explaining myself.
      thanks

    • @pattvira
      @pattvira  2 місяці тому +1

      @@oscarbavi7886 Ah yes you’re right. The specific application that I’ll be showing is to improve speed performance, so it will help if your piece is dynamic.

    • @Techne89
      @Techne89 2 місяці тому

      Sounds exciting 🎉