Double-Pendulum | A p5.js simulation of a Double Pendulum
kandi X-RAY | Double-Pendulum Summary
kandi X-RAY | Double-Pendulum Summary
A p5.js simulation of a Double Pendulum.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Double-Pendulum
Double-Pendulum Key Features
Double-Pendulum Examples and Code Snippets
Community Discussions
Trending Discussions on Double-Pendulum
QUESTION
I am trying to implement the classical RK4 algorithm to solve the system of differential equations which govern the equations of motion. However, I am having several problems for a while. The equations of motion can be written as below:
Since this is a system of first order differential equations, we are ready to use RK4 to solve it. However, I am really lost in regards to writing the system above in python code.
There is a related question here: System of second order ODEs Runge Kutta 4th order which writes the system of ODES for a different physical system into Python code and also uses RK4 to solve it. However, I have not been able to use that to make my own code work. There is another question I want to have the pendulum blob in my double pendulum which is closer to what I want, but it does not take care of the process by using arrays, but rather by writing several equations instead.
...ANSWER
Answered 2021-Jul-12 at 00:04You are not using the passed state variable in the derivatives function, you just set the state to a constant. You should have a line like
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Double-Pendulum
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page