ludus-scripts/peanomod.ld

84 lines
1005 B
Plaintext
Raw Normal View History

2024-11-15 22:35:52 +00:00
let d = 50
pw!(5)
rt!(0.25)
fn y!
2024-11-15 22:54:31 +00:00
fn y_seq!
fn x_seq!
2024-11-15 22:35:52 +00:00
& comment for strange Peano variation
& uncomment for standard Peano curve
& fn f! (n) -> fd!(d)
& comment for standard Peano curve
& uncomment for strange Peano variation
fn f! {
(0) -> fd!(d)
(n) -> {
f!(dec(n))
rt!(0.25)
f!(dec(n))
lt!(0.25)
f!(dec(n))
lt!(0.25)
f!(dec(n))
f!(dec(n))
lt!(0.25)
f!(dec(n))
lt!(0.25)
f!(dec(n))
lt!(0.25)
f!(dec(n))
f!(dec(n))
}
}
fn x! {
(0) -> nil
(n) -> {
2024-11-15 22:54:31 +00:00
x_seq!(n)
2024-11-15 22:35:52 +00:00
rt!(0.25)
f!(dec(n))
rt!(0.25)
2024-11-15 22:54:31 +00:00
y_seq!(n)
2024-11-15 22:35:52 +00:00
lt!(0.25)
f!(dec(n))
lt!(0.25)
2024-11-15 22:54:31 +00:00
x_seq!(n)
2024-11-15 22:35:52 +00:00
}
}
fn y! {
(0) -> nil
(n) -> {
2024-11-15 22:54:31 +00:00
y_seq!(n)
2024-11-15 22:35:52 +00:00
lt!(0.25)
f!(dec(n))
lt!(0.25)
2024-11-15 22:54:31 +00:00
x_seq!(n)
2024-11-15 22:35:52 +00:00
rt!(0.25)
f!(dec(n))
rt!(0.25)
2024-11-15 22:54:31 +00:00
y_seq!(n)
2024-11-15 22:35:52 +00:00
}
}
2024-11-15 22:54:31 +00:00
fn x_seq! (n) -> {
x!(dec(n))
f!(dec(n))
y!(dec(n))
f!(dec(n))
x!(dec(n))
}
fn y_seq! (n) -> {
y!(dec(n))
f!(dec(n))
x!(dec(n))
f!(dec(n))
y!(dec(n))
}
2024-11-15 22:35:52 +00:00
x!(3)