Hacker News new | past | comments | ask | show | jobs | submit login
Google can be used as a graphic calculator (google.com)
400 points by bpierre on Dec 5, 2011 | hide | past | web | favorite | 75 comments

Sadly, google's cannot be used to calculate 3D plots, though wolfram's can:


On the other hand, google doesn't appear to take the extreme copyright stance that Wolfram Alpha does.

Read their TOS: http://www.wolframalpha.com/termsofuse.html, specifically their Attribution and Licensing section.

If you incorporate results from Wolfram Alpha in any work without attribution meeting their standards you will have breached your TOS and they suggest you also will have committed copyright violations and academic plagiarism. If your work is not personal (unshared?) or academic, then they demand you negotiate a license.

Google seems happy to let you know sin(x) is wiggly and send you on your way.

Well they have very different business models, neither company's licensing here seems unreasonable.

Google also can't be used to make noises.


(If you don't see the "play sound" link, refresh the page.)

Cool! The first thing I thought of when I looked at the Google one was that it'd be sweet if I could play that as a wave form. Anyway to make it play longer?

you know you're on hacker news when the most upvoted comment has found something negative to nitpick out of a cool story.

Adding positive comments doesn't usually add as much information. The story itself was a positive comment. Critical discussion is best done not by saying "hey, cool story" - that's what upvoting is for. There are some cases where a non-negative comment is great, like pointing other readers to an interesting piece of related information, but if all it does is confirm what the original submission said, it's less informative.

You know you're on hacker news when the most upvoted comment is a link to a bunch of stuff about paraboloids.

You know you're on hacker news when a repetitious meme gets voted down to oblivion. Oh, wait...

Edit: Phew, -2 and dropping. I was worried there for a second.

In summary, this is Hacker News.

You know you're on Hacker News when meme threads die before they got obnoxiously long... as they should.

First iteration.

Great. So can DuckDuckGo:


And on top of that, it also gives you the result right there on the page: http://cl.ly/0a3L0K3T2a0E350d300n

Clickable and brings you to wolfram alpha: http://www.wolframalpha.com/input/?i=sin(x)%2B1%2F2%20sin(2x...

zero-click search is an awesome feature of DuckDuckGo

"Great. So can DuckDuckGo"

No, I don't see a fast interactive graph when I clicked on that link.

It seems like it does sometimes, but not at other items. I clicked around on the page a bit, then clicked on the search button, and suddenly it showed me the zero click info, which was hidden before.

But was this built by a couple of guys sneaking into the building after their contract expired? If not, it's merely serviceable.

WolframAlpha has slightly more sophisticated graphing calculator functionality: http://www.wolframalpha.com/input/?i=sin%28x%29%2B1%2F2+sin%...

I haven't used WolframAlpha that much for graphs but I've often been bothered by the lack of zoom, scale and pan which google seems to have solved quite nicely.

Hopefully WA will do something similar in the near future.

You can set axis ranges, which address some of the zoom issues. I've found this to be a bit tricky / iffy at best, particularly when using financial datasets.

Agreed regards zoom and such.

You can zoom with CTRL +, (this is a browser feature).

I really like that you can view different ranges without modifying the original query in the Google version.

They seem to have come with some nice algorithm to connect the graph dots. The problem: When you draw the graph using a naive formula putPixel(x, y(x)) you get isolated dots. Therefore you have to draw tiny lines between the points to get a nice smooth curve instead of isolated dots. But then there is the question of which points to connect – for example in tan(x) you can’t connect the last point on the ‘upper right hand’ with the first one coming from the bottom. This is surprisingly hard to solve simply (at least it was for me). Most packages simply resign – try zooming out a tan(x) to see the erroneous vertical connecting lines. Google does it right even in high zoom ratios. How do they do it?

I got this message after zooming out tan(x) a ways: http://www.google.com/support/websearch/bin/answer.py?answer...

"Try to pan or zoom the function to a different region. The plotting algorithm detected one of the following: - Too many asymptotes - Too many transitions of the function from defined to undefined regions - Too many points on the graph that might not represent the function value currently due to high volatility"

It looks like can actually detect when their graphing algo starts to break down.

Google fails after a few zoom outs for me, screenshot: http://i.imgur.com/Kss1x.png

One way is to set a threshold for whether or not to join the dots, if it's above the threshold perform a search between those points to see if they are between the dots or if they diverge, this search can be complicated or simple, google seems to use a fair bit of cpu power when zooming out on tan(x) so I'm guessing they're using a search here rather than some alternative 'clever' induction from the nature of the curve itself.

If you're using a CAS in your graphing system you can probably decompose the function, identify potentially problematic components (e.g. tan(x^2/5+2x)), and identify asymptotes or undefined areas directly using a database of undefined-generating functions.

This would produce a list of X values for which the overall function is not defined. When your pixel plotting passes one or more of those X values, don't draw a line. If you pass several in a single pixel, give up.

I've just proven mathematically that the Flying Spaghetti Monster exists:


"This function may not be plotted correctly" LOL it's okay Google, you're excused on this one.

The easy zooming and panning makes this a better graphing experience than any other calculator/software I have used so far. True, you don't have the capabilities of Mathematica available, but it seems to work great for graphing a single variable function.

This is something i don't understand why other mathematical tools do so badly. Have you tried navigating the graph in a matlab plot? You have to select one tool for zoom in and another tool for zoom out and then click the graph to get a huge zoom-step that isn't even centered around where you clicked. Then another tool for moving to the correct position and another to see the values. SERIOUSLY?!!?!!!! This is a super expensive tool designed for plotting and comparing graphs and the diagram-control stinks so bad. Implementing this feature properly is one day of work. Synchronizing dimensions of axis between different diagrams is also something very important that matlab has huge difficulties with. Mathematica isn't much better in this regard even though they at least plot with anti aliasing T_T.

Related is also navigation in maps-software. Not many programs do this right even though it's so simple.

Grapher does this quite well. It comes with Mac OS X and plots various things, 2D and 3D: http://www.google.com/search?q=grapher+mac&hl=en&tbm...

It also formats the equations nicely and lets you copy them as PDF. Makes a decent formula editor for Pages (with simple formulas).

Cool - always used fooplot for this, and probably will continue to: http://fooplot.com/

I expected to see a graph, but I'm just getting search results. How did you access it?

Do you have Javascript turned off, in particular, google.com? Disallowing google.com only gives me search results. (gstatic.com is irrelevant, I think)

Doesn't work in Opera 11.52 and Internet Explorer 6.0.

I saw a graph for the link on this post but tried a number of other functions and did not see graphs.

For me, it never worked in Chrome, but worked just fine in Firefox. Not sure what the deal is...

It works in Chrome, but it doesn't work in IE8. (I didn't try with other browsers.)

