Tuesday, November 29, 2005

An image is worth a thousand words.

So sayeth the folklore... but what happens when we are able to manipulate images at whim? What would happen if hackers "0wnz3d tah w0rl|)"?

Take a look here

One of my favourite places on the net, worth1000.com holds contests regularly to challenge image manipulation adepts.

A never exhausting source of inspiration.

Thursday, November 24, 2005

The background story of Battlestar Galactica

As promised, this post will be about the background story for the reimagined fictional series Battlestar Galactica, of which I'm a big fan.

In case you have not seen yet the miniseries, be forewarned there are spoilers ahead.

Ok? Let's begin!

Two thousand years ago, humanity lived in a planet called Kobol, a word which means "Heaven" in ancient persian. Due to an unspecified cathastrophe, they fled for a new home and founded the 12 colonies of man, spreading across 12 worlds named after the zodiacal constellations: Aquarion, Pico, Arilon, Tauron, Geminon, Canceron, Leonis, Virgon, Libris, Scorpia, Sagittaron and Caprica.

The series does not clearly state whether all of them are located in a single star system (highly unlikely, unless the Kobol civilisation was capable of extensive terraforming and maybe even orbital relocation) or along several of them, although located relatively close to each other.

Another group, however, chose a different direction and was never heard of again except for their destination: A planet called Earth.

The colonial civilisation is more advanced than ours, but certainly not utopian. While it is capable of regular interplanetary and short FTL interstellar travel, quality of life is not uniform; cities have nice and "bad" neighborhoods, at least a grand scale war has been fought between the colonies and the losers were forced to slavery, and one of the worlds (Sagittaron) had to endure a corrupt military dictatorship.

There are also interesting differences. Government and religion are not separated, although priests act as advisors more than rulers. Religious beliefs are polytheistic. The colonial sacred texts esentially tell about how life was back on Kobol, but until the actual planet was found by the survivors of the second exodus, many thought them to be meant as parables or moral lessons about living in harmony.
However, the archeological teams sent to explore the ruins discovered evidence of a large scale conflict and massive genocide: human skeletons were found piled together, unburied and hidden only by the local vegetation and forests. Only then the reason behind the first exodus actually became clear but only to a very few.

In order to take care of harsh duties first, but ultimately used as weapons to fight against each other, the colonies built robotic humanoids and called them Cylons. One day, they turned against their masters and all of mankind had to unite together if they were to stand a chance for survival.

The Human-Cylon war had a great toll of lives and resources and ultimately had a deep influence on the development of the colonies. Because Cylons were capable, among other things, of infiltrating the computer networks aboard battleships and turning them against their crews, this lead to a growing distrust of technology.
Very few automated equipment remained onboard the vessels, and even then, it was forbidden to network it together. Most flight operations, including landings, ended up being done by hand.

A ban on artificial intelligence research was also raised on all colonial worlds.

The war suddenly ended 40 years ago with an armistice and withdrawal of the Cylon forces to an unknown location and nothing else was heard of them afterwards. 12 years before that, an alliance between the colonial worls was created to fight against their common enemy and later became a centralised government of sorts.

In those 40 years, Cylons underwent what could be called a technological singularity. Deeply religious and monotheistic, they covertly spawned new organic and vastly improved versions of themselves into the unsuspecting colonies. virtually indistinguishable from real humans, these bio-droids paved the way for the Cylon return. In a single day, Humankind was all but wiped out of the surface of all the colonial worlds by nuclear bombardments; only those who were aboard space vessels (less than 50,000 people) survived the attack.

Thus began the second exodus. Homeless, the survivors began searching for the rumored 13th colony with the Cylon closely in pursuit... and still with some covert agents gathering intelligence and/or waiting to strike.

There. I hope you liked it. Like I said at the beginning of this post, I'm a big fan of the series and it disturbingly seems to show.

Let me know what you think, okie?

Wednesday, November 23, 2005

More fresh meat for the grinders.

One day, I took my doggies (two Chihuahuas appropiately named Samson and Goliath) to the vet for their vaccine shots.

The vet has a huge Calico cat that roams freely around the premises. He's got quite a personality of his own: Runs to greet and escort customers, watches as his mistress works on the various patients, takes naps in unusual places... well, you get the idea.

On that day, the cat rushed to us and began vocalising with enthusiasm, almost like a salesman. Here's a rough approximation of what he "said":

