updating ld scripts

This commit is contained in:
Matt Nish-Lapidus 2024-06-18 22:15:09 -04:00
parent 5bef96236f
commit 88bc73cdbe

28
mattspingon.ld Normal file
View File

@ -0,0 +1,28 @@
let numgons = 10
fn ngon! (sides, size) -> repeat sides { fd!(size); lt!(inv(sides)) }
let cpal = [(100,255,100,100),(80,100,200,170),(80,100,200,70),(250,80,100,170)]
fn spingon! (sides, size, count, pw, alpha, turn, move) -> {
if eq? (count, 0) then {
"enough!"
} else {
rt!(inv(sides))
pencolor!((100,180,100,alpha))
pw!(pw)
ngon! (sides, size)
rt!(turn)
fd!(move)
spingon! (
add(sides, 3),
inc(size),
dec(count),
add(pw, 0.0005),
add(alpha, div(255, numgons)),
turn,
move)
}
}
spingon!(3, 1, numgons, 1, 1, 0.3, 70)