Enchanted Village

This evening I was walking around Greenwich Village with a friend who is visiting from Europe. The weather was perfect, so there were many people around and about.

At some point we passed by three young women on Bleecker Street wearing identical long black robes with matching hoods. The look was not so much Wiccan as it was Satanist fashionista. Or maybe that should be “Satanista”.

My friend and I tried to figure out whether we had just witnessed a sincere display of collective religious conviction, or an attempt to create a Hollywood style fashion moment on the streets of New York.

Just then a fairy flew by. On a bicycle.

I mean, a young woman dressed in a little white fairy outfit, complete with delicate white wasp-like wings out of a Brian Froud illustration, peddled downtown on MacDougal Street at breakneck speed.

This raised all sorts of new questions. Did the witches and the fairy know each other? Was some sort of epic battle between good and evil playing out on the streets of New York? Were they in fact mortal foes, or was the fairy working with the witches?

Maybe it has something to do with August 17. Or maybe it’s just a typical weekend evening in Greenwich Village.

Fringe binge

I’ve been on a binge, watching back-to-back episodes of the sci-fi TV thriller series “Fringe”.

When I was a kid, TV was something that by definition was doled out in slow weekly installments. There wasn’t really such a thing as binging on a television show. We didn’t have a vast collection of instant-access shows to dive into, so we couldn’t watch months or entire years of a series as though it were some sort of insanely long marathon movie.

But these days that level of access has become woven into the fabric of our culture. It is now possible, in a matter of days of viewing, to watch actors visibly age before our eyes.

I find myself thinking about things that never would have occurred to me in the old days. Is this actor having a bad year? Several episodes back, did that actress fall in love in her real life, and has she now fallen out of love again?

Marathon viewing can alter the traditional temporal relationship between actors and their audience. Rather than appearing ageless, actors can seem to be racing through their lives faster than we are racing through ours. This phenomenon is somehow both deeply disturbing and strangely comforting.

Kind of like an episode of “Fringe”.

Same as it ever was?

Recently here I mentioned Plato’s description of Socrates’ objection to written media — that the easy ability to record one’s thoughts would be the death of memory.

We have now spent centuries in the world that Socrates feared, and we are very familiar with the costs/benefits of being able to write things down.

With the rise of the internet this debate has gained fresh currency, but now the battleground has shifted: Reading books is more often cast as the responsible and character-building old way, in contrast to the Internet’s ability to provide easy and instant access to information, which is seen as promoting laziness and shallow thinking.

I had an experience recently which reminded me that the discussion is still worth having. A colleague told me about a demo she had made. “And I put it to the music,” she continued proudly, “Of ‘Safety Dance’ by Men at Work.”

“Men Without Hats,” I said. “‘Safety Dance’ was by Men Without Hats.”

We debated the point for a bit, each of us sure we were right. Then she pulled out her SmartPhone and checked on the Internet. It was indeed, as some of you already know very well, Men Without Hats.

And in that moment I realized that she didn’t really know the music of either group. Their names were to her mere phrases, without resonance. Whereas I was extremely aware of the difference in their respective musical styles and legacies, a difference as distinctive as the voice of Colin Hay.

Is it true that we are entering a time when more and more of us think in factoids, without true working semantic knowledge?

Or is this “trend” just an illusion? Perhaps it’s really the same as it ever was, a tired debate endlessly repeated by the talking heads of every generation.

The Dark Roast

I learned today about a D.C. Comics super-villain named Snowflame. In their attempt to create ethnic diversity and inclusiveness, D.C. Comics introduced (in their infinite wisdom) a super-villain from Colombia.

All of Snowflame’s super powers, including superhuman strength, superhuman speed, and immunity to pain, derive from his cocaine addiction. Isn’t that special?

Here is a direct quote from the character himself:

“I am Snowflame! Every cell of my being burns with white-hot ecstasy. Cocaine is my God — and I am the human instrument of its will!”

I swear, I am not making this up.

Upon learning about this, I thought it a bit unfair of D.C. Comics to bypass an even more important Colombian export industry. I mean, if they are trying to win hearts and minds in Bogotá, perhaps they should make a super villain whose tag line is more like this:

“Every cell of my being burns with steaming-hot ecstasy. Caffeine is my God, and I am the human instrument of its will!. I am The Dark Roast!!”

In the spirit of science, let us extrapolate with a question: If you were a major comic book franchise, and you were going to create a fictional character who would effectively alienate a vast swath of your readership in one country or another, what character would you create?

There are so many cultures to choose from — so many potential readers to deeply offend! French, Italian, Latvian or Israeli, the possibilities are endless.

I am open to suggestions.

Pteraforming

Since yesterday’s post I learned a few things about the current fragility of running WebGL in your browser. Fortunately, the situation will only get better over time, but for now there are a few caveats:

  1. If your computer is more than a few years old, you are probably out of luck.
  2. You need your Safari or Firefox or Chrome browser to be up to date (Internet Explorer is apparently not an option).
  3. You need to enable WebGL for your browser. These instructions seem very well written.

It took only a few lines of HTML jockeying to make the Dragon planet code editable. Alas, shader code is not so easy to figure out, so this will probably only be fun for you if you are already a pretty good programmer.

But feel free to try your hand at making your very own Dragon planet!

Happy pteraforming!

Dragon planet

Inspired by the shiny new toy of WebGL, I tried my hand last night and this morning at making a procedural object. As in my very earliest experiments with procedural texturing, I’m not bothering with things like geometry and polygons. Instead, the entire scene at any pixel is defined by a function that takes only three arguments: (1) the pixel’s horizontal position in the image, (2) the pixel’s vertical position in the image, and (3) the clock time at this animation frame.

So I’m going way back to my original crazy idea that started this whole shader business in the first place: go ahead and run an entire computer program at every pixel of an image.

