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

Поділитися
Вставка
  • Опубліковано 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

  •  9 годин тому

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

  • @JSiuDev
    @JSiuDev 12 днів тому

    code disappeared?