The Batman equation

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

User avatar
xkcdfan
Posts: 140
Joined: Wed Jul 30, 2008 5:10 am UTC

The Batman equation

Postby xkcdfan » Fri Jul 29, 2011 9:43 pm UTC

Image

User avatar
Dopefish
Posts: 854
Joined: Sun Sep 20, 2009 5:46 am UTC
Location: The Well of Wishes

Re: The Batman equation

Postby Dopefish » Fri Jul 29, 2011 11:20 pm UTC

Someone type up the equation in either latex pretty-ness or standard typed out form so it can be copied/verified.

Also, the picture is huge and cut off for me so I don't actually get to see the whole equation without jumping through certain hoops.

edit:

Warning: All of the 2's that were supposed to be squaring are lacking ^'s below, so you'll need to replace them appropriately.

((x/7)2 Sqrt[Abs[Abs[x] - 3]/(Abs[x] - 3)] + (y/3)2 Sqrt[Abs[y + (3 Sqrt[33])/7]/(y + (3 Sqrt[33])/7)] - 1) (Abs[x/2] - ((3 Sqrt[33] - 7)/112) x2 - 3 + Sqrt[1 - (Abs[Abs[x] - 2] - 1)2 ] - y) (9 Sqrt[Abs[(Abs[x] - 1) (Abs[x] - 3/4)]/((1 - Abs[x]) (Abs[x] - 3/4))] - 8 Abs[x] - y) (3 Abs[x] + .75 Sqrt[Abs[(Abs[x] - 3/4) (Abs[x] - 1/2)]/((3/4 - Abs[x]) (Abs[x] - 1/2))] - y) (9/4 Sqrt[Abs[(x - 1/2) (x + 1/2)]/((1/2 - x) (1/2 + x))] - y) ((6 Sqrt[10])/7 + (3/2 - Abs[x]/2) Sqrt[Abs[Abs[x] - 1]/(Abs[x] - 1)] - (6 Sqrt[10])/14 Sqrt[4 - (Abs[x] - 1)2 ] - y) == 0

Should be mathematica friendly.
Last edited by Dopefish on Sat Jul 30, 2011 4:57 am UTC, edited 1 time in total.

User avatar
agelessdrifter
Posts: 225
Joined: Mon Oct 05, 2009 8:10 pm UTC

Re: The Batman equation

Postby agelessdrifter » Sat Jul 30, 2011 2:22 am UTC

It's really counter-intuitive to me that something like that could be defined without going piece-wise.

And furthermore how was anyone able to extract the formula?

User avatar
skeptical scientist
closed-minded spiritualist
Posts: 6142
Joined: Tue Nov 28, 2006 6:09 am UTC
Location: San Francisco

Re: The Batman equation

Postby skeptical scientist » Sat Jul 30, 2011 2:56 am UTC

agelessdrifter wrote:It's really counter-intuitive to me that something like that could be defined without going piece-wise.

And furthermore how was anyone able to extract the formula?

Not really. It makes heavy use of things like |x|/x, which basically let you define piecewise functions with a single formula. Any piecewise function where the pieces are intervals can be written as a sum of the functions defining pieces times the characteristic function of the corresponding interval, and the function (1+|a-x|/(a-x)*|x-b|/(x-b))/2 is basically the characteristic function of (a,b) (it's undefined at a and at b, but that doesn't really matter to a calculator trying to draw the graph).
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.

"With math, all things are possible." —Rebecca Watson

User avatar
Lorenz
Posts: 27
Joined: Fri Apr 29, 2011 5:57 am UTC

Re: The Batman equation

Postby Lorenz » Sat Jul 30, 2011 4:05 am UTC

