Hacker News new | past | comments | ask | show | jobs | submit login

This has cool graphics but it doesn't seem to simulate fluid dynamics (which requires solving a differential equation).



It's possible to solve differential equations in 140 characters of javascript, here are some (e.g. Lorenz Attractor dynamical system "chaos butterfly") that generates 3D cool graphics and really solves ordinary differential equations (ODEs): https://www.dwitter.net/h/lorenz/top

Here is one short code example using Euler's method where Y(n+1) = Yn + step_size * f(Xn,Yn,Zn)

  c.width|=X=Y=Z=6;for(i=3e3;i--;)
  X+=.1*(Y-X),
  Y+=.01*(X*(29-Z)-Y),
  Z+=.01*(X*Y-1.6*Z),
  x.fillRect(960+X*30,Z*22,6,9)


Euler's method is non-conservative, you ought to be using a hire order method e.g. leap frog or Backward Time, Centered Space Method.


or for ODEs a higher order method.


Really? That's really a shame you know. Solving the anxiety of suffering people is already not that bad.


You need to renew your let's encrypt certificate ;)


Maybe you commented on the wrong planet?


Maybe you commented in the wrong thread?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: