The Double Pendulum in PYTHON

  Рет қаралды 30,637

Mr. P Solver

Mr. P Solver

Күн бұрын

In this video I derive the system of differential equations for the double pendulum using sympy, solve the system of equations numerically using scipy's odeint function, and create an animation of the double pendulum using matplotlib.
Code:
github.com/lukepolson/youtube...
Discord:
/ discord
Spinning Top:
• Solving The Equations ...
Double-Springed Pendulum:
• The Double-SPRINGED Pe...

Пікірлер: 45
@fateenahmed659
@fateenahmed659 2 жыл бұрын
This is exactly what i was looking for. Thank you for the amazing tutorial and explanation!
@blackguardian89
@blackguardian89 2 жыл бұрын
Mr. P Solver uploaded a new video... This day just becomes better :) Double pendulum - absolute classics! Thanks, man!
@adityaariewijaya9284
@adityaariewijaya9284 2 жыл бұрын
You're a very good teacher. Thanks for this. Would there be any future video on FEM on Python?
@mingshey
@mingshey Жыл бұрын
Whoa, wonderful job! I’ve been working on the same problem with Maxima. The process is essencially the same. I’ve been expanding the program to deal with generic number of multiplicity of the pendula. But the burden of symbolic manipulation of differential equations grew above the capacity of my computer when the number of bobs was larger than 4. I think I should try to attack the problem in colab with sympy. Great thanks for sharing!
@julyatonon5115
@julyatonon5115 2 жыл бұрын
incredible video, i learnt a lot. thank you.
@hsh7677
@hsh7677 2 жыл бұрын
Thank you so much!! Very helpful!
@cambridgebreaths3581
@cambridgebreaths3581 2 жыл бұрын
Man you are a blessing. Thank you a million. Can you please just recommend a perfect starting point to learn differential equations for a beginner from 0 to 1 , with the same level of depth, clarity and and an ultimate goal to master the all the variety of diff equations to the highest level possible. Thank you kindly again
@MrPSolver
@MrPSolver 2 жыл бұрын
I think for next week I'll make an entire video just about differential equations in python.
@cambridgebreaths3581
@cambridgebreaths3581 2 жыл бұрын
@Mr. P Solver Brilliant. Am sure it will be mesmerising. Thanks
@hsh7677
@hsh7677 2 жыл бұрын
@@MrPSolver can’t wait!!!
@prietjepruck
@prietjepruck Жыл бұрын
Great explanation, thanks a lot.
@alekseykozin8108
@alekseykozin8108 Жыл бұрын
You are awesome, thank you very much for your work
@agustinbrusco7173
@agustinbrusco7173 2 жыл бұрын
really good video, thanks a lot. although I must admit I arrived hoping for some insight into the physics.mechanics module of sympy. Are there any reasons you choose to do things this way? I also use sympy like you did in the video, but I'm interested in knowing if there are any advantages on learning the whole sympy.physics.vectors and .mechanics, over just implementing the sympy variables and functions like this anyway, you just earned a follower, greetings from Argentina!
@AryVinicius
@AryVinicius 2 жыл бұрын
Awesome video. I'll give this a try to practice. Maybe the next video is about adding friction in the joints? 🤔
@MrPSolver
@MrPSolver 2 жыл бұрын
This is a fantastic idea! Definitely will show up in a future video
@GuizinGuizao
@GuizinGuizao 9 ай бұрын
Great video and excellent git
@ItumelengS
@ItumelengS Жыл бұрын
High quality stuff here😮
@ilyashulika3538
@ilyashulika3538 Жыл бұрын
What a great video )))
@babajani3569
@babajani3569 2 жыл бұрын
Hello. Sorry about my ignorance. I don't actually know much about programming but I had a question if it is all right with you. Did you solve the Euler Lagrange equations using the Runge Kutta method? If not then is there to just immediately employ the Runge Kutta method to the Lagrange's of motion without deriving them first on python. Thank you.
@AJ-et3vf
@AJ-et3vf 2 жыл бұрын
Awesome! Immediately saw this right now on being uploaded and immediately watched. Once again, very nice and inspiring. Now next do a spherical double pendulum 😁😁😁 haha jk.
@Serena-nm8sd
@Serena-nm8sd 2 жыл бұрын
Hi, thank you so much for this. I was wondering, what do simplify=false and rational=false mean? Thank you in advance
@nsumanth18
@nsumanth18 2 жыл бұрын
Nice video! A doubt - How to trace the path of the two pendulums?? i.e. How to make their path visible?
@ivolol
@ivolol 2 жыл бұрын
You might consider making a video that could use a PID to get the pendulum holding upright? Not sure if PID works for that or not
@marijnpf
@marijnpf 2 жыл бұрын
Have you found a way?
@shohrehhoushmandsajjadi1861
@shohrehhoushmandsajjadi1861 2 жыл бұрын
Thank you so much for such a nice presentation. It was greatly helpful. Could you also go through plotting time and energy of the system?(E=T+V)
@lucid_
@lucid_ 9 ай бұрын
Wouldn’t that be constant? Assuming we ignore air resistance
@scar6073
@scar6073 2 жыл бұрын
I'm coding it as I'm watching. Planning to impress my friends lol
@JulieStardoll
@JulieStardoll 2 жыл бұрын
could you do one on solving kepler problem?
@AmoghavarshaN
@AmoghavarshaN 2 жыл бұрын
Awesome
@owisalsabbagh7577
@owisalsabbagh7577 7 ай бұрын
very nice explaination, I tried using the same principle to simulate a double inverted cart pole. After adding and modifiying the equations to include a cart and its movement and the force applied on it , but I faced an error when trying to use odeint the way you explained in the video. any tips?
@marcrindermann9482
@marcrindermann9482 Жыл бұрын
is there a reason not to simplify the expressions for the second derivatives?
@Kakikiwi-eu2kr
@Kakikiwi-eu2kr 10 ай бұрын
I'm trying to replicate, and I've got one little ugly problem: sympy outputs are not wrapped into multiple lines like he has for cell 24, 27, etc. I get one loooong line I have to scroll through. Anyone faced that problem ?
@h2o11h2o
@h2o11h2o Жыл бұрын
nice
@jiswinvarghese1326
@jiswinvarghese1326 2 жыл бұрын
list index out of range 'tuple' object is not callable i got these errors in the last line of code "ani.save('double_pendulom.gif',writer='pillow',fps=25)" . so could not run see the animation. apart from that everything was fine.
@gerrievanstaden3416
@gerrievanstaden3416 2 жыл бұрын
I had the same issue. My fix was that I made a spelling error in my animate function. After I fixed that it worked perfectly
@jiswinvarghese1326
@jiswinvarghese1326 2 жыл бұрын
@@gerrievanstaden3416 Thanks bro i will lookinto that
@muhammadikbal8944
@muhammadikbal8944 2 жыл бұрын
why is my animation not moving?
@mindeys
@mindeys Ай бұрын
Looks like 3 body problem. Also has 3 points.
@user-lo2qv8wz8f
@user-lo2qv8wz8f Жыл бұрын
love from outerspace
@I_am_FRANCO
@I_am_FRANCO 10 ай бұрын
22:22 friction¿
@haritssyah7434
@haritssyah7434 11 ай бұрын
your face takes up quite a bit of the screen, blocking anything behind it
@I_am_FRANCO
@I_am_FRANCO 10 ай бұрын
7:51
@skillick
@skillick 2 жыл бұрын
If your animation isn't working at the end, check the second last line, try changing it to: ani = matplotlib.animation.FuncAnimation(fig, animate, frames=1000, interval=50)
@deusexmachina3091
@deusexmachina3091 Жыл бұрын
That didn’t work for me any other ideas? Everything seems fine but the animation is just generating an image not a gif.
Photon Beam Attenuation in Python
18:55
Mr. P Solver
Рет қаралды 5 М.
Is it Possible to Predict Randomness? The Double Pendulum Experiment
6:41
Stupid Barry Find Mellstroy in Escape From Prison Challenge
00:29
Garri Creative
Рет қаралды 20 МЛН
Why You Should Always Help Others ❤️
00:40
Alan Chikin Chow
Рет қаралды 134 МЛН
Which one is the best? #katebrush #shorts
00:12
Kate Brush
Рет қаралды 26 МЛН
The Bubble Sort Curve
19:18
Lines That Connect
Рет қаралды 438 М.
Pendulum Motion in PYTHON
23:49
Mr. P Solver
Рет қаралды 16 М.
Coding Challenge 93: Double Pendulum
31:11
The Coding Train
Рет қаралды 915 М.
Solving Differential Equations using scipy.odeint in Python!
25:10
Equations of Motion for the Double Pendulum (2DOF) Using Lagrange's Equations
20:33
Good Vibrations with Freeball
Рет қаралды 160 М.
More Practice with Lagrangian Mechanics in Python
23:50
Mr. P Solver
Рет қаралды 14 М.
Chaos: The Science of the Butterfly Effect
12:51
Veritasium
Рет қаралды 7 МЛН
The Chaos of Double Pendulum (Lagrangian Analysis | EOM | Simulation | CHAOS)
40:20
CUDA Programming on Python
21:34
Ahmad Bazzi
Рет қаралды 1,1 МЛН
Lid hologram 3d
0:32
LEDG
Рет қаралды 5 МЛН
Gizli Apple Watch Özelliği😱
0:14
Safak Novruz
Рет қаралды 3,3 МЛН
Ждёшь обновление IOS 18? #ios #ios18 #айоэс #apple #iphone #айфон
0:57