
x*sin(y) - callum85
https://www.google.com/?q=x*sin(y)
======
avinassh
Search in Google following for Batman:

    
    
      2 sqrt(-abs(abs(x)-1)*abs(3-abs(x))/((abs(x)-1)*(3-abs(x))))(1+abs(abs(x)-3)/(abs(x)-3))sqrt(1-(x/7)^2)+(5+0.97(abs(x-.5)+abs(x+.5))-3(abs(x-.75)+abs(x+.75)))(1+abs(1-abs(x))/(1-abs(x))),-3sqrt(1-(x/7)^2)sqrt(abs(abs(x)-4)/(abs(x)-4)),abs(x/2)-0.0913722(x^2)-3+sqrt(1-(abs(abs(x)-2)-1)^2),(2.71052+(1.5-.5abs(x))-1.35526sqrt(4-(abs(x)-1)^2))sqrt(abs(abs(x)-1)/(abs(x)-1))+0.9
    

link to the same: [http://bit.ly/1G0rLgk](http://bit.ly/1G0rLgk)

~~~
BMarkmann
Wolfram Alpha does a pretty amazing job of taking an existing graphic and
turning back into a graph-able equation... eg:

[http://www.wolframalpha.com/input/?i=graph+looks+like+batman](http://www.wolframalpha.com/input/?i=graph+looks+like+batman)

[http://www.wolframalpha.com/input/?i=graph+looks+like+bart+s...](http://www.wolframalpha.com/input/?i=graph+looks+like+bart+simpson)

~~~
mw67
How can one come up with the exact equation to match such an exact drawing?
i'm impressed. is it just tons of trial and errors?

~~~
Too
Any continuous function can be described as a sum of sinus-functions with
different amplitude and frequencies, given that the maximum frequency is
limited. Finding these amplitudes can be done quite easily using something
called discrete fourier transform. A lot of audio and imaging technology is
based on this theory, jpeg compression for example, and almost any audio and
signal-processing.

~~~
xyzzyz
The downside is that very few mathematically interesting functions have
limited frequency. While this is not a problem for signal processing, as our
senses usually cannot sense the difference, in math it's very easy to see the
difference even if you cut off at really high frequencies:
[http://upload.wikimedia.org/wikipedia/commons/d/d4/Synthesis...](http://upload.wikimedia.org/wikipedia/commons/d/d4/Synthesis_sawtooth.gif)

In other words, if one tried to do the Batman curve using Fourier transform,
the formula to get sub-pixel consistency would be extremely long.

~~~
darkmighty
This is easily solved in practice by segmentation. Images are segmented in
blocks, and each small block can be well approximated by a low frequency
content, but block boundaries can contain discontinuities. If you look at the
wolfram alpha source, that's exactly how those images are constructed -- they
are combinations low frequency segments, most likely obtained through fourier
analysis.

Another trick used in frequency domain compression is they don't impose a hard
cut-off of frequencies (truncation); instead they specify weights according to
image quality, and lower are assigned to high frequencies, and those weights
control the precision of each frequency.

All this works because real signals happen to be concentrated in certain
frequencies, with a few discontinuities in between.

------
martokus
This was posted here around Valentines day last year

[https://www.google.co.uk/search?hl=en&q=5+%2B+%28-sqrt%281-x...](https://www.google.co.uk/search?hl=en&q=5+%2B+%28-sqrt%281-x^2-%28y-abs%28x%29%29^2%29%29*cos%2830*%28%281-x^2-%28y-abs%28x%29%29^2%29%29%29,+x+is+from+-1+to+1,+y+is+from+-1+to+1.5,+z+is+from+1+to+6&gws_rd=cr&ei=ze0wVZ3uGqGy7QaLpID4BA)

~~~
sk2code
Only works in Chrome.

~~~
hackmiester
Works here.

user-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:37.0) Gecko/20100101
Firefox/37.0

------
nodata
The link doesn't work for me (Firefox). I have to hit Enter in the search box
for it to work.

~~~
MereInterest
Chrome here, with the same issue.

~~~
contradictioned
I guess, we're flooding the maths-render servers.

~~~
ramblerman
lol, I think you're overestimating HN traffic just a bit here.

Adding a hash solves the double enter
[https://www.google.com/?#q=x*sin(y)](https://www.google.com/?#q=x*sin\(y\))

~~~
eridal
lol, I think he's underestimating the Google server power a bit there

:)

------
chrisBob
Anyone else feeling left out?

I poked the link on my phone and just got search results (safari). Same thing
in mobile chrome even after "request the desktop site". It wasn't until I got
to work and saw all of the comments that I figured out what was going on.

~~~
0942v8653
iOS (iPhone at least) Safari: go to
[https://www.google.com/search?q=x*sin(y)](https://www.google.com/search?q=x*sin\(y\)),
tap the address bar, scroll up, and tap Request Desktop Site.

------
HarrietJones
Pringle:
[https://www.google.co.uk/?q=(x*x)%2B(y-x)-(y*y)](https://www.google.co.uk/?q=\(x*x\)%2B\(y-x\)-\(y*y\))

~~~
dheera
No. This is a Pringle:
[https://www.google.co.uk/?q=(x*x)%2B(y-x)-(y*y)#q=((x*x)%2B(...](https://www.google.co.uk/?q=\(x*x\)%2B\(y-x\)-\(y*y\)#q=\(\(x*x\)%2B\(y-x\)-\(y*y\)\)%2B0%2F\(\(abs\(x%5E2%2By%5E2-40\)%2F\(x%5E2%2By%5E2-40\)\)-1\)&btnK=Google+%E6%90%9C%E5%B0%8B)

~~~
eridal
now we just need to 3d print those

------
timdorr
They also have some neat ones for Pythagorean's Theorem, the area of the
circle, and other questions:

[https://www.google.com/search?q=a%5E2%2Bb%5E2%3Dc%5E2+calc+a...](https://www.google.com/search?q=a%5E2%2Bb%5E2%3Dc%5E2+calc+a%3D4+b%3D7+c%3D%3F)

[https://www.google.com/search?q=area+of+a+circle](https://www.google.com/search?q=area+of+a+circle)

[https://www.google.com/search?q=find+the+diameter+of+a+spher...](https://www.google.com/search?q=find+the+diameter+of+a+sphere+whose+volume+is+524+gallons)

------
ddebernardy
If any Googler is around, it would be nice if one could do 4d representations
as well. (As in 3d that evolves in time, with a slider to go back and forth in
time.)

~~~
nashashmi
I believe Google will answer "baby steps."

Until then, go and google up that elsewhere.

------
FarhadG
A great WebGL library giving you this ability:
[https://news.ycombinator.com/item?id=9395191](https://news.ycombinator.com/item?id=9395191)

------
smaili
For those having issues, adding the hash should do the trick:
[https://www.google.com/?#q=x*sin(y)](https://www.google.com/?#q=x*sin\(y\))

------
dazmax
The search doesn't actually find pages with x * sin(y), though. Even on
verbatim mode the best it does is x = sin(y).

------
tormeh
I like the axes. Those are usually really badly visualized in most 3D plotting
software. Just indicate the origin a bit better and we're gold.

------
amelius
While this is nice, I don't like the idea of one company being the one-stop-
shop for all of our knowledge.

~~~
scrollaway
Our civilization is doomed. Society will fall apart because Google decided to
do 3d plots in their search engine.

~~~
raverbashing
Next thing you know, someone will be asking how to do it with JQuery.

Not JS, JQuery

~~~
zamalek
They can just Google the answer.

~~~
pietro
There'll be a plugin eventually.

------
chrisBob
Google has done math in the search for a while. It is also my go to place for
unit conversions.

~~~
lindbergh
Speaking of which, miles per hour get converted in m/s, which is not very
useful

~~~
franole
They are both base units of the SI
[http://en.wikipedia.org/wiki/SI_base_unit](http://en.wikipedia.org/wiki/SI_base_unit)

------
roblynch
"3D charts require a web browser and system that support WebGL" :(

------
pekk
Reminds me of Wolfram Alpha.

------
callum85
Can an admin update to this link please (it won't let me change it now):

[https://www.google.com/search?q=x*sin(y)](https://www.google.com/search?q=x*sin\(y\))

------
jarin
This is kind of unrelated, but when you grab the graph with your mouse and
make circles, the whole graph rotates along the line of sight axis. I've
noticed this with many 3d things. Why is that?

~~~
HanyouHottie
It's easier to understand if you take the motion of a circle to the extreme:
Rotate the graph 90 degrees to the right, then any amount up or down, then 90
degrees back to the left. By rotating 90 degrees first, you changed the axis
of the second rotation to be the plane normal (perpendicular) to the view
axis, i.e. the view axis itself. If you instead drag in smaller circles, then
each rotation only contains a small component of rotating that plane so the
rotation is slower.

------
sk2code
Thanks for sharing this. Every single day I convince myself that I am not
wasting my time by going on HN and posts like these are the reason I find
something useful and meaningful. This is something I can share with my 9 year
old son who is showing keen interest in Maths. Though the stuff presented here
is still pretty advanced for him to grasp, but sharing this will help him
immensely to keep pursuing his mathematical interest.

Batman Graph rocks !!

------
anewhnaccount
[https://support.google.com/websearch/answer/3284611?hl=en](https://support.google.com/websearch/answer/3284611?hl=en)

------
ColinWright
Very nice.

Why have you posted it?

~~~
sgt
Probably to show us that it's possible. I didn't know Google Search accepted
equations.

~~~
keerthiko
Note that the search is not even an "equation" (that would be z = x*sin(y) ).

Google always graphed equations -- I often use a google tab like a nice low-
memory-footprint version of MATLAB basically -- but I didn't know it assumed
the third axis when you created a non-linear expression and made it an
equation.

------
thwd
Mildly interesting, if you search for:

x * tanh(y)

you get the graph for:

x * ​(exp(​y)-​exp(​‑y))/​(exp(​y)+​exp(​‑y)).

[Edit: asterisks on HN are hard]

~~~
noel_
JavaScript doesn't have tanh built in, so you have to use an approximate:

[http://stackoverflow.com/questions/6118028/fast-
hyperbolic-t...](http://stackoverflow.com/questions/6118028/fast-hyperbolic-
tangent-approximation-in-javascript)

------
tempodox
How do you get a page where you can edit the expression graphed?

------
eccstartup
x*y is more beautiful. It is a perfect hyperbolic surface.

------
kardos
Axis labels? Anybody?

~~~
xendo
There are labels in the legend associated with axis colors.

~~~
kardos
So the equation should read red*sin(green)?

The colours are already used for amplitude of the function, using them twice
is confusing, akin to using the same variable for two different things.

------
LaFolle
Giving competition to Wolfram Alpha. Very interesting.

------
wnevets
according to the EU this is an antitrust violation?

------
morpheous
Oh wow!, just wow!!. Maths FTW!

------
guard-of-terra
It would be a B grade third course project if not on the Google SERP.

