Modeling a double pendulum in python

Поділитися
Вставка
  • Опубліковано 15 жов 2024
  • Here is a short tutorial going over the code for my double pendulum model.
    code: www.glowscript....

КОМЕНТАРІ • 9

  • @diesel7599
    @diesel7599 3 роки тому

    Using the Euler step won't show a constant energy sadly. The errors would pile up

    • @sethlupo4736
      @sethlupo4736 3 роки тому

      Yeah, I tried to do that in a n - masses pendulum in java. I innocuously used the Euler method because I normally think of plainly adding acceleration to velocity and velocity to position, but it added up within a few seconds till all of the values got too big to store. I tried to constantly compensate for the increasing energy by scaling up and down the speeds to compensate for the error, but it weirdly made it so that it always fell into the weird wave symmetrically waving back and forth. I really want a simple integration method that can make an accurate simulation without energy continuously adding to the system.

  • @ImThatGuy9000
    @ImThatGuy9000 5 років тому

    Sphere is not defined? Any help with this error.

    • @rhettallain
      @rhettallain  5 років тому

      are you on glowscript.org? If you are on trinket.io be sure to select "new->glowscript" instead of "new-python"

    • @rhettallain
      @rhettallain  5 років тому

      oh, did you write it as "sphere()" or "Sphere()" - python is case sensitive. It should be lower case

  • @aliabbasi1745
    @aliabbasi1745 4 роки тому

    Do you use euler step

  • @es-yy2cm
    @es-yy2cm 3 роки тому +1

    Real physicists use FORTRAN :)

    • @coolfred9083
      @coolfred9083 3 роки тому +3

      Real physicists use pure binary machine code