Monthly Archives: February 2003

Recursion

My brain hurts! I've gotten so mentally flabby on doing this type of thinking… My internet connection's been down for a lot of the day because of snowfall, so I've been tinkering with the dynamic mapping system. The problem is the size of the dataset. My tests that you've seen here have been rendered using the giant map — 21,600 pixels across. That's something like 200 meg of image to crop and rescale, so it chews through at least a second of CPU time. No big deal for my testing here, but unacceptable once it's on the server.

So how to render fast? My first experiment involves subdividing the map into 16 sections — four vertical divisions and four horizontal ones. From this 4×4 grid I create nine 2×2 submaps. Each one of those submaps is broken down again, and then their submaps are also broken down, resulting in about a thousand 2700 pixel wide images, with a final resolution of about 1km per pixel at full zoom, although it will do an infinite amount of digital zoom past that (not that it's meaningful past 200%).

Anyway, below shows a quick drawing of what I'm talking about:

Then, on the rendering level, once I have the edge points of the desired map (in radians), I calculate the area of the desired map. Then I seed the process using the world map's data. I then check to see if the desired map fits inside any of the nine submaps. Any that do are recursed again down to the maximum depth. At the end of it all, the software uses the map with the least differential between actual area and desired area. In the case of ties, it picks the most centred version.

2700 pixels across is still a fairly large map size, but I think, given the power of this server, that it should strike a happy medium. After all, if I instead went with 1350 pixels in width (my original plan), it would result in almost ten thousand images… And with every iteration the level of redundancy increases (and from a quality point of view, nothing much is saved).

In any case, if my thinking is straight on the matter, it means that a 50% resolution map of 2km per pixel (worst case scenario; most maps will render at 100% resolution) can be rendered for any rectangle on the globe). If I get ambitious I'll make the map loop (so for example, Ankorage AK and Tokyo Japan would be rendered as a tight crop, not as a world map), but that's most definitely a project for another day.

Anyway, hope that wasn't toooooo boring.

Another month begins

Had a dream last night that a nuke was set off at Pearson International Airport in Toronto… After the nuke, an obviously fake video claim released in partnership by Saddam and Osama was played over the media, taking full credit for the attack. This was then used by the US to drag Canada and the rest of the world into an apocalyptic world war.

Half way through this war it was revealed that the US had actually simply nuked Canada as a strategic move, but by the time the world figured it out, we were so deeply invested in war that there was no turning back, and the world was destroyed.


Some of you may have seen this comment on Phish's page, but I was wondering — how do the militant vegans on IAM feel about tattoos? After all, all tattoo ink has animal byproducts in it, so if you've got tattoos, you might as well be wearing leather… There's certainly a real irony to getting an animal rights tattoo using animal byproducts, isn't there.

That said, I don't think most people are even aware of this fact… I've been tossing around the idea of talking to some manufacturers and actually producing a line of fully vegan tattoo inks (assuming I'm not mistaken and someone else has already done so).


So Cheney recently spoke at a conservative luncheon, surrounded by vendors selling stickers like “No Muslims – No Terrorism“. I don't know about you, but if I was asked to talk surrounded by crap like that, I'd refuse. But, maybe it reveals some true colours.

This story is worth reading. A thorough debunking of the “Saddam gassed his own people” lie that we're told so often — not just because he didn't own the type of gas used in the attack (meaning it was either US or Iranian), but also because the Kurds simply got caught in the crossfire between Iran and Iraq — they were no more the enemy than the Canadian and other peacekeeping troops in Afghanistan that the drugged US pilots bombed.

The US is sending more troops to Korea, presumably in response to the heightened activity at the nuclear plant. Kaboom! Goodbye world, it was nice knowing you.

Remember, in 2004, if we're still alive, Vote Liberman:
     A new kind of Democrat. The Republican kind.