Well, I can't exactly replicate all of it, but enough to make it look legit. Used your corrected mathematica friendly post.
((x/7)2 Sqrt[Abs[Abs[x] - 3]/(Abs[x] - 3)] + (y/3)2 Sqrt[Abs[y + (3 Sqrt[33])/7]/(y + (3 Sqrt[33])/7)] - 1) (Abs[x/2] - ((3 Sqrt[33] - 7)/112) x^2 - 3 + Sqrt[1 - (Abs[Abs[x] - 2] - 1)2 ] - y) (9 Sqrt[Abs[(Abs[x] - 1) (Abs[x] - 3/4)]/((1 - Abs[x]) (Abs[x] - 3/4))] - 8 Abs[x] - y) (3 Abs[x] + .75 Sqrt[Abs[(Abs[x] - 3/4) (Abs[x] - 1/2)]/((3/4 - Abs[x]) (Abs[x] - 1/2))] - y) (9/4 Sqrt[Abs[(x - 1/2) (x + 1/2)]/((1/2 - x) (1/2 + x))] - y) ((6 Sqrt[10])/7 + (3/2 - Abs[x]/2) Sqrt[Abs[Abs[x] - 1]/(Abs[x] - 1)] - (6 Sqrt[10])/14 Sqrt[4 - (Abs[x] - 1)2 ] - y) == 0
Attachments
Screen shot 2011-07-30 at 12.04.33 AM.png
Screen shot 2011-07-30 at 12.04.33 AM.png (10 KiB) Viewed 32483 times

User avatar
gmalivuk
GNU Terry Pratchett
Posts: 26129
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

Re: The Batman equation

Postby gmalivuk » Sat Jul 30, 2011 4:15 am UTC

Dopefish wrote:Should be mathematica friendly.
It is, but it's also wrong, since everything that should be squared is multiplied by 2.
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

User avatar
Lorenz
Posts: 27
Joined: Fri Apr 29, 2011 5:57 am UTC

Re: The Batman equation

Postby Lorenz » Sat Jul 30, 2011 4:17 am UTC

Yup, I noticed that was happening in one place, and corrected it. Apparently the same mistake is in multiple places.

User avatar
skeptical scientist
closed-minded spiritualist
Posts: 6142
Joined: Tue Nov 28, 2006 6:09 am UTC
Location: San Francisco

Re: The Batman equation

Postby skeptical scientist » Sat Jul 30, 2011 4:43 am UTC

Doing find and replace ")2" -> ")^2" should catch most of them.
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.

"With math, all things are possible." —Rebecca Watson

User avatar
Dopefish
Posts: 854
Joined: Sun Sep 20, 2009 5:46 am UTC
Location: The Well of Wishes

Re: The Batman equation

Postby Dopefish » Sat Jul 30, 2011 4:55 am UTC

Oh bother, sorry about that. I'll fix it later when I have time, but I'll add a warning to my earlier post pointing that out until then.

User avatar
Lorenz
Posts: 27
Joined: Fri Apr 29, 2011 5:57 am UTC

Re: The Batman equation

Postby Lorenz » Sat Jul 30, 2011 4:57 am UTC

