No Preset
Diagonal Line
movp 0, 0 line -0, -0
Sine Wave
set $.x 0 set $.y 0 set $.scale 32 div $h, 2 ; canvas height / 2 set $.cy $div ; centered y position movp 0, $.cy ; start position func plot ; function for plotting each pixels div $.x $.scale ; making it bigger (scaling down) call sin $div set $.y $ret muls $.y $.scale ; scale it adds $.y $.cy ; centering it line $.x $.y ; draw! adds $.x, 1 ; x++ ; print $.x $.y (debug) cmp $.x $w cle plot ; if x <= width, call self func end call plot ; plot! dump ; dump registers...
Random Colourful Lines (Non-Continuous)
set $.x 0 set $.y 0 func proc_rand muls $.x, $w muls $.y, $h muls $.sx, $w muls $.sy, $h ret 0 func end set $.count 0 movp 0, 0 func plot ; random rgb call rand set $.r $ret muls $.r 255 call rand set $.g $ret muls $.g 255 call rand set $.b $ret muls $.b 255 rgba line $.r $.g $.b 1 ; no alpha call rand ; $ret = random number between 0 - 1 set $.x $ret call rand set $.y $ret call rand set $.sx $ret call rand set $.sy $ret call proc_rand path begin movp $.sx, $.sy line $.x, $.y path close print Random line No. $.count adds $.count 1 cmp $.count, 256 cle plot ; loop 256 times func end call plot ; plot!
Run
Save Output
?
1