Except that now, thanks to graphics processing units (GPUs), everything runs a few million times faster than it did when I first tried this stuff.**

Taking a cue from yesterday’s post, I decided to make a “Dragon planet”. It’s kind of a fantasy answer to the question “What would a planet be like if it were like a dragon?” I imagine such a planet would be angry. It would breath fire, but otherwise be mysterious and dark with hidden depths. And it would probably be green (the most common color for dragons).

If you load the page you’re reading in Google Chrome (WebGL won’t work in Safari, and your version of Firefox may not support WebGL), then you can click on the link below:



 
When the page comes up in Google Chrome, you will see, on the left, the program that’s running on your GPU. That’s all the code needed to create the real-time animated planet, other than a few dozen lines of code that implement my noise and turbulence functions.

Now we just need to make some creatures to live on the Dragon planet. Space dragons!

** Thanks to Kris Schlachter, who helped me get started with WebGL!

Being the dragon

It isn’t until near the very end of the first book of George R. R. Martins’ “A Game of Thrones” series that honest to goodness dragons appear. Before that, it seems to be more or less a story about some rather dysfunctional medieval kingdoms, and maybe bad weather.

But then the dragons show up, and suddenly it’s all a lot less Barbara Tuchman and a lot more J. R. Tolkien.

Today I looked around at the shaders people have been writing with WebGL. Things are kind of boring, until you get to the shaders that mix it up with procedural noise. And then suddenly the visual results get really interesting.

I looked at various peoples’ shader code for noise, and to my surprise I saw copyright notices with assorted peoples’ names — both for the original noise function and for simplex noise. Which is weird because both of those are my algorithms. So I’m not really sure exactly what those copyrights are for.

In any case, it feels as though shaders with noise function are like those dragons in “A Game of Thrones”. When you see them, things become a lot less like an academic exercise and a lot more about cool shapes and images.

Except in this case, in a weird way, it seems that I am the dragon!

Much faster

I’ve been playing around with WebGL. To many people reading this, the word “WebGL” might not mean very much. But to some it is a very big deal.

You see, computers have been getting faster at an exponential rate, a phenomenon commonly known as “Moore’s Law”. So computations which were out of reach only a few years ago, because they were just too gosh darned slow, one day become easy, and then soon after that you can do them in real time.

The general purpose processor on your computer can do a lot of different things, but that very generality means it can only go so fast. It’s not allowed to cut corners, because it has to be general.

But those little graphics processor chips that also come with your computer have no such responsibility. They don’t need to run an operating system, or a file system, or support your text editor or spreadsheet. All they need to do is make graphics happen blazingly fast. And that means they can indeed cut corners. As a result, they can do certain calculations hundreds of times faster than your computer’s main processor.

WebGL is a standard that lets you access all that raw power directly from your Web browser. It’s not yet supported by all Web browsers, but it will be.

Which means that I and others who make cool graphics things can, right in your Web browser, show you — and let you play with — stuff that is far cooler and more intricate than anything you’ve ever seen before.

I’m going to start posting examples of this stuff soon, as soon as I make something I’m really happy with.

What’s in a name?

Rod Brooks, the great robotics pioneer and innovator, founded the company iRobot, which created the Roomba, thereby introducing household robotics into many homes. More recently, Brooks founded another company, Rethink Robotics, which introduced Baxter, a friendly low-cost general purpose robotic factory worker with some built-in common sense.

Somewhere Karel Capek is looking bemused, while Isaac Asimov is wondering whether he can still sue.

But where did the name “Baxter” come from? I have a theory.

In 1962 Hanna-Barbera first aired the cartoon “The Jetsons”. As many of you know, it was a vision of a future where family cars had been replaced by flying saucers, meals could be created at the touch of a button, and pretty much all of our techno-fantasies had come true. The joke was that nothing had really changed: Our hero, George Jetson, was just as much the put-upon every-man as his predecessor, Hanna-Barbera’s even more popular every-man Fred Flintstone.

One of the most popular characters on “The Jetsons” was the robotic maid Rosie, a working-class robot with an accent straight out of Brooklyn. The wise-cracking Rosie, who referred to her employer as “Mr. J”, never let George Jetson get the upper hand. While technically she worked for him, she always made sure her upwardly striving white-collar boss knew that she was several steps ahead of him.

Hanna-Barbera had a habit of riffing off and borrowing from whatever was popular in the contemporary culture. In this case the borrowing was from a very popular sitcom that had premiered the previous year. “Hazel” starred the brilliant Academy Award winning Shirley Booth. She played a working class maid (complete with Brooklyn accent) in an upper middle class household. Hazel was always several steps ahead of her employer, who she always referred to as “Mr. B”.

This was all when Rod Brooks was around fifteen years old, a very impressionable age for a young roboticist.

As it happened, Hazel’s upwardly striving white-collar boss also had the first name George.

And his last name was Baxter. You do the math.

Warm / cold

In popular culture we often find duos of men who differ from each other in a very specific way: One of them is a romantic who fundamentally sees the world through a lens of warmth and emotion, and the other is a cold-eyed realist, who looks at things more cynically.

Some examples of this pairing (among many) are James T. Kirk and Mr. Spock, Bud Costello and Lou Abbot, Stan Laurel and Oliver Hardy, Martin Luther King and Malcolm X, Paul McCartney and John Lennon, John Watson and Sherlock Holmes, Jean Valjean and Inspector Javert.

I find it striking how often this particular trope shows up — the list above could go on and on. Yet I can’t think of nearly as many examples where the two are women. There’s Mary-Beth Lacey and Christine Cagney. Or maybe Andrea Sachs and Miranda Priestley, but now I’m reaching.

Why the apparent gender disparity? Hmm.