Well, I have managed to clean my code a little (I can't seem to just use a contour plot or any similar mathematica option. I am numerically solving the equation and plotting the different solutions)
Attachments
Screen shot 2011-07-30 at 12.54.50 AM.png

User avatar
gmalivuk
GNU Terry Pratchett
Posts: 26129
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

Re: The Batman equation

Postby gmalivuk » Sat Jul 30, 2011 5:35 am UTC

ImplicitPlot should work.
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

adanedhel728
Posts: 52
Joined: Sat Nov 07, 2009 11:03 pm UTC
Location: Central U.S.

Re: The Batman equation

Postby adanedhel728 » Sat Jul 30, 2011 8:05 am UTC

I tried it in Maxima and got much less successful results. Maybe it's a limitation of Maxima, but I also could very well not be using it correctly. It was almost the Batman logo, it was just deformed.

Crosis
Posts: 1
Joined: Sat Jul 30, 2011 10:37 am UTC

Re: The Batman equation

Postby Crosis » Sat Jul 30, 2011 10:52 am UTC

I tried it in Mac OS X's Grapher... It didn't render anything for the full equation. But if I split it into 6 separate equations the results look pretty good.

I'm not sure if it's because I'm new here and don't have permission to attach images, or if I'm just being an idiot and not seeing how to attach images... but a link will have to suffice:

http://www.macopz.com/crosis/BatmanEqn.png

rjb
Posts: 1
Joined: Sat Jul 30, 2011 1:58 pm UTC

Re: The Batman equation

Postby rjb » Sat Jul 30, 2011 2:06 pm UTC

Tried plotting using matlab, with very limited success:

Code: Select all

batman = '((x/7)^2 * sqrt(abs(abs(x)-3)/(abs(x)-3)) + (y/3)^2 * sqrt(abs(y+ 3*sqrt(33)/7)/(y+3*sqrt(33)/7))-1) * (abs(x/2)-(3*sqrt(33)-7)/112*x^2-3+sqrt(1-(abs(abs(x)-2)-1)^2)-y) * (9*sqrt(abs((abs(x)-1)*(abs(x)-0.75))/((1-abs(x))*(abs(x)-0.75)))-8*abs(x)-y) * (3*abs(x)+0.75*sqrt(abs((abs(x)-0.75)*(abs(x)-0.5))/((0.75-abs(x))*(abs(x)-0.5)))-y) * (2.25*sqrt(abs((x-0.5)*(x+0.5))/((0.5-x)*(0.5+x)))-y) * (6*sqrt(10)/7+(1.5-0.5*abs(x))*sqrt(abs(abs(x)-1)/(abs(x)-1))-6*sqrt(10)/14*sqrt(4-(abs(x)-1)^2)-y)';

figure(1);
ezplot(batman, [-7.2 7.2 -3.5 3.5])
title('Batman')
xlabel(' ')
ylabel(' ')


http://tinypic.com/r/161ykuc/7

Any thoughts on where I went wrong? For those playing at home, use the following to see the equation in a somewhat more readable form (after first running the script above):

Code: Select all

bat = syms(batman)
syms x y
pretty(bat)

User avatar
Qaanol
The Cheshirest Catamount
Posts: 3055
Joined: Sat May 09, 2009 11:55 pm UTC

Re: The Batman equation

Postby Qaanol » Sat Jul 30, 2011 4:07 pm UTC

The form of the overall equation is a product of six terms. Since we are dealing, presumably, with complex variables, we are in a field, and all fields are integral domains, hence a product equals zero exactly when at least one of its multiplicands is zero. Thus we may consider each of the six terms independently. After the first term, the remaining five, when set equal to zero, are trivial to solve for y as a function of x. Thus, for any arbitrary x that does not cause division by zero, we will get at least five values for y, although occasionally some of these might coincide. We may get even more y values from the first term.

We may view this so-called “Batman equation” as a multi-valued map from ℂ\{a finite number of bad points, plus a finite number of branch cuts unless we take the multivalued square root operator} to ℂ\{possibly a finite number of bad points plus possibly a finite number of branch cuts}. Indeed, by inspection and a bit of reasoning, we can see that each of the terms considered alone produces a surface that is continuous everywhere except possibly at the bad points. The overal equation is just the union of all such surfaces, possibly with additional holes punched in at the points that are bad on any other such surface. We also see that each of the bad points is basically of the form √(|z|/z), which gets no worse than a step discontinuity along any path into the bad point. So we have no poles.

So, viewed as a set in ℂ×ℂ, the graph of the Batman equation is a collection of a finite number of surfaces continuous except at a few bad points (and possibly branch cuts). When we take the 2-dimensional slice of ℂ×ℂ corresponding to ℝ×ℝ, then we do in fact get see the curves presented. However, that image does no justice to the full graph of the equation, which naturally lies in what may be considered a Euclidean 4-space.
wee free kings

adanedhel728
Posts: 52
Joined: Sat Nov 07, 2009 11:03 pm UTC
Location: Central U.S.

Re: The Batman equation

Postby adanedhel728 » Sat Jul 30, 2011 6:15 pm UTC

rjb, that's kinda-sorta similar to what I got in Maxima, except yours is closer to correct.

Code: Select all

draw2d(ip_grid=[100,100],ip_grid_in=[20,20],
implicit(
((x/7)^2 * sqrt(abs(abs(x) - 3)/(abs(x) - 3)) + (y/3)^2 * sqrt(abs(y + (3 * sqrt(33))/7)/(y + (3 * sqrt(33))/7)) - 1) * (abs(x/2) - ((3 * sqrt(33) - 7)/112) * x*2 - 3 + sqrt(1 - (abs(abs(x) - 2) - 1)^2 ) - y) * (9 * sqrt(abs((abs(x) - 1) * (abs(x) - 3/4))/((1 - abs(x)) * (abs(x) - 3/4))) - 8 * abs(x) - y) * (3 * abs(x) + .75 * sqrt(abs((abs(x) - 3/4) * (abs(x) - 1/2))/((3/4 - abs(x)) * (abs(x) - 1/2))) - y) * (9/4 * sqrt(abs((x - 1/2) * (x + 1/2))/((1/2 - x) * (1/2 + x))) - y) * ((6 * sqrt(10))/7 + (3/2 - abs(x)/2) * sqrt(abs(abs(x) - 1)/(abs(x) - 1)) - (6 * sqrt(10))/14 * sqrt(4-(abs(x)-1)^2)-y)=0,
x,-9,9,y,-4,4));


This code requires loading the draw package.

Resulted in
Image

Update: I tried it again, this time typing out the equation from the original photo, using this command:

Code: Select all

draw2d(ip_grid=[100,100],ip_grid_in=[20,20],line_type=dots,
implicit(
((x/7)^2*sqrt((abs(abs(x)-3)/(abs(x)-3)))+(y/3)^2*sqrt((abs(y+3*sqrt(33)/7))/(y+3*sqrt(33)/7))-1)
*
(abs(x/2)-(3*sqrt(33)-7)/(112)*x^2-3+sqrt(1-(abs(abs(x)-2)-1)^2)-y)
*
(9*sqrt((abs((abs(x)-1)*(abs(x)-.75)))/((1-abs(x))*(abs(x)-.75)))-8*abs(x)-y)
*
(3*abs(x)+.75*sqrt((abs((abs(x)-.75)*(abs(x)-.5)))/((.75-abs(x))*(abs(x)-.5)))-y)
*
(2.25*sqrt((abs((x-.5)*(x+.5)))/((.5-x)*(.5+x)))-y)
*
(6*sqrt(10)/7+(1.5-.5*abs(x))*sqrt((abs(abs(x)-1))/(abs(x)-1))-6*sqrt(10)/14*sqrt(4-(abs(x)-1)^2)-y)
=0,
x,-9,9,y,-4,4))$


With this result:

Image

Everything's there, but there's a lot of stuff that we don't want there, too. Makes me wonder if there's a domain limitation or something that we're missing, but the fact that other people are getting better results makes me think that something's wrong on my end (either PEBKAC or Maxima).
Last edited by adanedhel728 on Sat Jul 30, 2011 7:43 pm UTC, edited 1 time in total.

something_meta
Posts: 9
Joined: Fri Jul 29, 2011 6:58 pm UTC

Re: The Batman equation

Postby something_meta » Sat Jul 30, 2011 7:43 pm UTC

Dopefish wrote:Someone type up the equation in either latex pretty-ness or standard typed out form so it can be copied/verified.


I think this should be right:

[math]\left(
\left( \frac{x}{7} \right) ^2
\sqrt{ \frac{ ||x| -3 | }{ |x|-3 } }
+
\left( \frac{y}{3} \right) ^2
\sqrt{ \frac{ \left| y + \frac{3\sqrt{33}}{7} \right| }{ y + \frac{3\sqrt{33}}{7} } }
- 1
\right)
\cdot
\left(
\left| \frac{x}{2} \right|
-
\left( \frac{ 3\sqrt{33} -7 }{112} \right) x^2
- 3 +
\sqrt{ 1 - (||x| - 2| - 1)^2 }
- y
\right)
\cdot
\left(
9 \sqrt{ \frac{
| (|x|-1)(|x|-.75) |
}{
(1-|x|)(|x|-.75)
} }
- 8|x|-y
\right)
\cdot
\left(
3|x|+.75 \sqrt { \frac {
| (|x|-.75)(|x|-.5) |
}{
(.75-|x|)(|x|-.5)
} } - y
\right)
\cdot
\left(
2.25 \sqrt{ \frac{
| (x-.5)(x+.5) |
}{
(.5-x)(.5+x)
}} - y
\right)
\cdot
\left(
\frac { 6 \sqrt{10} }{ 7 }
+ (1.5 - .5|x|) \sqrt{ \frac{ ||x|-1| }{ |x|-1 } }
- \frac{ 6\sqrt{10} }{ 14 } \sqrt{ 4-(|x| - 1)^2 } - y
\right)
=0[/math]

The forum cuts it off for being wide, though, so here's the latex source:

Code: Select all


\left(
 \left( \frac{x}{7} \right) ^2
 \sqrt{ \frac{ ||x| -3 | }{ |x|-3 } }
 +
 \left( \frac{y}{3} \right) ^2
 \sqrt{ \frac{ \left| y + \frac{3\sqrt{33}}{7} \right| }{ y + \frac{3\sqrt{33}}{7} } }
 - 1
\right)
\cdot
\left(
 \left| \frac{x}{2} \right|
 -
 \left( \frac{ 3\sqrt{33} -7 }{112} \right) x^2
 - 3 +
 \sqrt{ 1 - (||x| - 2| - 1)^2 }
 - y
\right)
\cdot
\left(
 9 \sqrt{ \frac{
  | (|x|-1)(|x|-.75) |
 }{
  (1-|x|)(|x|-.75)
 } }
 - 8|x|-y
\right)
\cdot
\left(
 3|x|+.75 \sqrt { \frac {
  | (|x|-.75)(|x|-.5) |
 }{
  (.75-|x|)(|x|-.5)
 } } - y
\right)
\cdot
\left(
 2.25 \sqrt{ \frac{
  | (x-.5)(x+.5) |
 }{
  (.5-x)(.5+x)
 }} - y
\right)
\cdot
\left(
 \frac { 6 \sqrt{10} }{ 7 }
 + (1.5 - .5|x|) \sqrt{ \frac{ ||x|-1| }{ |x|-1 } }
 - \frac{ 6\sqrt{10} }{ 14 } \sqrt{ 4-(|x| - 1)^2 } - y
\right)
=0


and a PNG rendering at (I'm apparently not allowed to use [url]) <http://i.imgur.com/vtwYh.png>.

User avatar
phlip
Restorer of Worlds
Posts: 7550
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

Re: The Batman equation

Postby phlip » Sun Jul 31, 2011 1:40 pm UTC

It's 6 terms, multiplied together, and called equal to zero... you might have better luck plotting it as 6 separate curves, one for each term, equal to zero. Might make life a bit easier for the plotting tool...

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

User avatar
SSJ3 Mario Brothers
Posts: 18
Joined: Thu Apr 03, 2008 2:06 am UTC

Re: The Batman equation

Postby SSJ3 Mario Brothers » Sun Jul 31, 2011 5:40 pm UTC

phlip wrote:It's 6 terms, multiplied together, and called equal to zero... you might have better luck plotting it as 6 separate curves, one for each term, equal to zero. Might make life a bit easier for the plotting tool...

That works to an extent, however the problem is when you set one of the six terms equal to zero, you miss out on the implied bounds imposed by the other five. Which is where all those extra lines come from.

I have so far been unsuccessful in plotting it in MATLAB; I know I could do it by manually calculating the bounds for each of the six parts, but where's the fun and elegance in that?

greengiant
Posts: 272
Joined: Thu Jul 09, 2009 9:26 am UTC

Re: The Batman equation

Postby greengiant » Sun Jul 31, 2011 6:02 pm UTC

SSJ3 Mario Brothers wrote:
phlip wrote:It's 6 terms, multiplied together, and called equal to zero... you might have better luck plotting it as 6 separate curves, one for each term, equal to zero. Might make life a bit easier for the plotting tool...

That works to an extent, however the problem is when you set one of the six terms equal to zero, you miss out on the implied bounds imposed by the other five. Which is where all those extra lines come from.


I'm not sure I understand what you mean by missing out on the implied bounds, as far as I can see splitting it into 6 separate graphs should work.

Don't have access to Mathematica or anything, but surprisingly wolfram alpha can handle most bits of it.

[url=http://www.wolframalpha.com/input/?i=plot+((x/7)^2*sqrt((abs(abs(x)-3)/(abs(x)-3)))%2B(y/3)^2*sqrt((abs(y%2B3*sqrt(33)/7))/(y%2B3*sqrt(33)/7))-1)%3D0++x%3D-9..9,+y%3D-9..9]Part 1[/url]

[url=http://www.wolframalpha.com/input/?i=plot+(abs(x/2)-(3*sqrt(33)-7)/(112)*x^2-3%2Bsqrt(1-(abs(abs(x)-2)-1)^2)-y)%3D0+x%3D-9..9,+y%3D-9..9]Part 2[/url]

Part 3

Part 4

Part 5

[url=http://www.wolframalpha.com/input/?i=plot+(6*sqrt(10)/7%2B(1.5-.5*abs(x))*sqrt((abs(abs(x)-1))/(abs(x)-1))-6*sqrt(10)/14*sqrt(4-(abs(x)-1)^2)-y)%3D0+x%3D-9..9,+y%3D-9..9]Part 6[/url]

You might have to click on the 'try again with more time' button for it to work but it seems to have had a good go at everything except part 4 for me.

Edit: That's weird. Not sure why some of the URL tags haven't worked, but you can copy & paste the URL I guess.

LuminaryJanitor
Posts: 24
Joined: Tue Dec 15, 2009 12:23 pm UTC

Re: The Batman equation

Postby LuminaryJanitor » Sun Jul 31, 2011 11:01 pm UTC

An apple every eight hours will keep three doctors away

gabornagy
Posts: 1
Joined: Sat Dec 17, 2011 11:38 pm UTC

Re: The Batman equation

Postby gabornagy » Sat Dec 17, 2011 11:49 pm UTC

The equations are definitely correct. Graphing it implicitly doesn't work because when the square root of a negative number is taken, most graphing applications return "not a number".

I rewrote the equation as two separate piecewise functions, and I was able to graph it using my graphing calculator application on the iPhone.

y1(x)=(.75+3*abs(x))*(abs(x)≤.75)*(abs(x)≥.5)+(9-8*abs(x))*(abs(x)≤1)*(abs(x)≥.75)+2.25*(abs(x)≤.5)+((6√(10))(1-.5√(4-(abs(x)-1)^2))/7+(3-abs(x))/2)*(abs(x)≥1)*(abs(x)≤3)+3√(1-x^2/49)*(abs(x)≥3)

y2(x)=((7-3√(33))*x^2/112+abs(x/2)-3+√(1-(abs(abs(x)-2)-1)^2))*(abs(x)≤4)+(-3√(1-x^2/49))*(abs(x)≥4)

It looks like I'm not allowed to post images. You can see the result at the following URL: http://iphone-calc.com/batman.png

kafechew
Posts: 1
Joined: Wed Jan 25, 2012 5:59 am UTC

Re: The Batman equation

Postby kafechew » Wed Jan 25, 2012 6:08 am UTC

This function is very delightful for drawing such a graph, but write it down in latex is very tedious.

((x7)2⋅||x|−3|(|x|−3)+(y3)2⋅|y+3⋅337|y+3⋅337−1)⋅(|x2|−((3⋅33−7)112)⋅x2−3+1−(||x|−2|−1)2−y)⋅(9⋅|(|x|−1)⋅(|x|−0.75)|((1−|x|)∗(|x|−0.75))−8⋅|x|−y)⋅(3⋅|x|+0.75⋅|(|x|−0.75)⋅(|x|−0.5)|((0.75−|x|)⋅(|x|−0.5))−y)⋅(2.25⋅|(x−0.5)⋅(x+0.5)|((0.5−x)⋅(0.5+x))−y)⋅(6⋅107+(1.5−0.5⋅|x|)⋅||x|−1||x|−1−(6⋅1014)⋅4−(|x|−1)2−y)=0

As a product of factors is 0 if and only if any one of them is 0, multiplying these six factors puts the curves together. This graph is no more than the combination of six curves.

All these six curves are very simple, for instance, the first factor is the ellipse (x7)2+(y3)2, in the region where |x|>3 and y>−333/7 ; the region were restricted by ||x|−3|(|x|−3) and |y+3⋅337|y+3⋅337−1

Here’s what I got from the equation using ggplot2 (R Language)…

Image: http://www.cloudst.at:8080/tmp/file3ff25618.png

Source Code:

Code: Select all

#an image with an equation which apparently draws the Batman logo.

require(ggplot2)
 
f1 <- function(x) {
    y1 <- 3*sqrt(1-(x/7)^2)
    y2 <- -3*sqrt(1-(x/7)^2)
    y <- c(y1,y2)
    d <- data.frame(x=x,y=y)
    d <- d<d$y > -3*sqrt(33)/7,>
    return(d)
}
 
x1 <- c(seq(3, 7, 0.001), seq(-7, -3, 0.001))
d1 <- f1(x1)
p1 <- ggplot(d1,aes(x,y)) + geom_point(color="red")
 
x2 <- seq(-4,4, 0.001)
y2 <- abs(x2/2)-(3*sqrt(33)-7)*x2^2/112-3 + sqrt(1-(abs(abs(x2)-2)-1)^2)
 
p2 <- p1 + geom_point(aes(x=x2,y=y2), color="yellow")
 
 
 
x3 <- c(seq(0.75,1,0.001), seq(-1,-0.75,0.001))
y3 <- 9-8*abs(x3)
p3 <- p2+geom_point(aes(x=x3,y=y3), color="green")
 
x4 <- c(seq(0.5,0.75,0.001), seq(-0.75,-0.5,0.001))
y4 <- 3*abs(x4)+0.75
p4 <- p3+geom_point(aes(x=x4,y=y4), color="steelblue")
 
x5 <- seq(-0.5,0.5,0.001)
y5 <- rep(2.25,length(x5))
p5 <- p4+geom_point(aes(x=x5,y=y5))
 
x6 <- c(seq(-3,-1,0.001), seq(1,3,0.001))
y6 <- 6 * sqrt(10)/7 +
    (1.5 - 0.5 * abs(x6)) * sqrt(abs(abs(x6)-1)/(abs(x6)-1)) -
    6 * sqrt(10) * sqrt(4-(abs(x6)-1)^2)/14
p6 <- p5+geom_point(aes(x=x6,y=y6), colour="blue")
 
p <- p6+theme_bw()
print(p)


Source: The Batman Equation: http://cloudst.at/index.php?do=/kafechew/blog/the-batman-equation/

jacobs
Posts: 1
Joined: Mon Feb 06, 2012 2:03 pm UTC

Re: The Batman equation

Postby jacobs » Mon Feb 06, 2012 4:00 pm UTC

Nice one! I will make sure to use one of these on the upcoming test for my students. Thanks a lot :D

Jacob

User avatar
Proginoskes
Posts: 313
Joined: Mon Nov 14, 2011 7:07 am UTC
Location: Sitting Down

Re: The Batman equation

Postby Proginoskes » Sat Apr 07, 2012 9:36 am UTC

jacobs wrote:Nice one! I will make sure to use one of these on the upcoming test for my students. Thanks a lot :D

Jacob


This finally made it to school.failblog.org, where someone posted:

For extra credit, have them convert it to polar coordinates.


Spoiler:
(This is a really nasty thing to do, despite the overall elliptical shape, because around theta = 40 degrees, there are two curves.)

User avatar
eSOANEM
:D
Posts: 3649
Joined: Sun Apr 12, 2009 9:39 pm UTC
Location: Grantabrycge

Re: The Batman equation

Postby eSOANEM » Sat Apr 07, 2012 4:10 pm UTC

Proginoskes wrote:
Spoiler:
(This is a really nasty thing to do, despite the overall elliptical shape, because around theta = 40 degrees, there are two curves.)


That's an odd way of spelling three.
my pronouns are they

Magnanimous wrote:(fuck the macrons)

User avatar
Proginoskes
Posts: 313
Joined: Mon Nov 14, 2011 7:07 am UTC
Location: Sitting Down

Re: The Batman equation

Postby Proginoskes » Sun Apr 08, 2012 8:10 am UTC

eSOANEM wrote:
Proginoskes wrote:
Spoiler:
(This is a really nasty thing to do, despite the overall elliptical shape, because around theta = 40 degrees, there are two curves.)


That's an odd way of spelling three.


Yes, but there are two for some values of theta as well.

Nyah!

User avatar
eSOANEM
:D
Posts: 3649
Joined: Sun Apr 12, 2009 9:39 pm UTC
Location: Grantabrycge

Re: The Batman equation

Postby eSOANEM » Sun Apr 08, 2012 8:29 am UTC

There are some places around 40 degrees where there are two distinct values, but I think that, given the behaviour of the graph nearby it would be better to view it as a single repeated value (like the root of x^2=0)

:P
my pronouns are they

Magnanimous wrote:(fuck the macrons)


Return to “Mathematics”

Who is online

Users browsing this forum: No registered users and 4 guests