# "2001: A Space Odyssey" retold using Processing

**URL:** https://discourse.processing.org/t/2001-a-space-odyssey-retold-using-processing/13864
**Category:** Gallery
**Created:** [September 7, 2019, 11:54am UTC](https://discourse.processing.org/t/2001-a-space-odyssey-retold-using-processing/13864 "2019-09-07T11:54:14Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![LoO93](https://avatars.discourse-cdn.com/v4/letter/l/a183cd/32.png) [@LoO93](https://discourse.processing.org/u/LoO93)
#### Post date: [September 7, 2019, 11:54am UTC](https://discourse.processing.org/t/2001-a-space-odyssey-retold-using-processing/13864/1 "2019-09-07T11:54:14Z")

</div>

Hello World and dear Processing community!

Here’s my first Processing project I’d like to share with you guys.

**The idea:**

- feed the program with a database of images
- calculate the average color of each image in the database
- feed the program with an input image
- rasterize/split the input image into several equal cells
- calculate the average color of each cell
- replace each cell with the next best color match from the database

I was looking for something like this:

![3f8fd3fd728eb2999fea62f4dac83271](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/c/c32e1f55db52e040371a80d988b3ce76754a70d4.jpeg)  
That first milestone got reached pretty quick so I decided to explore some variations of it…

**Let’s make a video:**  
I first wanted to try how this would look on an sequence of images.

- I first needed a way greater database of images since we would now have around 25fps to replace
- I searched the internet for a free database of images that would let me download these via an API
- I stumbled upon [pixabay.com](http://pixabay.com) which would let me download a reasonable amount of images simply by using a token in a http-request
- So now my little .pde would first download a new database of images on each run

I was pretty excited to see the first result, but unfortunately it turned out to look like a puree of wrong pixels rather than an interesting and pleasing mosaic look that I was looking for… But let’s not loose hope yet!

(I regrettably can’t show you the result since I deleted it (_#idiot_) and my .pde won’t run anymore since my access token at pixabay is expired… But trust me, you didn’t miss anything!)

**An infinite zoom ?**  
Alright so what could be the next variation of our little mosaic programm since videos wouldn’t do it.

Well I have an image based on images, why not create something close to an infinite zoom ?  
If we scale up one of the cells to fullscreen and so on, we could maybe get something interesting.

And so it was!

**But we need a story!**  
Since I am also into filmmaking, I wanted a bit more than just an so called “effect”. Maybe we could use it to narrate something or even to _retell_ something.

So I needed a story, and a story that people would know.

**A Space Odyssey:**  
My professor at uni came up with the idea of Kubrick’s classic “2001: A Space Odyssey” and I decided to give it a shot with an infinite **de** zoom!

- To get the database I exported every second of the movie to a an .jpg into a ‘frames’ folder
- Now I had around 9000 images
- I manually picked stills from the movie and exported these into a ‘keyframes’ folder
- The .pde would now first go trough the ‘frames’ folder and only save the images which differ enough from each other into an array list
- It’d reduce the amount from 9000 to around 400 images to play with
- Afterwards it’ll process the **n+1** still to a mosaic and place the **n** still into its center cell
- The **n+1** mosaic will then be drawn so that the centered **n** still is fullscreen
- It’ll then scale the **n+1** mosaic down on every draw call until the **n+1** still goes fullscreen
- And so on until the last still.

**See for yourself:**

[http://youtu.be/eeUTmjLwOJU](http://youtu.be/eeUTmjLwOJU)

It still got some issues like the moire that comes from the downscaling algorithm in Processing.

The next step would be to check if a picked image from the database was already picked to get more variance in the final mosaics.

I hope your guys enjoyed it and I’d be glad to get some feedback!

**Credits**  
I really would like to thank my good friend Ole who really made this possible since he is the brain behind all the math here.

---

<div class="post-metadata">

### Author: ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)
#### Post date: [September 7, 2019, 12:42pm UTC](https://discourse.processing.org/t/2001-a-space-odyssey-retold-using-processing/13864/2 "2019-09-07T12:42:48Z")

</div>

Like most people I have watched many movies on the Internet but that was just the most amazing experience.

Congratulations on a truly remarkable piece of art.

---

<div class="post-metadata">

### Author: ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)
#### Post date: [September 7, 2019, 2:09pm UTC](https://discourse.processing.org/t/2001-a-space-odyssey-retold-using-processing/13864/3 "2019-09-07T14:09:46Z")

</div>

Really mesmerizing! Well done 👍

I wonder if you could get enough “pixels” using only the still frame of the movie. Inception style =)

---

<div class="post-metadata">

### Author: ![swmarks](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/swmarks/32/6015_2.png) [@swmarks](https://discourse.processing.org/u/swmarks)
#### Post date: [September 7, 2019, 9:30pm UTC](https://discourse.processing.org/t/2001-a-space-odyssey-retold-using-processing/13864/4 "2019-09-07T21:30:24Z")

</div>

Absolutely incredible! My favorite movie of all time and you encapsulate the experience. I particularly liked the reversals at approx. 6 minutes and 7 minutes, because that’s what would happen in a wormhole!

---

<div class="post-metadata">

### Author: ![mcintyre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mcintyre/32/14561_2.png) [@mcintyre](https://discourse.processing.org/u/mcintyre)
#### Post date: [September 7, 2019, 11:42pm UTC](https://discourse.processing.org/t/2001-a-space-odyssey-retold-using-processing/13864/5 "2019-09-07T23:42:23Z")

</div>

I love everything about this project–thank you for sharing 🤯

---

<div class="post-metadata">

### Author: ![Hieronymus](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hieronymus/32/2018_2.png) [@Hieronymus](https://discourse.processing.org/u/Hieronymus)
#### Post date: [September 8, 2019, 9:25pm UTC](https://discourse.processing.org/t/2001-a-space-odyssey-retold-using-processing/13864/6 "2019-09-08T21:25:10Z")

</div>

One of the coolest Processing projects I’ve seen! Thanks for sharing.

---

<div class="post-metadata">

### Author: ![Luno\_T](https://avatars.discourse-cdn.com/v4/letter/l/43a26b/32.png) [@Luno\_T](https://discourse.processing.org/u/Luno_T)
#### Post date: [September 14, 2019, 8:38pm UTC](https://discourse.processing.org/t/2001-a-space-odyssey-retold-using-processing/13864/7 "2019-09-14T20:38:56Z")

</div>

Awesome project…

Congratulations!

---

<div class="post-metadata">

### Author: ![TTG](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/ttg/32/983_2.png) [@TTG](https://discourse.processing.org/u/TTG)
#### Post date: [September 15, 2019, 11:31am UTC](https://discourse.processing.org/t/2001-a-space-odyssey-retold-using-processing/13864/8 "2019-09-15T11:31:15Z")

</div>

great you shared and told the process of getting to the result. Inspires and gives confidence processing is a great tool to even create polished material above prototyping.

---

<div class="post-metadata">

### Author: ![royal96](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@royal96](https://discourse.processing.org/u/royal96)
#### Post date: [September 24, 2019, 2:45pm UTC](https://discourse.processing.org/t/2001-a-space-odyssey-retold-using-processing/13864/9 "2019-09-24T14:45:12Z")

</div>

Great Work ! Thank you for sharing (F)

---

<div class="post-metadata">

### Author: ![needfulthing](https://avatars.discourse-cdn.com/v4/letter/n/ee7513/32.png) [@needfulthing](https://discourse.processing.org/u/needfulthing)
#### Post date: [September 30, 2019, 1:02pm UTC](https://discourse.processing.org/t/2001-a-space-odyssey-retold-using-processing/13864/10 "2019-09-30T13:02:25Z")

</div>

Love it but made the mistake to watch it while having a hangover 🤢

---

<div class="post-metadata">

### Author: ![xenojimmy](https://avatars.discourse-cdn.com/v4/letter/x/c2a13f/32.png) [@xenojimmy](https://discourse.processing.org/u/xenojimmy)
#### Post date: [April 4, 2020, 7:01pm UTC](https://discourse.processing.org/t/2001-a-space-odyssey-retold-using-processing/13864/11 "2020-04-04T19:01:44Z")

</div>

ncie stuff, congrats!  
i’ve been trying to retrieve img search on pixabay too.  
but I even can’t manage to get some img, I get this failure when I try to use loadimage with any pixabay link  
java.io.IOException: Server returned HTTP response code: 403 for URL: [https://cdn.pixabay.com/photo/2015/04/19/08/32/rose-729509\_150.jpg](https://cdn.pixabay.com/photo/2015/04/19/08/32/rose-729509_150.jpg)

I can map all the hits in JSON objects and print them properly like “previewURL” and similars…  
but it’s up to load images… ti fails. anybody tried something similar?
