






FLAKES
Goal
I wanted to recreate a snow scene, in which one can play in the snow without putting on a jacket.
Description
The program creates snowflake objects which rotate around a randomly selected X,Y point. While they constantly move
towards the bottom, they also rotate around the X,Y and Z axis. The program then checks the area of the center point of the
rotation for movement (through a change in color check) and depending on the average motion increases or decreases the
speed. Even though the snow flake itself is not on the X and Y position of its rotation point, they are close enough to properly
react to the movement. Also, for the viewer this system adds a level of randomness, which appears similar to real snowfall.
(I was considering at one point to calculate the actual position of the snow flake, but I have to admit, it got mathematically
to complicated).
I created two methods of motion:
- When movement in the center point is detected,the rotation values for the X, Y and Z rotation and Y-position are constantly
increased. Once the movement stops, the values decrease until they reach their original speeds.
- When movement in the center point is detected, it constantly increases the speed of the snow flake until it moves out of
the frame. Even though the first way of motion makes more sense, this one is more fun to play with.
Web Version
Since the program requires live video, I could not put a running version on the web. Also running the program inside just doesn't
have the same effect as outside so I put up a QuickTime version capturing the program open-air.
Steps to Implement Code
- Create snow flake object
- Write the detect motion function ( it was a lot more complicated than it seems in retrospective)
- Tweak rotation values to look right with multiple snow objects and video
- Make the rotation and the detect movement function work together
- Fine tweaking (values, snow on the bottom...)
Programming Challenges
- I spent many hours on getting the motion detection to work. I found it very difficult to get the right values out of
different places from the code and keep the logic right. It was relatively straight forward to calculate the overall motion
(after lots of help from Dan Shiffman), but I kept running into troubles with the individual flake calculations.
- Get the right values for the movement to look good.
- Write a good function for the moving the flake after motion was detected.
Sources / Inspiration / Help
- A visit to snowy Vienna
- Text Rain, by Camille Utterback & Romy Achituv, 1999 (http://www.camilleutterback.com/)
- Talking about my love for snow to Rolf
- Talking about Kaki Laws' midterm (never actually go to see it)
- All the help and code samples from Dan Shiffman - Thank you very much!
QuickTime Movies
Code
Built with Processing






