Double Pendulum
About
Hi everybody !
I am back with another small game dev exercise, and this time, I am tackling a fascinating piece of physics.
Showing a strange behaviour and also referred as chaotic motion: the double pendulum will be our simulation for today. This simulation is said to have a "sensitive dependence to initial condition", meaning that the slightest alteration in the position, length and/or mass of any pendulum or pretty much anything else (gravitational constant, air pressure, rigidity of the string, etc...) at the beginning of the simulation will have a huge impact on the evolution of that said simulation. Of course, we won't be able to change the air pressure or the rigidity of the string here (sadly), but we will be able to modify the core components of the pendulum.
*This simulation is not using the default Unity physics system. Instead, it is simply calculating the position of each pendulum depending on the velocity and angular acceleration of both pendulums, each frame.*
The controls are very simple and will require a keyboard (pretty much only the [Space] key) and a mouse. In this simulation, you will be able to modify the position, length and mass of each pendulum.
*I feel like this project is finished but I may end up adding couple features in the future, like a way to come back to the previous initial state of the pendulum to be able to observe the differences when modifying some initial conditions, a way to modify the gravitational constant (G) in-game, or even different presets for the trail...*
This small project has been developed using Unity 2019.3 and is available on GitHub at this address: *coming soon...*
You can 100% use this project, without any limitation. You can pass it on, modify it, or anything else that your heart desire! (...credits are still appreciated though :)...)
Stay safe and thank you for taking a look at this very cool simulation!
Sincerely,
Bistro
PS: I am thinking about starting a Youtube channel with some tutorials on the development process of thoses little exercises. Leave me some comments if that is something you might enjoy or not...