News for hackers. Stuff that matters.
Re:WebGL Equation Plot by danmaz74 on Thursday December 12, 2013 @04:42PM (#6897473)
This reminds me my biggest hobby project when in high school; I was so fascinated with 3D plots that I spent I don't know how much time to create a compiler from math formulas to to machine code so that I could plot this kind of things on my Amiga (without a math coprocessor). What amazes me the most is not that you can now animate that in real time in an interpreted language in a browser, but how easy is to learn all these things through the internet, instead of having to find a book in the bookstore and hope that it could have what you needed...
Re:WebGL Equation Plot by jreimers on Thursday December 12, 2013 @04:04PM (#6897257)
Cool! I made half a sphere with 0.5+sqrt(0.2-((x-0.5)^2+(y-0.5)^2)). If there was a way to do a mirroring on the xy plane (as in a +/- z value) it could be a full one.
Re:WebGL Equation Plot by Laremere on Thursday December 12, 2013 @05:20PM (#6897681)
I managed to modify yours to make a full sphere with a bad hack: http://vicapow.github.io/equation-plot-webgl/index.html#0.5%...

There's probably a better way to choose which points go above and below than random(), but it works.

Edit: Got it to work non-randomly. Adjacent dots alternate above and below: http://vicapow.github.io/equation-plot-webgl/index.html#0.5%...

Re:WebGL Equation Plot by bemmu on Friday December 13, 2013 @02:58AM (#6899537)
It seems the result is a complex number. Fiddled around with it a bit until I got lucky and got the plane to disappear.

http://vicapow.github.io/equation-plot-webgl/index.html#0.48...)

Re:WebGL Equation Plot by vicapow on Thursday December 12, 2013 @05:02PM (#6897600)
that's so cool! btw, you can link to your equation here

    http://vicapow.github.io/equation-plot-webgl/index.html#0.5%2Bsqrt(0.2-((x-0.5)%5E2%2B(y-0.5)%5E2))
edit: but HN seems to be messing up the urls :(
Re:WebGL Equation Plot by bemmu on Friday December 13, 2013 @02:20AM (#6899473)
Re:WebGL Equation Plot by siddboots on Thursday December 12, 2013 @09:23PM (#6898706)
If anyone is interested in a full-featured library for this sort of thing, see MathBox.js

https://github.com/unconed/MathBox.js

Re:WebGL Equation Plot by vicapow on Thursday December 12, 2013 @05:15PM (#6897661)
for comparison, here's a version in SVG: http://vicapow.github.io/dz/example/equation-plot.html
Re:WebGL Equation Plot by twotwotwo on Thursday December 12, 2013 @10:31PM (#6898924)
Weird question, but, did you possibly, by chance, develop/debug this in part in a café in Berkeley on Saturday with a copy of Think Bayes on the table? 'Cause I may have been sitting at the next table if so.
Re:WebGL Equation Plot by vicapow on Thursday December 12, 2013 @10:43PM (#6898954)
omg! yeah, i was. small world. do you go to Berkeley?
Re:WebGL Equation Plot by twotwotwo on Friday December 13, 2013 @02:00AM (#6899438)
Freakish--I don't go to Berkeley, hadn't been to that cafe before! Anyway, woot, very cool hack! (And cool enough for the glance at it to stick in one's memory for a few days, apparently.)
Re:WebGL Equation Plot by elwell on Thursday December 12, 2013 @04:25PM (#6897389)
Half-cone and triangle.

  http://vicapow.github.io/equation-plot-webgl/#sqrt(-(x*x)%2B(x*y))
Re:WebGL Equation Plot by Gravityloss on Thursday December 12, 2013 @06:53PM (#6898151)
This produces a nice flared tube or "neck"

http://vicapow.github.io/equation-plot-webgl/#0.1*cos%286.28...

0.1cos(6.28x)tan(3.14y)

Re:WebGL Equation Plot by vicapow on Thursday December 12, 2013 @05:00PM (#6897587)
very cool!
Re:WebGL Equation Plot by defen on Thursday December 12, 2013 @07:03PM (#6898203)
I'm getting "Uncaught TypeError: Cannot call method 'getExtension' of null" in Chrome 32.0.1700.55 beta - anyone know what that's about? My chrome://flags/ are all set to default.
Re:WebGL Equation Plot by munchor on Thursday December 12, 2013 @04:42PM (#6897469)
This is really nice, already sent in a pull request! I've been meaning to learn about WebGL for a while, I think I'll give it a try this weekend.