Try another browser

Took a moment for it to pop up for me with Firefox.

This is a neat feature. A good alternative is to use Wolfram Alpha [0]

[0]: http://www.wolframalpha.com/

I use Wolfram Alpha to check if I solved my math assignments correctly. Can you solve e.g. limes with Google? I tried a couple of syntaxes but nothing.


That's a cool feature, I've been using http://www.mathpimp.com/ for that, Google is a cool alternative, for now and then.

Is there an fn() syntax so I can plot recursion and bifurcation?

http://www.graphycalc.com/ A nice 3d calculator in JavaScript by Dean McNamee

Really cool! I'd like to have it automatically expand the range on zoom, though, like Google does. And some numbers on the axes would be nice.

Google loves its users and has an equation to prove it http://www.trendslate.com/2011/12/05/google-graphing-calcula...

Here is a slightly modified version, http://goo.gl/kYIBX this proves that love is complicated (jff).

Anyone know how to denote 'log base 2'? This: "log (x)" assumes base 10.

For any base use the formula: (log base b) a = log(a)/log(b). For eg. google for log(x)/log(2), lg(x), log(x)/log(3)

I believe it's just "lg(x)", though you could also use the more generic case of "log(x)/log(base)"

Try lg(x) ?

that's it, thanks

lg(x) works for me.


ln? Isn't log base 2 the natural log?

Yup, that works.

Oh yes, ok. Ignore my post. I forgot for a second that there was more than 2 numbers in the Universe.

Even better is that it's not using Flash. JS and Canvas it seems.


No FM synthesizer. What were they thinking?

But can it graph the Batman equation?!

The Batman Curve is not the solutions of a single equation.


While I have no desire to do it, It could be transformed into polar coordinates and then combined into a single Fourier series to piece it together.

I tried, sadly it limited me to 32 "words" :(

You can also draw multiple functions by separating with a comma.


nice! wish I knew that in college!

never mind, it's a new feature

In high school I programmed Mortal Kombat on my TI-85, if it can't do that and can't be rooted via zshell, it doesn't count.

Offtopic observation: when Wolframalpha first appeared everyone on sites like Reddit and HN were falling over eachother to explain, in detail, what kind of an arrogant d*ck & loser Stephen Wolfram really is. Ignoring the Wolframalpha product features and going directly for the person behind it and his book and so on. Now seems like everyone loves his product and, subsequently, never mentions the guy behind it anymore. Anyone else noticed that?

I believe you are remembering wrong:



Not to say it is uncommon to call Stephen Wolfram egotistic, I swear there was a thread about Wolfram remembering Turing and people counting how many times Wolfram mentioned himself but it may have been killed as I can't find it.

The discussion you are looking for is this one:

http://news.ycombinator.com/item?id=3080470 (Wolfram on Steve Jobs)

Actually it was probably this: http://news.ycombinator.com/item?id=1454373 and I am remembering the amount of disdain wrong

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact