In the June 2010 issue of Scientific American, on page 58, there is an article entitled, “Is Time an Illusion?” by Craig Callender. You can see it here:
The large artwork on the first and last pages of the story, and a bit more subtly in some of the in between pages, is by yours truly.
This began about two months ago when I was contacted by Scientific American, asking if I would be interested in contributing some art work for an article. They were interested in some of the pieces on my other site, Art From Code, in particular a few pieces I had entitled Space Time Color. Of course, I said I would be interested and they sent over the article and asked me to come up with some rough ideas within a couple of weeks, and shortly after that some high res images for print.
Amazingly, I was able to dig up the source code that had created the Space Time Color images. The thing was, I now needed to create four separate pieces in both low res and later high res, save them out, and have the ability to reproduce and tweak each piece. Random code on the timeline of an FLA would just not do in this case. So I extracted the code out into classes and created an AIR application in Flash Builder 4.
The app is essentially a particle generator with a number of invisible attractors that affect the particles’ paths. A number of particles appear at the bottom of the screen and have an initial upward velocity. Here’s what it looks like:
Each circle is an attractor and can be dragged anywhere on the canvas. Each has a numeric stepper attached to it to adjust its strength. Of course, this number can be negative, which makes it repel particles. As each particle moves, it draws a line onto a bitmap.
Although the bitmap is scaled on the stage to 600×600, internally it is 4000×4000 pixels, and you can zoom into the image full size, at which point you can drag it around within its window.
Other things you can see in the UI there are options to change the background color, change the number of particles and number of attractors, show or hide the attractors, and draw in a lower resolution preview mode. When I got a picture that looked good, I could hit save. I modified the default PNGEncoder class to be asynchronous (I think I posted about that at the time), which allowed me to throw in a saving progress bar.
The cool thing is that when an image is saved, a configuration file with all the important properties are also saved with the same name. The file names for both are based on the time stamp of the point they were saved. So in addition to the image file, “space_time_2010-5-28_22.16.34.png”, it saves a file called “space_time_2010-5-28_22.16.34.txt” that looks like this:
This allowed me to load back in the exact configuration for any specific image that had been saved at any time. Although the app itself took a few days to get done, it then allowed me to quickly generate dozens of different images, then go back through them, choose the ones I liked, reload them, and tweak them a bit more before saving them out again.
Again, the images were exported as 32-bit PNGs at 4000×4000. Only the trails themselves were represented; I left the background color transparent, and then opened up each final image in PhotoShop, adding a white background later there. I thought they might want to experiment with different background colors, but as it is, they liked the white anyway. While I was in PhotoShop, I played with some different filters and effects and got some other cool results, but what wound up in the magazine was pretty much straight out of Flash.
Anyway, I’m pretty excited to have some of my work in such a prestigious magazine as Scientific American. Another notch in the keyboard. What’s next?