Archive for February, 2010

Feb
11

Vancouver 2010 Olympic medals

I love the Olympics. It’s a statement that may sound silly, childish, or perhaps a little disingenuous, but I really believe it’s true. I’ve always loved the Olympics – the athleticism, the competition, the warm-fuzzy one-world-isms, I buy into all of it. I’m really kind of a sap for this sort of thing.


Photo by Matthew Field

So the 2010 Winter Olympics start tomorrow, and I’m pretty stoked. The 2010 Olympics in Vancouver – admittedly, I really kind of wish I could go up for it, but oh well. (After all, I never attended any of the events when they were held in Salt Lake City, even though I only lived 3 hours north at the time – I did go see the torch as it came through town, though.) For one thing, they’re in Vancouver – I mean, look at that photo – that’s just ridiculous how cool that is.

The medals, though, are what I wanted to talk about. I love the design of these. The simple, minimal shape, with the subtle Olympic rings in the lower right-hand corner. Further, the shapes etched into the surface are actually the forms of a design in the art style of the indigenous peoples of the Pacific Northwest. It is probably an indication of how white I am, but I have been enchanted with Northwest Coastal art for as long as I remember, and I love that the placement of the design on the medal is randomized, so each medal only has a fragment of a larger whole, and no two medals are alike.

Another awesome aspect of the medals is where the raw materials have come from—a portion of the metal (I haven’t done the math, but my friend Rachel thinks it may be more than 50%) is recycled from e-waste. While it’s certainly only a first step towards sustainability, it’s a fairly ambitious first step. (I’d encourage you to check out Rachel’s well-footnoted post on the matter.) I also wanted to share the following NOVA segment about the making of the medals, which inspired me to write this post.

Mad props and humblest thanks to those involved in the creation of these beautiful pieces.

P.S. Be sure to check out The Big Picture albums of the Olympic Torch Relay (both the torch and the relay are works of beauty too)—both the first and second album.

Feb
4

Trip Back to Math Class

A recent project had me trying to find the distance between a point and a line segment, and a coworker reminded me that the distance from a point to the line can be found from the line perpendicular to the line, which passes through the point. That means figuring out the linear equation that defines the line segment. That’s y=mx+b, if you remember your Algebra days. I was stumped for a little while – stuck on the concept of solving for two variables with Actionscript. Actually, I was stuck on the concept of solving for a single variable in Actionscript, because I was being dumb.

Then, last weekend, laying in bed, I cracked it. Didn’t get around to writing the code until Monday. I wrote a LinearEquation class – capable of being given two points, a point and a slope (m), a point and a y-intercept (b), or a slope and a y-intercept – and builds a linear equation from it, in a manner of speaking – you can give it an x value, and it will return the y value. You can give it a y value, and it will give you the x. You can get the y-intercept, the slope, or the inverse of the slope – which will be the slope of a line perpendicular to that one.

Most importantly, the LinearEquation class has a static function – following the model of Point.distance() – LinearEquation.intersection(). It takes two LinearEquations as params, and returns the point where they intersect.

So we create a line and a point – then we get the inverse slope of the line, and pass that along with the point in to get another line. Then we get the intersection of the two, and voila, we’ve the line segment that is the distance from the point and the line.

Unless of course, that intersection is outside of the first line segment – that’s why LinearEquation gets extended by another class, LineSegment. But I’m not going to tell you all my secrets all at once.

So check out the demo I’ve set up. [ Line Segment / Linear Equation AS3 demo ]

And the practical applications for this? Not really sure yet, but there have to be quite a few. Just to name one or two, perhaps making line-segment checkpoints in a racing game, or part of an AI system where an enemy is shooting at you.

Maybe I’ll share the source sometime soon – if so, you can look for it here.

Feb
2

FWA – LEGO CL!CK

We interrupt your regular non-existent programming for a bit of news – the LEGO CL!CK site (legoclick.com) that I’ve been working on at StruckAxiom was today’s FWA Site of the Day. Of course, LEGO is a sweet brand to work on, and the whole creative team – which included Jon, Jeff, Matt, Anson, as well as myself – was awesome to work with, as usual, and they all rocked it out (again, as usual).

While we’re at it, I’d like to direct you to the Deconstruck blog, where I wrote a behind-the-scenes post about one of the most popular features of the site – exploding block walls. There are code samples and explanatory goodness, so go check it out!