Sunday, 19 November 2017

Wall Art That Is Aesthetically Pleasing And Mathematically Elegant (A Personal How To)

It's done. Two and a half days after inspiration first hit, the finished product is finally here.

I'm no oil painting myself, but I just created one. I call it "Locutus".

It all started three nights ago on Facebook, when a friend posted a picture of some wall art she had created.

Tanushree Rao's Wall Art


It was striking and elegant, and I was very impressed. Tanushree also provided a link to a site that explained how to create such a piece. I'd recommend that page to anyone who feels tempted to create something like that.

But on examining the design closely (the basic design, I mean, not Tanushree's creation), I discovered something vaguely unsatisfying. If you notice, the design uses four colours and is made up of 27 pieces (what I will call "shells", for want of a better term).

Now 27 is not neatly divisible by 4, so this means that the design cannot have an equal number of shells of each colour. Indeed, in Tanushree's case, there are only 6 orange shells, but 7 each of the other 3 colours.

( 7 x 3 ) + 6 = 27

It's a very small thing, but so is a pebble in one's shoe. This tiny, tiny imperfection troubled me a fair bit, and I told Tanushree so. I was gratified when she responded, concurring with me on this.

I hear you! It troubled me too. I got around it by 'categorising' the orange differently to the rest. It's the feature/colour pop whereas the others are standard!

That comment about categorising one colour differently gave me an idea!

My lounge already has a couple of paintings that employ this concept.

I saw this painting at a mall a few years ago, and it was so arresting that I had to buy it.

I saw this painting later on, and I bought it because it complemented the other one.

To add to this theme, my wonderfully talented sister-in-law Vidya Sen decided to gift us one of her paintings.

The umbrella's handle looks like the stalk of a chilli, and I have joked to Vidya that she must have been subliminally influenced by her Tamil background, since the Tamil word for capsicum is 'koDai-miLagaai', or "umbrella chilli".


Now I had the basic design in my head, but there were many steps I had to take.

First, I wanted to see if the colour scheme would even look good.

For that, I had to create a hexagonal grid and colour it.

Creating a grid using SVG was a bit of a challenge, but a lot of fun. I love SVG.


It's probably not the most elegant code, but it was enough to create a basic grid.


And this was the result.



I didn't do the colouring within SVG because I wanted to experiment with different colours interactively, so I used The GIMP to edit the black-and-white image file that I generated from SVG.

After a few attempts, this is what I ended up with.

Notice the "shells" at three of the six vertices of the hexagon. They're not of a single colour! That's because I realised that keeping the shells intact would spoil the design of the grid that I was envisaging. So I decided to cheat by cutting and splicing these three shells so each would have two colours.

OK, it didn't look too bad, so next, I had to work out how to render it in the physical world. The main decision was about dimension. How large or small should the display be? I worked out what I thought would be a reasonable size for the final canvas, then worked backwards to determine the size of the piece of paper required to create each shell.

Some scale models were called for.

The shell on the right was created from a 210 mm x 210 mm square, i.e., directly from an A4 sheet of paper (210 mm x 297 mm). That was too large, and it told me that the correct dimension should be 2/3 of that, which meant paper of size 140 mm x 140 mm.

Armed with the knowledge of these dimensions, I set out to the shops to buy myself some art material.

To wit:

1. A canvas of size 610 mm x 508 mm
2. Some hanging wire and hooks
3. Foam mounting tape
4. Acrylic paint (Carbon Black and Titanium White)
5. Two large brushes and a fine one
6. Coloured paper, 125 gsm (black, white, grey and red)


Although it was all marked as 125 gsm, the grey paper was perceptibly thicker than the others, and harder to fold. Fortunately, I didn't have to buy different packs of paper for different shades of red. The pack for red itself had sheets of different colours.

Each A4 sheet would give me enough material for two squares, 140 mm x 140 mm.

I took care to mark the dimensions very precisely on each and every sheet before cutting. It was tedious work, but I was thankful later when everything just fit.

I remembered what my father used to say about the Carpenter's Maxim - "Measure Twice and Cut Once".


Folding itself was easy once I worked out how to do it from the tutorial.

The first set of folds...


... then the second...


...et voilĂ !


Now all I had to do was create 27 shells in all:
- One each in the three shades of red
- 8 each in black, white and grey

Once that was done, I placed them on the canvas as a sort of "dress rehearsal'.

The burgundy on the right was too dark, so that told me to swap it out and replace it with the red on the left, and to use orange on the left in its place.

Apart from that minor change to the colours, the design looked good even when materialised into real objects, which encouraged me to go on.

I screwed in the hooks for the mounting wire.

The lady at the shop had suggested I hang the frame as-is, but I didn't want to take any chances.

A few minutes later, the canvas had more than one option for hanging.


Next, I laid out all the stuff I needed to paint the canvas and mount the shells.

Notice that I've pencilled in the hexagonal grid.

My painting arsenal was simple and minimalistic.

The large brushes were for the thick strokes, one for white and one for black (of course, they would merge and start to "pollute" each other), and the thin one was just for me to initial the work in my usual style.


I like acrylic paints because they dissolve in water and dry in minutes. Unlike watercolours, they no longer dissolve in water once they dry, so they cannot smudge or "run" once the painting is done. And unlike oils, they don't require days and weeks to dry.

So painting took just a little while, and then it was done.

I had a choice here to change direction and instead paint a woman in a hijab (just kidding)

The tutorial had suggested using foam mounting tape to mount the shells, so I next stuck pieces of the tape on top of the grid that I had pencilled in. The lengths needed to be measured fairly precisely, otherwise there would be unseemly pieces of mounting tape sticking out from under the shells, or there wouldn't be enough to hold the shells up.

As it turned out, the roll I purchased was exactly enough for this artwork. I finished the roll as I applied the last piece to the canvas.


Foam mounting tape is extremely sticky, so it's just as well that one side is covered in non-stick paper. Even so, applying the pieces correctly involved lots of cursing.


Once all the pieces of tape were in place, I removed the non-stick paper to expose the sticky upper surface.

It's important to place the shells right the first time, because pulling an object free of this extremely sticky surface can be ... frustrating.

Some more cursing later, the shells were all in place.

It finally began to look like what I had envisaged two nights earlier

I'd heard that artwork made of paper doesn't age very well, because colours tend to fade when exposed to sunlight. I have a fair amount of sunlight in my lounge, so something would have to be done. Some research turned up a UV protection spray for precisely such pieces of art, so I went out and purchased that too.

They think of everything, don't they?


Once sprayed and initialled, the product was ready.



And all I had to do then was mount it on the wall.



And there it hangs. "Locutus" is finally done!

Why do I call it Locutus?

Do you remember how Captain Picard was kidnapped by the Borg and used as an interlocuter between the Borg species and humans? The hexagon represents the 3-D view of the Borg Cube. The smaller red cube within it represents Picard in his red Starfleet uniform.

"I am Locutus of Borg. Resistance is futile. You will be assimilated."

I'm very pleased and satisfied. Not only do I have a sense of artistic accomplishment, I'm also very happy that I managed to do this while preserving mathematical symmetry at more than one level.

Black - 8 shells; Dark red - 1 shell
Grey - 8 shells; Orange - 1 shell
White - 8 shells; Yellow - 1 shell

Thank you, Tanushree!

Saturday, 4 November 2017

The Three Singularities In Our Future


1. The Technology Singularity

Ray Kurzweil's 2005 prediction of the "Technology Singularity", the point in time when machines will finally overtake humans in intelligence, is looking more inevitable as the years go by.

We are seeing this first-hand today with the pervasive growth of intelligence in the everyday "network". GPS that can help us navigate efficiently through real-time changes in driving conditions, messaging software that suggests suitable responses and suitable endings to sentences, IVR systems that provide self-service functions over the phone, and many more. And we read about breakthroughs in Artificial Intelligence, such as the many applications of Deep Learning.

The moment that Skynet becomes self-aware...

All this is exciting, but it's also scary. That's not just because of some Terminator-style doomsday scenario, but because of the much more mundane prospect of mass unemployment.

2. The Energy Singularity

There is a second singularity that is also approaching, which I call the "Energy Singularity". I define it as the point at which the marginal cost of energy production and transmission is virtually zero. In other words, the world can access as much energy as it needs at virtually no cost. The infrastructure to deliver energy has already been paid for at this point, and the investment can thereafter be harvested ad infinitum.

We're putting in place the infrastructure for the Energy Singularity as we speak, but we don't realise that we're doing it. We think we're saving the planet from climate change by reducing the emissions from hydrocarbons, but we're actually doing something of far greater significance. We're making energy sustainably cheaper to produce, and one day the marginal cost per unit of energy will be virtually zero.

We're seeing some early signs of this. Germany is now producing 35% of its power requirements from renewable energy. Chile is producing more solar power than it can consume, and is consequently giving energy away for free! There is talk of households being able to go "off the grid" with solar panels and battery storage. The cost of solar panels has been dropping significantly over the years, and the cost of battery storage is beginning to follow a similar downward trend.

Solar is becoming a formidable source of alternative energy with each passing year

Wind farms are the fastest-growing source of renewable energy, rapidly catching up with hydroelectric power, and likely to be the largest source of renewable energy in the near future, much larger than solar.

Offshore wind farms seem likely to be the biggest source of renewable energy in the near future

It's not hard to extrapolate forward to a future where energy is available in abundance at a price point that is virtually free, because the cost of the infrastructure that produces this energy has already been amortised.

These two singularities together have very significant implications for the production of goods and services. At a high level, the three classic inputs to the production of any good or service are raw material, labour and energy. If energy is free and labour (even that of knowledge workers) can be replaced through automation, then it is only the cost of raw material that is relevant. Again, if the major cost of raw material is its extraction or harvesting from nature, and if these activities can be directed by artificial intelligence and powered by cheap or free energy, then the cost of raw material plummets as well. We could then say that the two real inputs to the production of anything are Energy and Intelligence, as I explain here.

These two trends together bode very well for the productivity of society in general, whether in the primary (agriculture), secondary (industry) or tertiary (services) sectors.

In fact, since energy is the ultimate currency, the availability of cheap and abundant energy (The Energy Singularity) means that human society will become unimaginably wealthy in a very short time. Humanity does not even have to exert itself to guide the application of that energy towards productive ends, because Artificial Intelligence is capable of doing it on our behalf (The Technology Singularity).

However, the imminent arrival of the Technology and Energy Singularities doesn't necessarily and automatically translate to a higher standard of living for human beings. There is a certain conscious economic "rewiring" of society that will be required to transition to this better future and to minimise the pain of the transition.

The point at which this rewiring takes place is what I call the "Economic Singularity".

3. The Economic Singularity

After all, the implied social contact between households and firms has looked like this for a few generations now:

A classic diagram from any economics textbook - "The Circular Flow of Income"

There are two cycles here, one clockwise and one counter-clockwise. The inner, counter-clockwise one is the employment cycle. Firms hire labour from households and pay wages as compensation. The outer, clockwise cycle is that of consumption. Households buy goods and services from firms, using the money they have earned through wages. The two cycles - inner and outer - have to be of roughly equal magnitude for the system to remain in equilibrium.

Consider however, that as firms become capable of replacing human labour with machine labour, the inner cycle necessarily begins to weaken.

"Jobless growth"/"Jobless recovery" occurs when the inner cycle weakens but the outer one remains healthy (for a time)

In other words, the consequence of rising productivity through increased automation is unemployment. Firms can continue to produce and sell the same volume of goods and services, without hiring and paying for labour at the scale they used to earlier.

But the inner and outer cycles have to be in equilibrium! That equilibrium is what sustains the economy. When the inner cycle weakens, it's only a matter of time before the outer cycle weakens as well.

It cannot last. The economy will grind to a halt if households have no money to spend. This is now being called "Secular stagnation"

It's easy to see that if households suffer from mass unemployment, they will not have the means to spend on goods and services produced by firms. So it doesn't matter how productive firms are, or how competitive their prices become. They will simply not be able to sustain their volume of sales as time goes on, and the economy as we know it will grind to a halt.

Of course, long before that stage is reached, there will probably be bread riots and violent revolution, because people are unlikely to starve quietly.

It's obvious that firms are being extremely short-sighted in their headlong pursuit of productivity advantages through automation of their workforce. They are unravelling the delicately balanced wiring that keeps the economy going. If the captains of industry don't want their heads to be carried on pikes at some point in the inevitable popular revolution, they should start to look at alternative wiring of the economy to compensate for the weakening of the inner circle. Governments and monetary authorities should both realise that monetary levers will not work anymore. Interest rates are at their historical lowest, and cannot stimulate the economy by going even lower. The stimulus has to come from fiscal levers.  Money has to be put into the hands of ordinary people to get them to spend.

The Economic Singularity, the point when society rewires itself in a sustainable way so that equilibrium is again attained, will require the intervention of governments. Here is what that could look like:


The long-prophesied "leisure society" after the Economic Singularity

In other words, the firms that produce goods and services for profit without employing human labour, consuming virtually free energy and using cheaply acquired raw material must pay taxes that are then distributed to households as a "Universal Basic Income", credited directly into bank accounts. Households then use this income to spend on goods and services.

This is a new equilibrium that gives every person what they need without their having to work for it. The Economic Singularity will mark the beginning of the much-awaited Leisure Society.