Simone Seagle

Simone Seagle

Independent Web and Educational Software Developer

Site Information


Launching Movie Trees

Launching Movie Trees

September 5, 2016 Simone Seagle

I created Movie Trees as a final project for my Algorithms and Architecture class in the Fall of 2015. The idea was to use some of the interesting things we studied in class - recursive algorithms, fractals, etc, - and turn it in to a creation that I was proud of and excited to play with. One of my main inspirations for the project was the How to Dance with a Tree project. The developer wrote a program that took skeleton analysis from a Kinect and then used it to modify the parameters of a dynamically drawn Fractal tree. It's adorable! Here's the video:

Also, that song is addictive and great... But anyway. I decided to use output from the Open Movie Database to modify the trees. Information like the colors in the poster, genre, and rating of the movie all change the way that the final tree appears. Horror and SciFi movies appear with a darker color scheme, bad movies make the tree less symmetrical, and genres change the font of the word cloud. Furthermore, the whole applet interacts and "dances" with the mouse/touch points.

In order to add this to my website, I needed to figure out how to get the CMS to work with my AJAX call. In order to get the colors from the poster, I used a library called Color Thief that uses an image element and processes it. The Open Movie Database doesn't allow you to link to the posters remotely, so if you want to use them, you need to download the files. When I originally created this project, it was a simple php project that I ran on my local MAMP installation. An AJAX call would tell the php script to download the file and then send back the local version. However, getting that setup to work with a CMS has been much easier said than done. I keep getting 403 forbidden error when I try to run my script. I tried including it as a plugin and catching the URL in one of Pico CMS's hook functions, but that didn't work. I tried putting a raw php file in its own folder, but that didn't work either.

I checked Host Gator's documentation, and checked the permissions of all of the files and directories, and they appeared to be correct.

After doing some more googling, I realized the problem was probably that I was using GET instead of POST for my AJAX query. I'm going to try changing that and seeing what happens... And if it doesn't work, I will try adding a separate file and modifying my .htaccess file like is suggested in this StackOverflow question.

Well, looks like I just had some typoes and had to convert it into a POST request instead of a GET request! Lesson learned. Want to play it? Go check it out.