Making a particle simulation in C++ (Part 1)

Поделиться
HTML-код
  • Опубликовано: 21 ноя 2024

Комментарии • 21

  • @PezzzasWork
    @PezzzasWork Месяц назад +17

    Very nice!

    • @keyframe41
      @keyframe41  Месяц назад +2

      Whoa didn't expect you here, thanks!

    • @nin3_
      @nin3_ 15 дней назад

      Pezzzassssss, its been 2 months... I NEED the the UI video??? :((((

  • @alkeryn1700
    @alkeryn1700 Месяц назад +19

    maybe the friends are the particles we made along the way.

  • @qatrickm4531
    @qatrickm4531 Месяц назад +4

    awesome work, love the KSP backgrounds

  • @DarePhoenix
    @DarePhoenix Месяц назад +7

    Hey, there is an even faster way to do pairwise collisions with a hashgrid. You can simply loop over all cells (so dont create cells if they're empty) and do a combination loop for all elements of the cell (i from 0 to cell.length, and j from i +1 to cell.length), in the inner loop you then have access to the pair (circle1, circle2) that you can apply interaction with. You can avoid duplicates (if two elements are in two cells) by storing a hash of their ids in a map and checking if the hash isn't already in the map before running the interaction callback within the inner loop. It's about 3 to 5 times faster than your solution

    • @keyframe41
      @keyframe41  Месяц назад +3

      Thanks for this, I realised that after and tried implementing it that way but it hasn't really worked so far. I'll take a look at your detailed suggestion to see if I can make I happen.
      Edit: it's faster! A really silly mistake on my part

  • @davidbrettell5687
    @davidbrettell5687 23 дня назад

    I very much enjoyed watching your video. Looking forward to the multi-threading and fluid simulation.

  • @valentinplasil9451
    @valentinplasil9451 Месяц назад +5

    Really good video, there were some 10 second long right ear outages of the sound but apart from that it was really well made and well explained

  • @Diabolka666
    @Diabolka666 Месяц назад +1

    Great work!

  • @hanseolryu8011
    @hanseolryu8011 Месяц назад +2

    Cool 👍🏻

  • @cindyim83
    @cindyim83 Месяц назад +1

    Super cool

  • @r.faj.5636
    @r.faj.5636 Месяц назад +5

    Wait so verlet integration is just newtons equations of motion? Oh lol well I guess I have a new project to do after exams 🎉

  • @PeterKrut
    @PeterKrut 3 дня назад

    11:14 washing machine...

  • @boostercookie
    @boostercookie Месяц назад +1

    great video ❤

  • @sandwich_2325
    @sandwich_2325 Месяц назад +1

    This is great! You sound quite young, may I ask how old you are? I find it quite inspirational with young coders

  • @cesarherrera9690
    @cesarherrera9690 26 дней назад +1

    I'm doing a similar project with particles but using a compute shader to take advantage of the graphic card, but I'm kind of stuck at the part where th particles are moving without too much control, how did you solved that?

  • @mysterious.world091
    @mysterious.world091 Месяц назад +1

    How can we make an image using circles

  •  4 часа назад

    Good job! The link to download the code doesn’t work :(

  • @JSiuDev
    @JSiuDev 12 дней назад

    code disappeared?