The last few days I’ve immersed myself in Math. I’ve been trying to figure out a way to generate lines that mimic topography with the ActionScript 3 Drawing API. I studied the math that goes into bezier cubic and quadratic curves, and investigated a little bit in Sin waves. All I ended up with was a headache. I built some line generators but they didn’t really FEEL like topography.
Then I had a eureka moment.
“I’ll use the bitmapData class, blur me some bitmap data. Then I could loop through and select pixel groups by value and trace out the groups!”
Then I had another eureka moment. (Two in one day, it was amazing.)
“Someone already did this, it’s called Live Trace and it lives in Adobe Illustrator.”
So here is what I did. I took this image. Then I killed the saturation, blurred it out and tweaked the contrast to get this;
Then I ran it through Live Trace with a grayscale setting and colors set to about 25. And it came out looking a lot like a topo map.
I think I could still do something siimilar in AS with the Bitmap data class, and maybe I will just to prove it to myself I can.


1 response so far ↓
1 Josh Chernoff // Aug 12, 2008 at 1:50 pm
This is very impressive. I would love to see you code if you would share it.
I think from an artistic standpoint this has a huge number of applications, not to mention all of the functioning usages like for typography.
What about something being render in real time? Will that give your CPU a heartache ?
Leave a Comment