Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Happy Valentine's Day (google.com)
191 points by valuegram on Feb 14, 2013 | hide | past | favorite | 24 comments




> 3D charts require a web browser and system that support WebGL.

I guess I'm not getting a Valentine this year.


Here's what it looks like: http://i.imgur.com/xnvaTiK.png


What browser/OS/gpu are you using?


Latest Safari on OS X 10.8.2 in a Macbook Pro w/ Retina


You can enable WebGL in Safari. Go to Preferences -> Advanced and click "Show Develop menu in menubar". "Enable WebGL" is the last item in the Develop menu.


I believe it's not enabled by default because there are still some security vulnerabilities present, is that right?


Yes. Here's a DoS for Firefox that forced me to reboot: https://cvs.khronos.org/svn/repos/registry/trunk/public/webg... (it asks permission first). I did not test it in Safari, because I don't want to restart again :(


Kudos.


Wow. So it works for me and I'm using Opera. This reversal has to be some kind of first for me...


Opera is (was?) pretty good about supporting all the latest cool toys. Demos/PoC's normally worked well, productionalized products not so much.


There has been a very obvious Chrome|Safari|Webkit only trend recently, usually for either demos/pocs, but also often for MVP/betas (I believe Mega may have been one of those).


heh, very neat. You can also play around with the parameters and equation of the graph.

Check out my "tan" heart : 5 + (-sqrt(1-x^2-(y-abs(x))^2))tan(45((1-x^2-(y-abs(x))^2))), x is from -1 to 1, y is from -1 to 1.5, z is from 1 to 6


Ferris wheels make me so happy. In related news, I think I shall watch Ferris Bueller's Day Off with My Beloved Husband today.


Such things never cease to amaze me. How do you start with a blank paper create an expression which produces that?


It's actually pretty easy...

The actual function being plotted is the two ellipsoids

1 = x^2 + (x - y)^2 + z^2 for x >= 0

1 = x^2 + (x + y)^2 + z^2 for x <= 0

Each of which which is just an ordinary ellipse but rotated a little along the z-axis. If you expand the square and by standard linear algebra techniques (see: diagonalising a quadratic form), you can put both of these in standard form:

1 = x^2/a^2 + y^2/b^2 + z^2

which confirms it's an ellipsoid.

Whoever made the original heart just took these two ellipses and then multiplied by the cosine of the height in order to give it some oscillations and make it look more showy, but the basic idea is just that: two ellipsoids, at opposite slant angles, joined along the middle.


Google scares me sometimes.


Me too. But in a good way ... :]


Looks good! Happy Valentine's Day to you too!


Works in Chrome Canary ;)


Nice. Nice again, I say.


well done sir. well done.


The OP din't claim to have created this (although arguably it's implied by it's posting without comment). Rather, that's just one of quite a number of such functions posted here before. I don't know their origin.

So well done for remembering it, and reposting it on an appropriate day; or more likely someone else remembered, and this is just a cross-post of a cross-post of a blog of a re-post. But well done anyway.




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

Search: