feat: start of lift, debugging, cleanup
This commit is contained in:
parent
883e5fff01
commit
589f89c768
31 changed files with 1297 additions and 51 deletions
19
exm/zelus/ballz/ballz.zls
Normal file
19
exm/zelus/ballz/ballz.zls
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
let g = 9.81
|
||||
let y0 = 50.0
|
||||
let y'0 = 0.0
|
||||
|
||||
let hybrid ball (y0, y'0) = y where
|
||||
rec der y = y' init y0
|
||||
and der y' = -. g init y'0 reset z -> -0.8 *. (last y')
|
||||
and z = up(-. y)
|
||||
|
||||
let hybrid main () =
|
||||
let der t = 1.0 init 0.0 in
|
||||
let y = ball (y0, y'0) in
|
||||
let z = period(0.01) in
|
||||
present z -> (
|
||||
print_float t;
|
||||
print_string "\t";
|
||||
print_float y;
|
||||
print_newline ()
|
||||
); ()
|
||||
Loading…
Add table
Add a link
Reference in a new issue