
Show HN: Ball falls on the teapot in WebGL - alex2401
http://whitestormjs.xyz/playground/?example=model&dir=demo
======
lagadu
Curiously enough, the first time I ran it it was "teapot falling on ball"
instead. It slowly slid off the ball after it landed. Still worked fine :)

------
barnacs
For some reason I was expecting a bowling ball to fall and crush the teapot.
More like: [http://bit.ly/2bhClHV](http://bit.ly/2bhClHV)

~~~
56k
I thought it was going to fall inside the teapot.

~~~
odabaxok
Set the y coordinate of the sphere to 96.. ;)

~~~
doodpants
Better yet, set the _X_ coordinate of the sphere to 94

~~~
odabaxok
Sorry, you are right, X should be set to 94-ish.

------
zachrose
Sometimes the ball bounces off the spout and rolls down towards the camera.
Other times it rolls aways from the camera. Can anyone speculate on why this
is apparently non-deterministic?

~~~
edvinbesic
Probably due to rounding errors (multiplication precision)

[1]: [http://floating-point-gui.de/](http://floating-point-gui.de/)

~~~
sevenless
This is a ridiculous question, but could quantum mechanical uncertainty be
interpreted as a rounding error?

Say the universe only stores a certain number of bits of information for each
particle...

~~~
devopsproject
Aren't the number of particles the deciding factor? If you had 100 particles,
you couldn't give me exactly 1/3 of them.

------
kempbellt
Set gravity of X to 1. Win!

Seriously though. Very cool demo. Great work.

~~~
natosaichek
If you set X gravity to 80, it's even cooler. :-D

~~~
SparkyMcUnicorn
I like -12 best.

------
patmcguire
I see cool demos, and things that look passable for game graphics
[http://alexis.lart.no/emh/snapshots/rts-
free.git/](http://alexis.lart.no/emh/snapshots/rts-free.git/)

Is there some big use of WebGL in production that I'm missing? It always seems
to have a bunch of promise that no one does much new with

~~~
skoczymroczny
The popularity should spike soon, because Unity3D Webplayer has been
deprecated a while ago and WebGL is the official Unity3D distribution method
for the web. The performance isn't there yet, but authors promise to get there
at some point.

~~~
iLoch
Unity on WebASM looks really solid though. I'm expecting that's what they're
going to be focusing on in the coming years.

------
dschuetz
My first impression: doesn't work. I'm on Safari 9 with enabled WebGL.
Wonderful.

~~~
nsxwolf
I never try to use Safari for WebGL. I just assume it isn't supported or so
broken it might as well not be.

------
partycoder
Interesting. Seems to be non-deterministic. Each time the ball falls to a
different side.

~~~
devopsproject
floating point rounding errors

~~~
frgewut
Floating point rounding errors are deterministic.

~~~
devopsproject
in math, yes

in computers, yes and no.

read: [https://randomascii.wordpress.com/2013/07/16/floating-
point-...](https://randomascii.wordpress.com/2013/07/16/floating-point-
determinism/)

