Teaching myself C so I can build a particle simulation

  Рет қаралды 327,756

Gradience

Gradience

Күн бұрын

Пікірлер: 331
@gr4dience
@gr4dience 7 ай бұрын
Hi everyone! Glad to hear you're enjoying the video, it means a lot. I added the source code in the description for those who asked (it's kind of a mess). My semester just ended so I should have some time to work on another graphics project. Let me know what you guys wanna see below! - Cheers
@simonzanta1403
@simonzanta1403 7 ай бұрын
heyy, i really enjoyed your video about computer graphics. Im currently researching sources for my Bachelor Thesis from computer graphics and i would like to ask you, if you could share some insights on how you research topics. It would be really helpful, couse i have no idea where to find sources and mainly what to search for.
@gr4dience
@gr4dience 7 ай бұрын
@@simonzanta1403 Public code repositories were certainly my best friend during this project! If I ever needed inspiration for some feature or felt myself getting stuck, I would do a quick search on KZbin or Google for something similar and that was usually enough to get me through. Another tip is to try breaking down your research into smaller pieces that will be easier to source (ie. "OpenGL instance rendering" as opposed to "OpenGL particles"). Hope that helps!
7 ай бұрын
third
@vinayakk2745
@vinayakk2745 7 ай бұрын
hello there, really liked your video! I'm a first year computer science student, I would like to know more about what you do and how you got here, I'd love if you'd upload a video talking about yourself, your work and your journey, it would really help and inspire me! Thank you for this great video!
@hanya-chan454
@hanya-chan454 7 ай бұрын
i love the work, why dont u make gravity simulation using nueton's thurd law of motion, i tryied to do it in unity, it kinda works but somehow the particles after attracting to each other and colliding they start to repeal each other (using barn's hut algorithm , no error in my code) , maybe u can do a simulation and explain the optimization method u choose.
@jonathan2847
@jonathan2847 7 ай бұрын
Engineers make a small number of good KZbin videos then dip back into the void to do their job. This is the good shit.
@Nipings
@Nipings 7 ай бұрын
The editing in this video is incredible
@njorogekamau3820
@njorogekamau3820 7 ай бұрын
You can achieve the same using an open source python library called manim
@PezzzasWork
@PezzzasWork 7 ай бұрын
Super cool video! Always funny to see we all encounter the same bugs along the way :D
7 ай бұрын
first
@thatprogramer
@thatprogramer 6 ай бұрын
yeah!
@SLURPZZZ4461
@SLURPZZZ4461 2 ай бұрын
hello pezzza i adore your videos. I am in highschool and want to make cool physics simulations and fractal stuff. I know some c++ but struggle with implementing stuff like this. How do you recommend i learn to build real, actual projects?
@luce_9801
@luce_9801 7 ай бұрын
I know what I'm doing in summer now. Thanks for the inspiration!
@_Rie_
@_Rie_ 7 ай бұрын
me too gonna start college in august so im gonna learn C and make this happen good luck to you too
@Randomperson-yf2fw
@Randomperson-yf2fw 7 ай бұрын
@@_Rie_Good luck! C is a tough language in the beginning, but it's so satisfying to use once you've conquered the main pitfalls.
@creo_one
@creo_one 2 ай бұрын
How did it go?
@pitiwatkittiwimonchai4656
@pitiwatkittiwimonchai4656 2 ай бұрын
me too
@georgiosdoumas2446
@georgiosdoumas2446 7 ай бұрын
I have studied physics in 1991-1995, and I had a semester on Fortran in the university. Then at 2004 I learned a little C, and the following years I was slowly reading a few books on C and C++ (mainly I was reading stuff about networks and linux for my jobs) . Since late 2023 I became a junior C++ developer. A few weeks I started learning OpenGL (I can give suggestions to who ever is interested). But I know that I am nowhere near the level to make such simulations! I am so impressed that you are still a university student and can produce those videos!
@Cassian360
@Cassian360 6 ай бұрын
sugestions please
@npc386
@npc386 4 ай бұрын
i was thinking about to implement opengl into my little javascript particle system (JPS on github) but during that i came across webgpu and i think thats the better choice. but its hard, shader scripting is another level of abstraction...
@clearlyblotted
@clearlyblotted 2 ай бұрын
Hey I’d be interested in suggestions to get started! Thank you
@heheheheheheheeeeeeee
@heheheheheheheeeeeeee 2 ай бұрын
Skull issue
@arunkumarsawant6523
@arunkumarsawant6523 11 күн бұрын
Only know c upto data structures. Want to advance and take up graphics. Provide steps to move forward in c and work on open gl. Turbo C graphics.h is not supported by compiler.
@samir_buch
@samir_buch 7 ай бұрын
This is super impressive! Casually glossing over the fact that you taught yourself *not just C* but also how to render things with openGL is no small feat. Your in-depth knowledge of particle simulation is also pretty impressive, requiring at the very least knowledge of relatively advanced calculus and physics. And, on top of all of that, this video was very well written and edited. Overall great job, keep it up!
@plvr_strg
@plvr_strg 5 ай бұрын
Someone: "You don't need math to be a programmer" Yeah, same as you don't need much strength to hold a sledgehammer... but you need it to wield it.
@balijosu
@balijosu 4 ай бұрын
Good metaphor.
@Smiley01987
@Smiley01987 Ай бұрын
Programming is so much more than using complex equations all the time. It all depends in which field you're in.
@plvr_strg
@plvr_strg Ай бұрын
@@Smiley01987 I didn't talk about job positions, I was talking about programming as a mastery in which you can be capable of much more if you know math.
@salih-khan
@salih-khan 9 күн бұрын
*laughs in web dev
@flooriiian
@flooriiian 6 күн бұрын
@@plvr_strgYeah thats true, I regret not learning enough Math but i'm relearning it
@samuelcollier1764
@samuelcollier1764 7 ай бұрын
this was an awesome video! C is my favorite programming language and I love seeing graphics programming projects like these :)
@nano-ai
@nano-ai 4 ай бұрын
this is amazing. i love how you have combined the most notorious subjects like physics and linear algebra and combined them into an amazing program, all in c! absolutely wonderful quality.
@dylancode
@dylancode 6 ай бұрын
The new Sebastian Lague! Excellent video!
@Arun_Kumar_x86
@Arun_Kumar_x86 7 ай бұрын
this is a great video mate. this video remainds me of sabastian lague's videos. when ever i have thoughts about why i chose programming as a career i think of these kind of videos which boost my happiness and i say to myself that this is why i chose programming as a career to build cool stuffs. thanks mate. Great job !!
@youknowwhatlol6628
@youknowwhatlol6628 7 ай бұрын
hello. i am a beginner in all those things and have just found this channel....can't say how grateful I am to you. You, my friend, are an inspiration. You are Knowledge. You are Greatness. You hold the Power. Thank you so much. Thanks. Would like to see more of these simluations, math-physics-chemistry-related programs and such. Thank you.
@DidIJustDoThat
@DidIJustDoThat 7 ай бұрын
I am here with you also a noob
@GratitudeDueLife
@GratitudeDueLife Ай бұрын
Same here, I've been wanting to implement programming with the sciences. It'll bring hard but we can do it
@yourkidelias
@yourkidelias 7 ай бұрын
This is a great video, and it is surprisingly well edited! I am not interested at all in physics simulation but the way you explained it really made me start paying attention and it was interesting how you used each optimisation technique to achieve even better results!
@nad.99
@nad.99 7 ай бұрын
Halfway through this video i feel kms cuz I don’t see myself getting this good anytime soon. Man you’re awesome.
@kylerchen2385
@kylerchen2385 6 ай бұрын
naw bruh you can get this good - its possible for any of us. if u wanna build something like this just fuckin believe in urself dawg u can do it. do that, and videos like this produce nothing but inspiration and excitement for your future work :)
@rideaux8533
@rideaux8533 6 ай бұрын
@@kylerchen2385 its not possible for everyone, but we cant know without trying
@vasq
@vasq 7 ай бұрын
This is pure art. Amazing work bro.
@ianchaplin2777
@ianchaplin2777 23 күн бұрын
I saw this video on my recommended and I just had to click on it after seeing "Teaching myself C" as I just wanted to see pain but it was more chill then i thought and its good :)
@htchamber2776
@htchamber2776 4 ай бұрын
Channel name + channel banner is literally +1000 aura im gonna steal this
@avion85
@avion85 7 ай бұрын
Good luck for your success on yt. We need more content like this.
@QuarzleTheMinecrafter
@QuarzleTheMinecrafter 7 ай бұрын
Yay another channel with my favourite type of content
@lalpremi
@lalpremi 16 күн бұрын
Thank you for sharing-it's very interesting! I've had the idea of creating a screensaver with a surface-cracking, desert-like effect for quite some time, and this could be an excellent foundation to bring that idea to life. have a great day 🙂
@Hakkyou1
@Hakkyou1 7 ай бұрын
Very nice video ! You might want to also look at fluid simulation using particle called Smoothed Particle Hydrodynamics. Basically you replace the collision algorithm with a constraint on the density modulated by a kernel. It sound bad like this but you already did 90% of the work there. Keep up the good work ! See you next video.
@jahaynes256
@jahaynes256 7 ай бұрын
I have had this as a future project in my mind for years. I never went to third dimension due to the fear of linear algebra. This is really impressive and inspirational. Thanks for sharing.
@HictionaryYT
@HictionaryYT 6 ай бұрын
Gradience, this video is absolutely astonishing. Putting aside the great editing and video structure, the flow of your story and the way you tell it is both fascinating, and so intriguing. I adore computer science as a whole, and this is possibly one of my all time favorite videos now. What a masterpiece you've made. Subscribed, and hope to see more of what you do! :)
@JMW1906
@JMW1906 7 ай бұрын
One more was to implement optimization is to compare the length squared (in handle collision) instead of competing the length. It means you replace a square root call (expensive) with two multiplications (one of the radius is the same), which can even be pre computed once if every sphere has the same radius: x²+y²+z² < 2r²
@gr4dience
@gr4dience 7 ай бұрын
That was my initial thought as well! The only issue is that to "resolve" the collisions, you still need to push each particle apart by half their separation so you would need to compute the distance regardless. I tried moving the square root function inside that condition but it didn't make too much of a difference :)
@JMW1906
@JMW1906 7 ай бұрын
@@gr4dience true, haven't thought about the fact that you need the value later. Still interesting though that it makes almost no difference when computed inside the if body. I think that means the grouping into chunks optimization to not check every sphere against every other has a good grid size and already avoids most checks, so most checks have to do the sqrt anyways.
@stone8684
@stone8684 7 ай бұрын
dude, you're so incredible. I'd like to see more videos. keep doing them :3
@kiri9979
@kiri9979 7 ай бұрын
this video is amazing it feels like it's been made by a channel with at least a few hundred thousand subs keep it up !!
@agaveboy
@agaveboy 7 ай бұрын
that's great c code if you've really just learned it! good job
@arthurmac2511
@arthurmac2511 6 ай бұрын
Now i have another reason to keep studying. You're an inspiration for me :D.
@abdala3475
@abdala3475 7 ай бұрын
And here I am, struggling with a simple pyramid c code
@Pepegalord
@Pepegalord 7 ай бұрын
Feel you
@MasterofBeats
@MasterofBeats 7 ай бұрын
me fr fr
@wardingward4884
@wardingward4884 7 ай бұрын
Its okay, I'll get harder in arrays, and pointers 💀💀
@nad.99
@nad.99 7 ай бұрын
انا
@nad.99
@nad.99 7 ай бұрын
@@wardingward4884 linked lists is where I gave up willingly
@waffles6555
@waffles6555 7 ай бұрын
I took a graduate level numerical methods course (my prof contributed to some popular CFD software) and it was very cool to see the different algorithms used. Great job !
@wojciechkalinowski3827
@wojciechkalinowski3827 7 ай бұрын
Very nicely done! I like that you said what you did and kept it rather high level for the video. Whereas, if needed, and if you haven't already, then you can make a more detailed video for the code and maths. Great paste and keep at it!!
@dennischen2922
@dennischen2922 7 ай бұрын
This is such an awesome project! Glad to see a fellow NC State student doing cool things!
@aleksaggor
@aleksaggor 6 ай бұрын
Mesmerizing! You did a fantasic job with this program and video, keep it up :)
@yoyo3257
@yoyo3257 6 ай бұрын
When you realise that math class was not just a class Fantastic good job
@zachzulanas4125
@zachzulanas4125 5 ай бұрын
This is sick! You’ve inspired me to try this haha, just need to find the time
@Sirepicwin
@Sirepicwin 7 ай бұрын
I literally just stumbled on this video, amazing and very fun to watch. Made want to actually learn C and take a break from JS for while lol
@philipmichel-dv
@philipmichel-dv 7 ай бұрын
really beautiful video . i can now see the importance o mathemetics in programming
@drakeolejniczak2357
@drakeolejniczak2357 7 ай бұрын
That was awesome! My favorite part was when you found the linear algebra text and got your change of basis on.
@evanbarnes9984
@evanbarnes9984 7 ай бұрын
Instantly subscribed! My god this is good.
@serhiiko7141
@serhiiko7141 7 ай бұрын
this video deserves much more than 2.7 k views
@sythatsokmontrey8879
@sythatsokmontrey8879 7 ай бұрын
Dude we have the same story. I spent 2 years building a physic engine because I saw that one video. But mine is in JS. it's terrible. I love it. Great video BTW.
@ed7590
@ed7590 7 ай бұрын
Inspiring, makes me want to drop all my JS projects and return to low level.
@bramhuis3571
@bramhuis3571 7 ай бұрын
This video is amazing! It reminds me of Sebastian Lague’s video’s.
@Rahim-444
@Rahim-444 7 ай бұрын
yea very similar project
@chairlesscrocodile
@chairlesscrocodile 7 ай бұрын
Great video!
@justins7796
@justins7796 7 ай бұрын
dang you're a legend if you used a physical Linear Algebra textbook to solve your problems. Subbed!
@thewholeworldblurred
@thewholeworldblurred 7 ай бұрын
I clicked because of C!
@DwellerLord
@DwellerLord 7 ай бұрын
This is the best video I've seen all year
@hendersonvirtual
@hendersonvirtual 7 ай бұрын
Amazing, can’t wait to see more videos!
@Stylpe
@Stylpe 7 ай бұрын
This is going to be a fantastic springboard for my own physics sim ideas! Starred, will fork when this makes it to the top of my project queue (it's about number 3 I'd say, but full disclosure, it might also never happen 😛)
@Green-Code
@Green-Code 7 ай бұрын
Great video! Keep it up!
@Spencersstory
@Spencersstory 7 ай бұрын
Sick good work man. Makes me remember why I chose computer science
@humongouswalrus
@humongouswalrus 7 ай бұрын
Another awesome programmer I have to subscribe xD Great work
@space-yg
@space-yg 7 ай бұрын
Yoooooo amazing video!! I learned so much from it
@mattywlion5174
@mattywlion5174 7 ай бұрын
Man it's a fantastic video, it's just great, love this
@David-ww2sg
@David-ww2sg Ай бұрын
This is so cool :) You've inspired me to want to do something similar
@alessandroserra885
@alessandroserra885 7 ай бұрын
That's simply amazing
@nadjarman
@nadjarman 7 ай бұрын
Fantastic work!
@eduardomarinho1482
@eduardomarinho1482 7 ай бұрын
Great video and very interesting project, will try to do it on my own. Also, I’m impressed for the quality of the video!
@romeoxxiv
@romeoxxiv 7 ай бұрын
Very interesting, thank you!
@deadboy9955
@deadboy9955 4 ай бұрын
So much of this is reminiscent of physics used in molecular dynamics simulations.
@lel7531
@lel7531 7 ай бұрын
Very cool video, top notch editing
@moonyl5341
@moonyl5341 Ай бұрын
5:08 an octree is just that but each cube can divide into 8 other cubes so it should be faster
@shuraosipov
@shuraosipov 7 ай бұрын
Good job, man!
@giorgito24
@giorgito24 7 ай бұрын
Absolutely stunning, more videos using C please😮
@ticusism
@ticusism 7 ай бұрын
Awesome! Thanks for sharing your journey.
@futuremapper_
@futuremapper_ 7 ай бұрын
Love this!
@symmetry-e8
@symmetry-e8 7 ай бұрын
Very cool and informative video. Thanks for the effort.
@sirjersey
@sirjersey 7 ай бұрын
Amazing Video! Definitley learned something new :)
@the_outer_heaven
@the_outer_heaven Ай бұрын
It is very beautiful, thank you.
@megalos2030
@megalos2030 7 ай бұрын
Very good video !
@Mia-tk7dz
@Mia-tk7dz 7 ай бұрын
love the video! good stuff
@bird5790
@bird5790 7 ай бұрын
If you are working with grids, the paper "Compact, fast and robust grids for ray tracing" is very worth reading to optimize further
@gr4dience
@gr4dience 7 ай бұрын
I'll check it out!
@charliechimp6917
@charliechimp6917 7 ай бұрын
Mesmerising
@aakkii5271
@aakkii5271 7 ай бұрын
Great channel potential, subbed
@lbgonpokeit
@lbgonpokeit 7 ай бұрын
Awesome video, Man I could watch this stuff all day 😅
@gedaliakoehler6992
@gedaliakoehler6992 7 ай бұрын
Great video, graphics engine, and physics engine :)
@mathiasensimon
@mathiasensimon 7 ай бұрын
Cant wait for more videos😊
@3dgar7eandro
@3dgar7eandro 7 ай бұрын
Cool Bro!
@osalem192
@osalem192 7 ай бұрын
A new Sebastian Lague! Keep going!
@MarrisaL-bs2ch
@MarrisaL-bs2ch 6 ай бұрын
subbed and notified so I can view more of your awesome project.
@Gaiuscassius565
@Gaiuscassius565 7 ай бұрын
super cool job. Very inspiring i wish i could do something like this
@KlojMaalem
@KlojMaalem 3 ай бұрын
nice and simple representation
@mohammadalaaelghamry8010
@mohammadalaaelghamry8010 6 ай бұрын
Great video, thank you for sharing.
@skyt-csgo376
@skyt-csgo376 7 ай бұрын
Awsome work!
@yousiftop7605
@yousiftop7605 7 ай бұрын
very enjoyable video
@nothingtobelie
@nothingtobelie 3 ай бұрын
Thank you for sharing!
@blvnktek
@blvnktek 7 ай бұрын
You got my sub sir!
@gabomandam7654
@gabomandam7654 5 ай бұрын
I just love a good simulation, and even better when it's on C.
@databasemadness
@databasemadness Ай бұрын
I am a senior software engineer and i am smiling :)
@benisrood
@benisrood 4 ай бұрын
Well done, you learned how to actually program!
@ShizoMoses
@ShizoMoses 3 ай бұрын
Wow. I feel immensely stupid right now. That was amazing.
@VulgoGS
@VulgoGS 4 ай бұрын
Awesome video !
@Dontlikeyellow
@Dontlikeyellow 7 ай бұрын
When you try to optimize but your project was made in python:
@Raskoll
@Raskoll 7 ай бұрын
Excellent video
@dantedellatogna
@dantedellatogna 7 ай бұрын
Now I want to do this by myself.
@uphomes12
@uphomes12 6 ай бұрын
so that face pull in Mario 64 is a masterpiece of my childhood.
@xylh5085
@xylh5085 5 ай бұрын
I definitely wanna give this a shot if I can save up enough for a laptop
@_david_548k_6
@_david_548k_6 5 ай бұрын
I don't understand nothing but this is art
@rgel3762
@rgel3762 7 ай бұрын
Just what I was looking for
Coding Adventure: Rendering Fluids
58:41
Sebastian Lague
Рет қаралды 489 М.
2024's Biggest Breakthroughs in Math
15:13
Quanta Magazine
Рет қаралды 509 М.
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
I Tried Making A Particle System
35:33
Acerola
Рет қаралды 319 М.
The Bubble Sort Curve
19:18
Lines That Connect
Рет қаралды 713 М.
My 2 Year Journey of Learning C, in 9 minutes
8:42
VoxelRifts
Рет қаралды 669 М.
The Most Important Algorithm in Machine Learning
40:08
Artem Kirsanov
Рет қаралды 547 М.
Coding Adventure: Simulating Fluids
47:52
Sebastian Lague
Рет қаралды 2 МЛН
The Vim Experience
45:19
Bog
Рет қаралды 246 М.
Python laid waste to my C++!
17:18
Sheafification of G
Рет қаралды 154 М.
Giving Personality to Procedural Animations using Math
15:30
t3ssel8r
Рет қаралды 2,6 МЛН
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19