luismedel
Joined 7 years ago
Joined 7 years ago
The earliest jaw-dropping water effect I saw (and somewhat understood at 14) was the awesome credits scene from the Iguana's Earthquake demo[0].
The code[1] contains the following explanation (ancient DOS chars fixed with chatGPT)
; // UpdateTable : performs one integration step on U[CT]
; Differential equation is: u = a²( u + u )
; tt xx yy
;
; Where a² = tension * gravity / surface_density.
;
; Approximating second derivatives by central differences:
;
; [ u(t+1)-2u(t)+u(t-1) ] / Δt² = a² (u(x+1)+u(x-1)+u(y+1)+u(y-1)-4u) / h²
;
; (where Δt = time step, h=Δx=Δy = mesh resolution)
;
; From where u(t+1) may be calculated as:
; ┌ 1 ┐
; u(t+1) = a²Δt²/h² │ 1 0 1 │u - u(t-1) + (2-4a²Δt²/h²)u
; └ 1 ┘
;
; When a²Δt²/h² = ½ last term vanishes, giving:
; ┌ 1 ┐
; u(t+1) = ½ │ 1 0 1 │u - u(t-1)
; └ 1 ┘
;
; This needs only 4 ADD/SUB and one SAR operation per mesh point!
[0] https://www.pouet.net/prod.php?which=364Maybe the OP's "not that important" was an unfortunate way to put it.
I think the answers you ask for are in Ordinatio Sacerdotalis[0]
[0] https://www.vatican.va/content/john-paul-ii/en/apost_letters...
What I mean is that having so much info at the toe of our tips, comments like "you should put a link about what this thing is" are needless.
FYI, you can download the source code [1].
[0] https://news.ycombinator.com/item?id=31311461 [1] http://ftp.lanet.lv/ftp/mirror/x2ftp/msdos/programming/iguan...
[ my public key: https://keybase.io/lmedel; my proof: https://keybase.io/lmedel/sigs/HFr8jtOYsBp9NKivqd9SXHvFeEjntcdyd4h9-MYksN4 ]