Swapping time and space
June 20, 2016 7:09 AM   Subscribe

Swapping time and space
I was curious to know what it would look like if you swapped the time axis with one of the space axes (x or y). I tried it on a random sampling of short black-and-white movies.

My personal favourite is the rotating galaxy. I still haven't quite wrapped my mind around what's going on in the time-space-swapped views.

I was only smart enough to do this in 2D. (Or 3D, I guess, if you're counting time as a dimension...) If someone wants to take the idea and create a 3D version for VR so that you can swap x, y or z, that would be fine by me.
Role: did everything
posted by clawsoon (7 comments total) 3 users marked this as a favorite

These are pretty fun! I especially like the sonogram of the heart. Looking at these, it helps me to think of them as analogous to the "z-stack" animations used sometimes to present microscopy or MRI data, where the frame is "moving through" a static three dimensional volume. For these, the frame is "moving through" a series of space-time plots showing how a single linear cut through the original 2d image evolves through time.

Also fun to think about what you would get by doing rotations of these animations of less than 90 degrees in a space-time plane. This starts to produce something similar to the Lorentz transformation of special relativity. (Strictly speaking the Lorentz transformation is a hyperbolic rotation, see the box titled "Lorentz boost (x direction with rapidity ΞΆ)" on the Wikipedia page.)
posted by biogeo at 10:50 AM on June 20, 2016 [1 favorite]


Looks like the medical example could find patterns the could be of use diagnostically.
posted by sammyo at 6:18 PM on June 25, 2016


neat. What are these licensed as? because I kinda want to use the images for a larp or something.

I think it would be interesting to swap these not just with x/y but with polar coordinates.
posted by gryftir at 4:01 PM on July 1, 2016


Looks interesting. Just curious, how does this work? How are you able to animate it all on the page?
posted by LarryMan at 8:38 AM on July 7, 2016


gryftir: What are these licensed as?

That is something I haven't thought about. The ones based on videos would be in a grey area, since they're not my videos.

LarryMan: Just curious, how does this work? How are you able to animate it all on the page?

It was a multi-step process. I don't have the code on me today, and it's been a while since I did these, but I'm pretty sure it went more-or-less like this:

- Use ffmpeg to extract the video into a series of images.
- Use the Python Imaging Library to load all the images and read the pixel values.
- In Python, create a series of time-swapped images, inserting the appropriate pixel values from the original images.
- Use ffmpeg to create a movie from the time-swapped images.
- Use jwplayer to allow website playback.

I suppose I should post the code at some point.
posted by clawsoon at 9:03 AM on July 7, 2016


A correction to my earlier comment: I didn't use the Python Imaging Library. Instead, I used scipy.misc.imread and scipy.misc.toimage. And because of memory limitations, I wasn't able to load and process the entire image at once; instead, I had to load a single frame at a time and, from it, write a single row to each of the time-swapped images. Then load the next frame, and write the next row.

I also used avconv, a forked version of ffmpeg, rather than ffmpeg itself.
posted by clawsoon at 10:03 AM on July 26, 2016


I've uploaded the code - here and here.
posted by clawsoon at 10:41 AM on July 26, 2016


« Older A Visual History of Urbanization...   |   Safe for Democracy Podcast... Newer »


You are not currently logged in. Log in or create a new account to post comments.