chore: update
This commit is contained in:
parent
4776edc9db
commit
416d97c513
25 changed files with 1653 additions and 283 deletions
18
exm/ballc/ball.zls
Normal file
18
exm/ballc/ball.zls
Normal 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 ()
|
||||
); ()
|
||||
Loading…
Add table
Add a link
Reference in a new issue