Solving The Equations for a Spinning Top in Python

Поделиться
HTML-код
  • Опубликовано: 5 авг 2024
  • In this video I simulate and animate a 3D spinning top by solving Lagrange's equations in python, and animating the spinning top in Matlab.
    Finding Moment of Inertia Tensor for Any Object:
    • Moment of Inertia For ...
    Code:
    github.com/lukepolson/youtube...
    Discord:
    / discord
  • НаукаНаука

Комментарии • 28

  • @chachachachang
    @chachachachang 3 года назад +3

    So, is this like a gaming channel for solving differential equations? As an instructor for ODEs I really appreciate that you are stepping up the challenge for all of us. Great job!

  • @cambridgebreaths3581
    @cambridgebreaths3581 3 года назад +4

    Man I like your tutorials. Want to binge watching soon. Wish me luck. All the best for your channel.

  • @kashu7691
    @kashu7691 3 года назад +10

    this is so cool, your videos are seriously valuable keep it up man

  • @ricardoferes9051
    @ricardoferes9051 2 года назад +1

    Hey man, I am a mechanical engineer from Brazil, and this content is awesome.

  • @andresderudder9950
    @andresderudder9950 3 года назад +1

    Hi Mr, I study physics in UBA (Argentina) and I'm new in the channel, your videos are great!

  • @jcmschott1895
    @jcmschott1895 2 года назад

    Really nice stuff, Mr P Solver! I was just wondering if it was possible to implement this animation in Blender, maybe by exporting the data containing the solution and key-framing a spinning top modeled in Blender.
    Another question: have you ever wondered about using Blender and all its shiny, glossy and nodes-editor features to visualize your data?
    Once more, thank you so much for this huge inspiration and all the nice content!

  • @nestorcaticha8940
    @nestorcaticha8940 Год назад

    Very nice lecture, informative and clear. A minor comment is that omega $\vec \omega $ is the angular velocity, not the angular momentum, given by $I \vec \omega$

  • @taybabusra1695
    @taybabusra1695 3 года назад +3

    Watching your video regularly,can you please make video on epicycle drawing details on python

  • @hussainhassan8264
    @hussainhassan8264 2 года назад +3

    when I used this
    sols = smp.solve([LE1, LE2, LE3], (the_dd, phi_dd, psi_dd),
    simplify=False, rational=False)
    and
    sols[the_dd]
    it continues to run for more than 1 hour and it did not stop!
    thanks

    • @MrPSolver
      @MrPSolver  2 года назад +1

      You probably need an earlier version of sympy! Try installing version 1.6. For some reason there is a bug in the newer versions

    • @oriolpelegriartola6019
      @oriolpelegriartola6019 2 года назад

      @@MrPSolver I have also this problem, and when I try to install sympy version 1.6, anaconda asks for python 3.6, which I can't install because there is conflict with almost all the libreries I have installed. What do you suggest I should do?

    • @hadiyad854
      @hadiyad854 2 года назад

      Same issue for me. Solved by installing version 1.6. of sympy! Now it takes only 3 sec. Weird Bug!

    • @WRGQWRED
      @WRGQWRED Год назад

      @@oriolpelegriartola6019 try creating a new environnement with python 3.6, some of the libraries might still work

  • @felixlupp1545
    @felixlupp1545 Год назад

    It doesn't work for me I get TypeError: can't convert expression to float in the odeint function. anyone know how to fix this?

  • @NaneRulz
    @NaneRulz 3 года назад

    Great content. How about using fenics as pde silver?

    • @MrPSolver
      @MrPSolver  3 года назад +3

      I've been looking into this. It's a steep learning curve but definitely something for the future.

  • @frankkoslowski6917
    @frankkoslowski6917 Год назад +2

    Same problem as with the 3D-Pendulum.
    The expressions sympy.solve([LE1, LE2, LE3], (the_dd, phi_dd, psi_dd), simplify=False, rational=False)
    is expected to tackle are soo long that the process of finding a symbolic solution was shown to take seemingly forever.
    Are you using a professional version of Python implementing precompiled code capable of streamlining the process perhaps?
    You are also doing something rather unorthodox here: sols[the_dd]
    namely, indexing with a symbolic expression of the 2nd derivative of Theta, rather than an Integer commonly used for slicing. 😭

    • @joansgf7515
      @joansgf7515 11 месяцев назад

      I imported the code and it is stuck at this line forever...

  • @tylervandermate6818
    @tylervandermate6818 Год назад

    Now do it using quaternions 😩

  • @arthuresse2990
    @arthuresse2990 Год назад

    Your videos are awesome. My sadness is that I don't understand English perfectly, but with patience I'll understand. I'm trying to understand the code "R@smp.Matrix([0,0,1])". What does this "@" mean?

  • @aqueeqazam
    @aqueeqazam 3 года назад +3

    You are a carbon copy of elon musk man. I am from India and I am great fund of your tutorial.