Widget Wednesdays #16

This evening I thought I would implement Conway’s Game of Life. But after I did that, I decided it needed some sort of graphics twist, so that it wouldn’t just be yet another implementation of Conway’s Game of Life, if you know what I mean.

So I decided that instead of displaying whether any one square was on or off, instead I would display the accumulated number of times that any square happened to be on, so it would look something was growing and coming to life. Then I decided it would be cool to make those squares gradually turn green, to suggest plant life.

Once I committed to this more organic direction, I decided to go all in on making it feel like life emerging. So I made it all happen on a circular disk, rather than the more traditional square.

When the program starts up, I seed the disk with random values (half of the squares are on and the other half are off). So every time you refresh the page, you grow a new life form.

You can see the result here.

Complicit and impolitic

I woke up this morning and, for some reason, one of the very first thoughts I had was about the connection between being complicit and being impolitic.

You and I spend our lives in a heady soup of social connection, whether we like it or not. Every day we define ourselves (and are defined by others) via our social, cultural and political beliefs and choices.

So there is always the temptation to simply identify with a particular group, and be passively complicit in whatever is the latest stance of that group on any given issue. Given that we are highly social beings, that might seem like the politic thing to do.

So there is a strong temptation to simply “check the boxes”, to not think through each issue on your own. Turning off your mind and choosing the complicit path can certainly save a lot of time and effort.

Alas, that approach to life will inevitably lead to a bad outcome. When you stop exercising our individual judgement, you gradually lose the ability to do so.

Even within your own chosen group, you need to be able to stand up and say “Here is how I think we need to adjust our focus.” If you simply adopt a herd mentality, then you end up being of no real use to those whose values you share.

Ironic as it may seem, two words that seem at first to be opposite are actually apposite. In the long run, to be complicit is to be impolitic.

Like a door opening

I’ve been working with a colleague for months to get something working. In particular, this was the key technical step that would allow us to move forward on the project.

Getting it working involved surmounting a lot of hurdles, and there have been many setbacks. But today, for the first time, it finally worked. Hurray!

There are still many steps to be done until the project is completed, and I realize now that I had been holding off on taking those steps. Because what would have been the point of taking those steps until we knew the whole thing is feasible?

So now I can give myself permission to tackle those other problems, and it feels great. It’s like a door opening onto a whole new world.

Time to step through.

That’s why it’s called hardware

I spent some time today working with a colleague on a programming project that involved hardware. Which is a lot more frustrating than a purely software project.

With software you know what you are getting. Either you have a bug in your code or you don’t.

But with hardware there are so many things that are out of your control. Is this cable working? Do I have a faulty board? Is the download rate too fast for the embedded CPU chip?

It can take forever to figure out why something isn’t working properly. Fortunately, by trial and error we managed to solve a ten minute problem in just a little under two hours.

Which isn’t so bad, all things considered. As Robert Towne might have said: Forget about it Jake, it’s a hardware problem.

Future restaurant trip

It’s 2032. You and I are walking to a restaurant together in Manhattan. Mobile Google Maps is on our eyeglasses, which means we are seeing it in the world, on the sides of buildings, on street signs, wherever is a convenient place for both of us to look.

Because we don’t need to look at our phones to see the route, we can continue focusing on our conversation with one another, without worrying that we will take a wrong turn. This is fundamentally different from the experience of mobile Google Maps today, which requires you to pay at least some attention to your phone app.

When we get to the restaurant, there is no menu or QR code, or any other artifact from the past. We both see the array of food choices laid out for us on the table. We use speech and hand gestures in natural ways to customize our choices.

By the time we order, the food we ordered is already on the table, just the way we like it. We just can’t eat it yet.

A few minutes later, our food has arrived. It looks just the same as it did before, only now we can eat it. Which is nice. 🙂

VR fractals

Now that I realize how fast my new computer is, I’m eager to try extending the visualization of fractals into 3D. In fact, I’d like to move it into virtual reality.

I’m not going to be able to use a stand-along VR headset like the Quest for this. I’ll need to do the computation on my computer, and just view it on a VR headset.

It will be cool to wander around within a space-filling fractal. An entire world of infinite detail!

Widget Wednesdays #15

I just got a fancy new 2021 MacBook Pro, the one with the Apple M1 chip. And it is fast. Really, really fast.

I was curious to see just how fast it is, so I did what any self-respecting computer nerd would do. I implemented a visualization of the Mandelbrot set.

I have a special connection to the Mandelbrot set. When Benoit Mandelbrot was preparing to re-issue his book The Fractal Geometry of Nature, he visited MAGI to check out our Celco film recorder. He knew about us because we had used one of those to capture our CGI for TRON.

Amazingly, the people I worked with sent me — the most junior mathematician at MAGI — to go out to lunch with him. Needless to say, it was thrilling to have a conversation with the great man. I had recently implemented the Noise function, and was using it to generate fractals, so we had a lot to talk about.

The core operation in my current implementation does 100 iterations of Z=Z2+C at each pixel, with a user interface that lets you zoom in 1000-fold by clicking (you click again to zoom back out).

My new computer easily handles that. In fact, this computer is so fast that when I tried 1000 iterations per pixel, it still ran at full frame rates.

Which is amazing because the first time I ever tried implementing the Mandelbrot set, it took about an hour a frame. The mind boggles.

There are so many astonishing places in the Mandelbrot set, and it would be a shame to find one but then lose it forever. So at the top of the screen I display where you are. If you go back later to that location, the same beautiful details will be waiting for you.

I couldn’t decide what color scheme to use. Part of me wanted to go with a “fire” motif, and the other with an “ice” theme. So I decided to split the difference.

You can see what I mean if you run it, which you can do here.

New phrases

About forty years ago a new phrase entered the lexicon of football fans. Because of a single moment in an NFL game between the Cowboys and the 49ers, aficionados of the game still talk about “The Catch”.

If you’re a football fan, nobody needs to explain to you what “The Catch” refers to. You already know.

Now I think a new phrase is entering our popular lexicon — “The Slap”. When you say “The Slap”, everybody knows exactly what you are talking about.

And there’s a good chance that people will still know about it in another forty years.

Song lyrics

I posted those song lyrics yesterday because they were rolling around in my head. The lyrics to Beatles songs often roll around in my head. It’s astonishing to me what a close emotional connection I have with their song lyrics.

Most people I know have a particular musical influence that connects to them powerfully. For me it’s definitely the Beatles, the music I grew up with. I know all the lyrics to all the Beatles songs, and there’s a part of me that is (unfairly) astonished when I find that somebody doesn’t realize that a song was written by Lennon and McCartney.

In fact, that moment in the movie “Yesterday” where the main character can’t remember the lyrics to Eleanor Rigby never sat well with me. I understand that it was useful for driving the plot forward, but there is no way that somebody who is such a fanboy would not know those lyrics backwards and forwards.