JPS Stereoscopic Fractals

I recently purchased a LG TV capable of 3D display. It comes with passive 3D glasses (ie no shutters with polarised lenses – similar to the ones you wear in the cinema when watching a 3D movie).

The first thing that came to mind was how do I get Visions Of Chaos to output images that the TV will show in “real” 3D when wearing the glasses.

Firstly I discovered the MPO format. The official MPO spec is too complicated for me to implement and doing a quick web search for source code shows nobody else has worked it out who is willing to share a snippet. Note: if you have a left and right eye image file and need to combine them into MPO format you can use Stereo Photo Maker.

Then I found the JPS format which is a much simpler 3D image format to support. JPS is simply a JPEG image file with the two eye images side by side. The right eye image on the right and the left eye image on the left. Getting Visions Of Chaos to stitch the left and right images together into a JPS was simple, so now anyone with a JPS capable device will be able to see fractals (and any 3D output) from Visions Of Chaos in real pop out of the screen 3D.

Each JPS image should be HDV 1080p resolution (1920×1080 pixels), and each of the “eye” images needs to be resized/squashed to half width.

For example, this image

Mandelbulb Fractal

becomes this image with the squished right and left eye images

JPS Stereoscopic Image

If you have a device capable of displaying JPS images, download the above image, rename the extension to JPS and view it to see in real 3D.

Here are a few other sample images. Again they need to be renamed to JPS before viewing on a device that supports the JPS format.

JPS Stereoscopic Image

JPS Stereoscopic Image

JPS Stereoscopic Image

See more in my flickr gallery.

All of these images really “pop” on my TV and have impressed even non-fractal friends who have seen them. Visions Of Chaos now supports JPS stereoscopic images along with the usual anaglyph formats (red/blue, red/cyan, wiggle gif, etc).

The next step was to support 3D movies. All the 3D outputs in Visions Of Chaos now support side by side real stereoscopic 3D output. Here is a quick sample. On a 3D device you can look deep into the fractal structure.

More samples to come.

Jason.

Chaotic Oscillating Magnetic Pendulum Simulation

Sensitivity to initial conditions is part of Chaos Theory. The basic premise is that very tiny changes to how a system starts can have very large changes as the system evolves. An interesting real world example showing sensitivity to initial conditions is an oscillating magnetic pendulum such as the ROMP which used to be sold by ThinkGeek.

ROMP Pendulum

If the pendulum begins to swing near one of the magnets it will be attracted to it and stop. Nothing very exciting or surprising with that result. The interesting results occur when the pendulum is outside the range of any single magnet. Once released the pendulum will chaotically jump between magnets until settling on one of them. In this scenario it becomes impossible to guess which magnet the pendulum will end up at. Even if you hold the pendulum starting point as accurate as possible between runs, a hairs width difference can result in a different final magnet being settled on.

Visions Of Chaos has simulated magnetic pendulums for some time now. The code behind the scenes is based on Mathew Tizard’s code here.

The following image is the result of simulating the magnetic pendulum setup with the pendulum swinging over 3 magnets. Each pixel of the image is the location the pendulum is “released” and starts to swing. The pixel color is determined by which of the 3 magnets the pendulum finally stops and settles on.

Mandelbulb Fractal

Click to enlarge to see the finer details. That image was rendered with 10x supersampling to bring out the finer details. 10x supersampling is equivalent to calculating the image at 100x the size and downsampling in an image editing application. Each pixel is the result of averaging the values of 100 resulting starting points.

Here are some more results from the simulation. They use different colors, different numbers of magnets and zoomed in images.

Mandelbulb Fractal

Mandelbulb Fractal

Mandelbulb Fractal

Mandelbulb Fractal

Mandelbulb Fractal

Here is a movie sample that shows the magnet’s field strengths being changed from 0 to 1.5 over the course of 600 frames.

Jason.