Physics Simulations With Python and PyMunk
Vložit
- čas přidán 28. 07. 2024
- Welcome back to another video! In this video I am going to be introducing you to the module known as PyMunk and showing you that it is really easy to use and can do a ton of powerful things! I am going to show you a few demos and then go into a full tutorial where we actually build a project using PyMunk! I hope you enjoy!
💻Thanks to Altium Designer for sponsoring this video. Checkout the best PCD design software on the market by signing up for a FREE trial here: www.altium.com/yt/techwithtim
💻 ProgrammingExpert is the best platform to learn how to code and become a software engineer as fast as possible! Check it out here: programmingexpert.io/tim and use code "tim" for a discount!
⭐️ Timestamps ⭐️
00:00:00 | PyMunk Demos
00:03:39 | PyMunk Installation
00:05:31 | Pygame Event Loop
00:09:41 | Creating A Space
00:12:00 | Drawing The Simulation
00:16:16 | Creating A Circle
00:22:23 | Creating Floors and Walls
00:28:44 | Elasticity and Friction
00:30:56 | Launching The Ball
00:48:26 | Creating Obstacles To Hit
00:52:52 | Creating A Swinging Pendulum
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
👕 Merchandise: teespring.com/stores/tech-wit...
📸 Instagram: / tech_with_tim
📱 Twitter: / techwithtimm
⭐ Discord: / discord
📝 LinkedIn: / tim-ruscica-82631b179
🌎 Website: techwithtim.net
📂 GitHub: github.com/techwithtim
🔊 Podcast: anchor.fm/tech-with-tim
🎬 My CZcams Gear: www.techwithtim.net/gear/
💵 One-Time Donations: www.paypal.com/donate?hosted_...
💰 Patreon: / techwithtim
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
⭐️ Tags ⭐️
-Physics Simulations With Python and PyMunk
-How to do Physics Simulation
-Python
-PyMunk
-How to Use PyMunk
⭐️ Hashtags ⭐️
#TechWithTim #PhysicsSimulations
It's a rare experience to watch such clear thinking. I also debugged the same problems as you before watching how you fixed them. Major difference in time but I'm happy I found the errors. Feeling very inspired, thanks Tim!
You are absolutely amazing with this wide math pyhysics and programming knowledge. This aspects bringed together makes you fantastic programme. Thanks Tim
Can I use this to simulate my parents being proud of me?
That’s a big ask…
@@TechWithTim Dang, Tim with literally no chill 😂😂
lol
Yes
I really enjoy these physics simulations... please do more... thanks
A video about creating a Lap Time Simulator (for a race car in a given circuit) in python would be interesting. These physics videos are cool.
Your videos are always TRUE! Love all contents you made...
This video answered so many questions for me..thank you! There is not a lot of details on Pymunk (that are incomprehensible like the pymunk site) so more examples in a video would be fantastic. I am trying to build a pinball game from an image of a classic pinball game - that would demonstrate a lot of pymunk uses.
This guy is absolutely a genius! I wish I had his skills at his age!
The teacher's lectures are much more efficient and easier to understand than I( a beginner) read a whole book to study.
Additionally, I checked by entering the code while watching the video.
This is already the third time and has been done so cleanly without any errors. I followed along while watching your video about the solar system and Jupiter(Planet_Simulation with gravity effect) a few days ago.
You inspire me really!
Thank you for the great lecture!!
Thanks for your videos
Great as always
Tim, take this up as a challenge and perform fluid simulation using python!
Thanks a lot! Really helpful tutorial!
By the way: If somebody else run into "ValueError: cannot convert float NaN to integer" - I forgot to add mass to the structure. It seems you HAVE to set a mass here.
Nice, that was fun!
Great video Tim
This pymunk simulation is cool. Please do more.
I'd like to learn enough to create an object that has mutiple connected points with an attached stylus that uses a fourier mathematical superposition formula (comple x plane) to draw a wave in normal space.
This looks a great library. I thought when you rotated the camera everything would tip out
I'd love simulations that help visualize electromagnetism concepts! Things like electric/magnetic fields, propagating waves, solenoids, etc. Having simulations that can greatly help in visualizing these concepts!
Thank you so much!
Great video Tim! I was just wondering, how do you get the orange overlay on your pygame window instead of white?
a worth watching channel, very inspiring and thanks for sharing wonderful videos. Subbed and liked ! a fellow creator
Brilliant !
thansk Tim!
Amazing! I was just wondering if Pymunk / Pygame have any ability to deform an object under the exertion of a force / gravity? Would you make a video for this case?
@Tech With Tim
Thanks for this video. Can you show us how to make the flipper game too?
i remember watching a pygame tutorial by tim, that's when i had the idea to make my own physics engine lol it was super fun, i haven't finished it yet, i just halted it
wow, where;s your project now
finally a nice video
Hey Tim 👍❤️ highly expressed
Hi, nice video! I have a question, is there a way to add the rope when mouse down and when mouse up it's removed? I have tried to do it but it doesn't work...
Excellent tutorial! But I think we can skip the angle and distance calculation and just write :
force_x = (press_pos1[0] - press_pos2[0]) * 100
force_y = (press_pos1[1] - press_pos2[1]) * 100
Very updated Video 📸
So cool
Hello Tim, can you please make a ds algo series in python
I wish I had this video when I was studying physics at college
Cool, can u make a video about making a game using both pygame and pymunk
hello tim. so i did everything till 21:39 and when i ran the program , it crashed with the error "TypeError: 'Vec2d ;' object is not callable.
i then tried to fix it in a few ways , changing names of the fnctions and then trying different values in the function and its still not fixed. I tried to look up on google too to try to see the documentation and understand whats going on but still had no idea. could you please help me fix it?
What do you think about programming language Pascal?
DId PyMunk can do destory ground effect, like a ball hit ground, the ground make a hole
What is the purpose of separately importing "pymunk.pygame_util" when "pymunk" is already imported?
does it work in 3D space?
Fun!
Can this be used to create a model rocket simulator?
Is this something I can put on my resume?
Wow that's very useful I was worried about how to make this simulation and test an AI creature in it
I get errors related to pylance. how do I resolve this?
28:56 you mean, you need conservation of momentum, not elasticity in order for the ball to "bounce".
should i download pycharm?
35:00 I've seen enough Super Mario 64 speedrun videos to know where this is going.
Hello instructor, I have a question to ask you are: I don't have good logic, I learn math is about just C, Can I become software developer without not good logic ?. Question 2: Can I get a software developer position in enterprise with an associate degree not bachelor degree at USA?
'The ball shoots the the wall when the velocity is too high because the frame update hasn't checked for the collision before the ball moves past the wall' ... Dang that sounds suspiciously alot like quantum tunneling lol.
Thank you from India.
can you provide full code?
More pymunk plssss
21:35 'Circle' object has no attribute 'add' line 22 why???
fixed it
34:41 That's escape velocity lolz
Hey Tim. I purchased your Programming Expert yesterday and the website is not loading properly. I have tried everything. Deleting the cookies and tried to open it in an incognito window. But the Programming expert website is down for no reason. But the Algo Expert Website is working fine. Kindly check about the issue.
Ive also purchased and its working fine for me. Tried just now. Both on pc and on android. I use chrome. I really like the course also, it was beyond expectation
Can u try on a different device? I don’t see any issue on my end as well. Please ensure you clear the cache (not just the cookies) and then reloading the website.
I like writing code in sublime text, but don't know how to run/give input. Please tell me how to do that.
You can’t in sublime
@@TechWithTim Then how are you running it in your's?
@@akrzha run code in Command line by giving the file name OR Look in the Tools menu for Build System and Build.
bro please make a video on automating whatsapp messages using python or any language
I love Python more now
Tim can you make DJANGO tutorials
He already did before
@@hypermeero4782 nah I’m talking about more Django apps, like a social media clone, chat application etc
what are you coding this on I've tried python IDEL and it didn't work
IDLE*
nice
Tim: does physics simulation
Also Tim: doesn't know how to spell pendulum 😅
'THIS TUTORIAL IS NOT FOR BEGINNERS' *Proceeds to explain what a break statement is...*
37:32 watch the webcam its kinda sus
Breh... rolling balls kek
beware long functions
Can u make numpy tutorial
i am noob in pygame 0-0
dude,code available?
Fourth!
God bless chatgpt