Showing posts with label chaos. Show all posts
Showing posts with label chaos. Show all posts

Saturday, April 14, 2012

Wall Mounted Double Pendulum for Experimental Photography

(or how we went to outer space shot some galaxies and came back)
Through the lens of Abir Ghattas

My first interest in chaotic behavior can be traced back to this post. This time however, instead of simply developing a simulator I decided to build a real double pendulum. Watching a double pendulum dance erratically was worth a million simulation. If you are follower of this blog you will realize instantly that I could never let this opportunity pass without transforming it into some sort of a crazy experiment (-mostly photographic-).
 
The first step in the process was the design of the pendulum. The dimensions were chosen such as to maximize the chaotic behavior. Click here to download the AutoCAD .dwg file.

All dimensions are in cm
The material was chosen to be transparent 2mm thick plexiglass (4mm would have been ideal-but it was not available). The reason I chose to use a transparent material was so that the light can pass through in photography. I would definitely choose another material if I was using the pendulum for decorative purposes.

As for the components needed:
- 6mm ball bearings x4
- 6mm Hex Screw with nuts and washers  x2
- 3mm wall mounting screws and screw anchors x2

The following slideshow displays the assembly process


Here's a video of the double pendulum in action


After the assembly, Abir Ghattas and Patrick Abi Salloum came over for the photoshoot. We used LEDs of different colors connected to 3V coin batteries and we took long exposure pictures in the dark.
Left to Right: (1) Abir painting the pictures with LEDs (2)focusing (3) Patrick vs. Abu Ali
Courtesy of Patrick Abi Salloum

"Angel of Death" courtesy of Patrick Abi Salloum
For the result check Abir's website: http://abirghattas.com/double-pendulum-experimental-shoot/
and Patrick's flickr: http://www.flickr.com/photos/patrickas/7072749767/in/photostream

Tuesday, August 23, 2011

Chaos Theory: Simulating a double pendulum to understand how I owe my existence to Gaddafi's apple

"Does God Play Dice? The New Mathematics of Chaos" is a beautiful book by Ian Stewart. It provided me with a valuable introduction into the concept of chaos and chaos theory. Motivated by the book I decided to experiment with Chaos and write a dynamics simulator on MATLAB to simulate a 2 degrees of freedom pendulum (double pendulum).

In chaos theory 'Chaos' does not necessarily mean random (or a state of disorder). "Chaos occurs when a deterministic system behaves in an apparently random manner"Chaos is actually all around us. Chaos is the rule rather than the exception.

It is only when you think that everything is under 'control' that you wake up one morning to see that yesterday's weather forecast was all wrong and there is a huge storm outside, you check the stock market only to find out that you have lost thousands of dollars. HELL! you turn on the news only to realize that  suddenly the Libyan people rose against a crazy tyrant who ruled them for 42 years. Chaos.

An important characteristic of Chaotic systems is their high sensitivity to initial conditions. Even for a deterministic system (with no random elements), this high sensitivity to initial conditions is what causes the impossibility of long term prediction of the system's behavior. A slight change in the initial conditions would yield completely different and diverging end results.

To experiment with Chaos, I wrote a dynamic simulation of a double pendulum (2DOF pendulum) on MATLAB. The double pendulum is a classical example of Chaos theory.   I used the "Simple Forward Kinematics library for Robotic Chains" that I developed back in 2010 (click here to download), and I developed a new library to compute the joint-space dynamic equations and to perform the simulation for any kinematic chain (click here to download). So back to our chaos theory. To experiment, I ran two simulations:
- The first (on the left in the video below) is a simulation with a base joint initial position of 130 degrees
- The second (on the right in the video below) is a simulation with a base joint initial position of 129 degrees



Notice that although the initial conditions are almost the same, a difference in the trajectory begins to be noticeable only after 7 seconds. This difference increases as time passes. And after 40 seconds we notice that each pendulum is located on a totally different position in space.
We've all heard of the vivid and beautiful term "the butterfly effect". Here it is. The impossibility of predicting the long term behavior of the pendulum.

In 1972, Muammar Al-Gaddafi, while having diner in his tent and surrounded by his beautiful amazonian guards, decided to eat an apple rather than a banana. Imagine he ate the banana instead and it turned out the banana was contaminated with a deadly bacteria. He would have died after a month of suffering. Libya would have been 'inherited' by a crazier person (as is always the case). This person would have changed the entire political scene in the region, maybe causing the Lebanese civil war to be more intense. My father would have decided to flee the war and immigrate to Canada and he wouldn't have met my mother.  I wouldn't have existed. I owe my existence to Gaddafi's apple.

MATLAB Files:
- Simple Forward Kinematics library for Robotic Chains
- Dynamics Simulator for Kinematic Chains