chore: update

This commit is contained in:
Henri Saudubray 2026-03-27 10:53:26 +01:00
parent 4776edc9db
commit 416d97c513
Signed by: hms
GPG key ID: 7065F57ED8856128
25 changed files with 1653 additions and 283 deletions

18
exm/ballc/ball.zls Normal file
View file

@ -0,0 +1,18 @@
let g = 9.81
let p0 = 5.0
let v0 = 0.0
let hybrid ball () = (p, z) where
rec der p = v init p0 reset z -> 0.0
and der v = -. g init v0 reset z -> -0.8 *. (last v)
and z = up (-. p)
let hybrid main () =
let der t = 1.0 init 0.0 in
let rec der p = 1.0 init -0.01 reset q -> -0.01
and q = up (last p) in
let (b, z) = ball () in
present q | z -> (
print_float t; print_string "\t";
print_float b; print_newline ()
); ()