We will be two owls, maybe
The earth is painted blue, green, white, and brown
with ocean, leaves, clouds, and dust
And somewhere in this painting
there’s a painting just of us
- Atoms, Motion, and the Void, Episode 26
Choose wisely…
So there’s been a lot of talk about the “Bradley effect”… basically, the notion that white people will become suddenly uncomfortable voting for a black man at the polls. So here I am, 3am, making sure that the people in my building get any Bradley-like tendencies out of the way before leaving home.
So if you want to leave the building in the morning (from any of the six floors), you’re politely required to press the Obama button. And of course, on the ground floor, the names are flipped. If you want to take the elevator upstairs at the end of the day, you again have to vote for Barack. Get acquainted with that button now, press it again at the polls.
Let’s hope it helps all those trigger-shy moderates in my building…
Vote everyone! See you on the flip side! (of American history!)
Voronoi plateaus
Well isn’t today just the most amazing day of self-motivation ever. This is project #3 that I’ve uploaded. It must be this new Vimeo account… I’m addicted to sharing video now. Here’s the video clip: Voronoi plateau from Don Havey on Vimeo.
This quick sketch used my Voronoi diagram class to create a landscape of plateau-like structures derived from an image. The image is “chiseled” into a Voronoi diagram, then extruded according to each cell’s brightness. The diagramming process is interesting, the result is… meh. It makes high-intensity images a little more intense… but that’s about it.
On a related note, I discovered that when overlaying a number of iterations of Voronoi-diagrammed images in Photoshop with an exclusion filter, the results approach the original image in terms of resolution. Here’s an example:
Notice that the red image is washed out a bit, but is much more resolved than the others… interesting.
Anyways, here’s the source code (get your own images this time) and a demo. Click to give the applet focus, then use the arrow keys to navigate once the diagram is finished. Enjoy.
Shadow casting strips
Here’s a preview of a drawing tool that I put together recently. I hope you love it.
It basically projects the shape that you draw on to a randomly generated terrain, then creates the objects that would cast that shadow at a certain time of day. Now that I’ve finally jumped on the Vimeo bandwagon, I’ve uploaded a video of me drawing with the applet: Shadow casting strips from Don Havey on Vimeo. There’s also a link to an in-browser demo below…
I’ll explain the thing in depth some time, but the concept is pretty simple. My new Terrain class handles the projection of points on to its surface using the Plane class’s get_line_intersect_point() method. The drawing is projected downwards, then those points are in turn projected on to vertical planes that coincide with the lines that originally split the drawn shape.
Here’s the source code so far. Note that there’s still a big bug with it, which is a problem integral to the Polygon class’s split() method. If a (vertical) split line intersects a drawn polygon more than twice, it will not split it. So you can draw vertically-aligned mountains, but not horizontally-aligned ones, or awesome fish with giant mouths, as shown in the diagram.
I think the problem is fixable, but I’m probably not going to have time to revisit this one for a while.
I’ve uploaded a (small) demo here: Shadow casting strips, in progress. Click the applet to give it focus, draw with the mouse, then rotate the thing with the arrow keys. Pressing Enter/Return will clear the drawing board.
See ya.
Video terrain
I’m sure this has been done before, but after being inspired by Robert Hodgin’s Audio Driven Landscape, I decided to use my new Terrain class to make something sexy and moving.
I’m not sure if I ended up being successful with the sexiness… but this thing sure does move. What I’m doing here is mapping a video on to a terrain, with the terrain’s depth based on pixel brightness per frame. When you load in a movie–taken, say, from a train–you get a pretty interesting warped image. It adds a level of depth that I wasn’t expecting. It also has a interesting cloth-blowing-in-the-wind thing going on (without fancy Verlet integration)…. Looking from near ground level corner-to-corner is the most exciting.
No tutorial on this one, but the source code is here (includes the sample video)… and I’ve embedded my very first Vimeo video below.
A few notes:
- The Terrain class is still pretty young… and not optimized for this type of thing. It uses a relatively slow iterative smoothing function to avoid spikes.
- The points that define the terrain should be eased between new coordinates, rather than just moved. That would make this whole thing a lot less ADHD. It would be easy to do… the easing functionality is already built into the Point class.
- If you download and run the thing, click on the applet to give it focus, then use the arrow keys to rotate the terrain. Holding down any mouse button toggles the display of the movie as a texture map.
Video terrain from Don Havey on Vimeo.
Let me know what you think!
Reverse engineered metamorphosis – Part II
This post is a follow up to Reverse engineered metamorphosis – Part I.
I managed to spend a little time getting the background effects in line yesterday while on the train. I’m up to just over 3 hours work time on this, so I think I’m on track to wrap it up in under 6. It’s been a good exercise because it’s forced me to focus on creating something specific – not just another component.
Once again, I’m not going to talk much about the progress made. The background images have their own class: the aptly named Graphic class. All they do is fade in and out and render themselves. The constructor function is passed a “frames to live” value, which determines how long to wait before fading it out.
Here are some more bullets:
- Before positioning and rendering each Graphic, we make sure to check that they are still visible… otherwise we’d be spending lots of resources on images that can’t be seen. Transparency is handled with the tint() built-in.
- Once every few frames, the graphics are placed behind the vine using the vine’s current xy-coordinates. So the graphics always appear to be exploding into existence just behind the vine.
- The images themselves were mashed together quickly from Photoshop’s “nature” pattern fills, given a layer mask each, then saved as transparent pngs. Which image is loaded is determined by a simple “if(random(chance)<1)". You'll notice that I'm favoring the green image.
That’s about it for now. The applet is still running at an easy 30 fps on my 3-year-old laptop, so that’s good. Here’s the source code. View the results in Processing. I don’t feel like uploading them today, plus, the image loading really drags in P3D and OpenGL still hates being run within an inline applet. If you’re desperate to see this in action, take a look at the live example from the previous post.
See ya.





The article has
no responses yet