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
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
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?
@@keyframe41 Okay, thank you, I already run it on Intel ifx compiler and runs great! Maybe I will add some OpenMP parallel instructions and I will share to you when its done.
Very nice!
Whoa didn't expect you here, thanks!
Pezzzassssss, its been 2 months... I NEED the the UI video??? :((((
maybe the friends are the particles we made along the way.
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
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
awesome work, love the KSP backgrounds
I very much enjoyed watching your video. Looking forward to the multi-threading and fluid simulation.
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
Great work!
Cool 👍🏻
Super cool
Wait so verlet integration is just newtons equations of motion? Oh lol well I guess I have a new project to do after exams 🎉
great video ❤
11:14 washing machine...
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?
This is great! You sound quite young, may I ask how old you are? I find it quite inspirational with young coders
I am 15
How can we make an image using circles
Good job! The link to download the code doesn’t work :(
fixed
@@keyframe41 Okay, thank you, I already run it on Intel ifx compiler and runs great! Maybe I will add some OpenMP parallel instructions and I will share to you when its done.
code disappeared?