06 - The simplest way to simulate a triple pendulum

  Рет қаралды 15,536

Ten Minute Physics

Ten Minute Physics

Күн бұрын

Пікірлер: 32
@AJWeeks
@AJWeeks 3 жыл бұрын
Great explanation :) There is a small typo in the equation at 2:37 though, weights should be divided by w1+ w2, not w1 + w1.
@novidtoshow
@novidtoshow 2 жыл бұрын
I think it would be good to plot the total energy of the system in time. This would help us understand whether the solution is dissipative or not.
@samsaraAI2025
@samsaraAI2025 9 ай бұрын
I am loosing energy, even with a single pendulum what could be the reason?
@novidtoshow
@novidtoshow 9 ай бұрын
@@samsaraAI2025 Your time integration is not conservative. The numerical discretisation is "leaking" energy. Use a 4th-order Runge-Kutta or a time-implicit method like backwards-Euler.
@THarshavardhanReddy
@THarshavardhanReddy Ай бұрын
@@samsaraAI2025 Euler integrations are approximations for non-infinitesimal dt.
@EastingAndNorthing
@EastingAndNorthing 3 жыл бұрын
You are my lord and saviour Matthias!!!
@TenMinutePhysics
@TenMinutePhysics 3 жыл бұрын
May the physics be with you ;-)
@7steelrainbow
@7steelrainbow 2 жыл бұрын
Thank you for this great tutorial. Seeing that match of the trajectory with the analytic method is amazing.
@konstantinbondarenko5235
@konstantinbondarenko5235 Жыл бұрын
Thank you for this great tutorial.
@mingshey
@mingshey Жыл бұрын
I've recently started simulating double and triple pendula. I use Maxima to generate the necessary ODEs from the Lagrangian and then feed them to the rk(RK4 iterator) function. That way I can avoid coding the haywire ODE directly. I check the mechanical energy drift to see if the calculation is dissipative.
@dalegriffiths3628
@dalegriffiths3628 Жыл бұрын
Super cool video, got it working great in python too - thanks very much.
@shulehr
@shulehr Жыл бұрын
i think video would reach wider audience if there was something about constraints and rope/cloth in the title. Most people aren't interested particularly in pendula
@landsgevaer
@landsgevaer Жыл бұрын
You should be able to estimate the error by solving with two different step sizes. That works for any number of links.
@BlaseAnDerHand
@BlaseAnDerHand Жыл бұрын
Merci, guets tutorial.
@herseem
@herseem Жыл бұрын
This is fascinating. I've written a 2D gas flow simulator which was relatively easy, and it exhibits patterns you'd see if you were watching water flowing flowing through a similar shape where the height of the water is analogous to the pressure of the gas at any given point. One thing interests me greatly though: From the path of the end point, what method would you use for working out the structure of the pendulum? ie, how many links and which weights? I have a reason for wanting to know how to do that. It's essentially reverse engineering a chaotic pattern which of course has multiple applications, preferably without doing a brute force method.
@santiagozera
@santiagozera 2 жыл бұрын
This is beautiful. Are there any books to learn this stuff? Could you enumerate some, please? Thanks in advance
@adelelopez1246
@adelelopez1246 3 жыл бұрын
Is there a simple way to make sure energy is conserved, even with less steps?
@TenMinutePhysics
@TenMinutePhysics 3 жыл бұрын
You can measure the energy loss and add it evenly to the particles. However, objects are typically highly damped so instead of pumping energy into the system, extra damping terms are added to the equations in general.
@Zymplectic
@Zymplectic 3 жыл бұрын
@@TenMinutePhysics That's not a good advice. Compensating energy errors by arbitrarily modifying the energy will generate errors - it is not symplectic, it is not time reversible and it will not exhibit a correct behavior in phase space. Masking numerical errors with damping effects is not really an option if your system is supposed to be energy-preserving To conserve energy with less time steps, you'll obviously want to use higher order symplectic integrators.
@TenMinutePhysics
@TenMinutePhysics 3 жыл бұрын
@@Zymplectic Yes, that is not really physically correct. Some people have done it in graphics. However, as I said, the real strength of PBD is not energy conservation but robust handling of zero-compliance constraints and simplicity. In the real world, nearly energy conserving systems are rare. In contrast, most objects are highly damped which is the reason why additional damping terms are used significantly higher than the numerical damping introduced by implicit integrators. In contrast, stretchy cloth looks really bad - if not intended :-)
@Zymplectic
@Zymplectic 3 жыл бұрын
@@TenMinutePhysics It wasn't a critique of the video which is on point, but merely to the "out of context"-point of arbitrarily adding energy to compensate for dissipative numerical errors. The real world being "inaccurate" does not prevent us from making accurate energy-preserving simulations though. I'd agree that energy conservation is typically not what you want for cloth simulations. Unless the cloth is floating in space...
@leoli440
@leoli440 Жыл бұрын
wonderful :)
@santiagozera
@santiagozera 2 жыл бұрын
Awesome!
@samsaraAI2025
@samsaraAI2025 9 ай бұрын
I made the same algorithm using c#. It works but I can see a global dumping of the energy even with a single pendulum. What could be the reason? Thanks!
@AdityaChaudhary-oo7pr
@AdityaChaudhary-oo7pr 2 жыл бұрын
Thanks !! subscribed
@ghostbusterz
@ghostbusterz 10 ай бұрын
In code you subtract the actual distance *from* the rest distance (L0 - L), but in the mathematical equation you show subtracting the rest distance *from* the actual distance (L - L0). This is quite confusing.
@BooBaddyBig
@BooBaddyBig Жыл бұрын
Your hard constraint of position method does not conserve angular momentum. You should adjust the tangential velocities as you move the particles.
@SellusionStar
@SellusionStar 2 жыл бұрын
When I first implemented a double pendulum (using analytical equations) I thought I'm "stimulating" it. But that wasn't true of course. At least if we don't consider the integration part. I then tested Euler method vs RK4, to see which is more stable. It would be interesting to see which is faster (amount of operations vs. substeps)
@ai_serf
@ai_serf Жыл бұрын
Damn... So, there's no analytic solution to the derivative of a 2 pendulum problem. I feel sad when I see you're sim diverge from the analytic path. I wish we could simulate reality a bit more accurately for personal reasons. I understand for games and practical applications, the accuracy is good enough with numerical methods.
@tortue5080
@tortue5080 Жыл бұрын
good but you shoud delete the video, because i'm about to do so much better
How to train simple AIs to balance a double pendulum
24:59
Pezzza's Work
Рет қаралды 274 М.
09 Getting ready to simulate the world with XPBD
15:38
Ten Minute Physics
Рет қаралды 22 М.
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 651 М.
ACT PROBABILTY -SOLVED PROBLEMS -اسهل شرح م رابعه فراج
1:31:25
Rabaa Farrag (Math EST-ACT COURSES)- م رابعه فراج
Рет қаралды 4
11 - Finding collisions among thousands of objects blazing fast
11:04
Ten Minute Physics
Рет қаралды 26 М.
10 - Simple and unbreakable simulation of soft bodies
13:53
Ten Minute Physics
Рет қаралды 19 М.
What's the big circle on my wall?
4:35
Make Anything
Рет қаралды 6 МЛН
The Surprising Secret of Synchronization
20:58
Veritasium
Рет қаралды 26 МЛН
"Pendulum Painting" is a NIGHTMARE!
15:34
Jazza
Рет қаралды 2,7 МЛН
3 Amazing Magnetic Accelerators | Magnetic Games
4:47
Magnetic Games
Рет қаралды 24 МЛН
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН