Lately Youtube has been recommending me random Chaos theory videos and how small changes to input of a system can lead to huge changes in the Output.

The Output of system diverges vastly from the input even for very small difference in initial input conditions. Me being the type of person I am, decided to make a double pendulum system, cause processing is a really fun library to play around with and I wanted to try it out.

I worked on some basic projects from TheCodingTrain and Nature of code and this is one of them. Reference

Basic Implementation idea : Pivoting a point at p1,p2
now with a fixed length find a point lets say elbow e1,e2

to find the e1 and e2 with length l1, You can do : e1 = l1 * cos(theta);



Now once we get the base 2 lines and points attached basically plugging in the formula for theta1 and theta2 their velocities (angular) and accelerations. V


And here's my implementation. [ Click the image to try it out ]

Hope you enjoyed this post.