wolfram

Batman and Superman Maths

Wolfram Alpha is an incredibly powerful mathematical tool – which has been developed to allow both complex calculations and data analysis. It is able to generate images like that shown above, of the Batman logo. What’s really impressive however is that you can see the underlying graph input that would generate this image:

wolfram 2

At first glance this look indecipherable – but we can actually understand this a little better by breaking these inequalities down and looking at the individually.

wolfram3

The first inequality defines the area inside an ellipse.  All ellipses have a general formula:

  \left(\frac{x}{a}\right)^2 + \left(\frac{y}{b}\right)^2 = 1.

In our inequality, the a simply stands for an arbitrary constant (because the Batman logo has no scale).  To keep things simple we can set a = 1.  This gives an equation:

wolfram4

which generates the ellipse:

wolfram5

When we now make this the inequality:

wolfram6

Then this simply has the effect of shading in the area contained within the ellipse.  So, comparing this to the original Batman shape we can see that the ellipse we have drawn forms the wings of the logo.

Next, let’s look at the next inequality:

wolfram7Which, if we again choose a = 1 for simplicity, we will get

batman

when the part of this graph which is greater or equal to 4.

I’m not going to go through each part – as that would take too long!  Let’s look at one more inequality though:

wolfram9

This will generate the part of the graph that looks like:

wolfram10

This will form part of the Batman logo cape.

Superman Logo

wolfram11

Now if you thought that was hard, have a look at the inequalities needed for the Superman logo above:

wolfram12

Now this really is almost indecipherable!  I can at least explain what the min(a,b) means.  For example, say we had:

y = min(cosx,sinx)

This would simply mean that for any x value, I would find out what cosx was equal to, find out what sinx was equal to, and then plot the smallest value as my y value.  For example, when x = 0, I would have cos(0) = 1 and sin(0) = 0.  So I choose my y value as 0 when x = 0.  Plotting this graph would give:

  wolfram13wolfram14

Which is an interesting periodic function that shares some of the features of the regular trig graphs.  Anyway, the real Superman inequality is much harder than this – and demonstrates just how powerful Wolfram Alpha is.

Screen Shot 2018-03-19 at 5.29.06 PM