- Welcome!!! welcome!!! Here's the place... no pain vaccines at reasonable cost. Oh, I see we have two new customers! Worry not, your doggies are in good hands.

Then, he turned his head towards the clinic, and purred:

- Hey Boss... more fresh meat for the grinders!!! two incoming.

And looked back at us, reassuringly:

- Huh... as I said, guaranteed!

Suffice is to say the doggies were less than thrilled. The shots hurted as usual, and I swear that cat was watching from high above as they were being injected.
Such is the nature of cats.

My dear friend Bruno suggested me to write about the reimagined Battlestar Galactica series. So you have been warned what to expect on next post.

Friday, November 18, 2005

Back on track

Yesterday night was the end of a very hectic, but also rewarding week.

Since last week, the art director asked me to generate no less than 30 different versions of a picture mosaic outlining one of our client's logo.

Why so many? Well, let me explain...

Picture mosaics are images made up of collections of other pictures. A computer program divides the target image in cells, then tries to match each cell with another image from the collection based several criteria, including:

- Overall color contents
- How many repetitions of a given image are allowed, in the overall image as well as within a region of cells.

However, it is of the utmost importance the image collection is as varied and abundant as possible. Otherwise, the result will be monotonous and uninteresting.

For this project, our client wanted us to create a mosaic consisting of red SUVs he's giving away on a sweepstake. Since their logo is also red, they thought it would be easy.

Well, it was... in theory.

How many cells should we divide in our target image? Since it is a logo, too few will result in a blurred, unrecognizable color splat. But too many not only will eat up available memory, each cell might become optically smaller and thus difficult to discern from the others. Not to talk about the resulting mosaic resolution should be at least 300 dpi.

We began with a small collection of 4 images, each one from a different SUV model. After adding a white cell to it (to include the target image's background color), first resulting mosaics ended up being dull and repetitive.

After that, we tried increasing the collection with dissolved versions of the original images in 5 percent steps. Results improved dramatically, but the background began to exhibit faint aliasing patterns where there shouldn't be any.

More tweaking on the source collection, this time using a non-linear step scale, lead us to better results. One of them underwent minor retouching with the almighty Photoshop and so was finally accepted by our client.

I won't bore you with more detail, but I'll just mention we had to tweak many parameters to come up with a varied, yet error-free mosaic. Waiting at least 40 minutes to end up with "Sorry, ran out of memory" errors is no fun.

The results were published this week on a local newspaper. Check them out:

Let me know what you think.

Wednesday, November 16, 2005

A blast from the past

Back in the 80's, 8-bit computers still were rare items found in a household.
Putting processing limitations aside, their capabilities could also be considered "marginal" by today's standards.

Still, necessity really is the mother of invention.

Imagine a simple flip-flop IC whose output is connected to a speaker via a small amplifier transistor. Each time the computer addresses a particular memory location, the flip-flop toggles, causing the speaker to "click". Do that many times per second and you'll end up generating beeps of varied frequencies and durations.

This was the primary sound circuit found on the venerable Apple II computer, but do not let its simplicity fool you.

Because such beasts also had limited memory capacities, the best way to make the best possible use of available memory and processing power was to write programs in assembly language. Small and fast, yet very difficult to debug.

Nonetheless, geniues like Paul Lutus managed to push the simple beep generator to the limit by making subtle alterations to the click timing loop. The results were astounding: multiple voices (up to 4) with some variations in timbre.

Shortly after that, specialised music hardware began to appear either integrated into the computer's motherboard (like the SID chip in the C=64) or as add-in cards (the Mockinboard for the Apple II). The main CPU could dedicate its attention to more important tasks instead of wasting precious clock cycles in timing loops.

It was in this scenario that Demo Coders appeared. Pushing things to the limit and then some, the main objective was to do as much as possible (graphics, sound) in as little memory space as possible.

Some demo coder groups disappeared while others prevailed. Today I found one of them, specialised in music and as creative as ever:

Vibrants homepage

Listen to their music, and think back how things were in the old days and how much they have changed.

Tuesday, November 15, 2005

Woot! first post

First of all, thank you for taking an interest on this blog.
But before we proceed, some things need to be told beforehand:

1. English is my second language, spanish my first. Please bear with me if there are times my phrasing is poor. However, I'm a fast learner.

2. As I'm in the progress of upgrading my life and hence, my future, updates might not be regular at first. But I'll always try to post something interesting in the hope it can be interesting to you too.

So, let us begin.