Created
May 26, 2017 10:24
-
-
Save m0ppers/e4234565de48496e60bc5e412a8cf263 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pi $0, si 0 | |
pi $1, si 1 | |
pi $2, si 2 | |
pi $4, si 4 | |
pi $8, si 8 | |
pi $16, si 16 | |
pi $127, si 127 | |
pi $shifter, pi 0 | |
pi $roffset, pi 0 | |
pi $goffset, pi 0 | |
pi $boffset, pi 0 | |
@mainloop | |
pi $x, si 0 | |
@xloop | |
pi $sinv, s $x, add $shifter, mul $2 | |
pi $yoffset, sin $sinv, div $8 | |
pi $y, si 0 | |
@yloop | |
pi $r, s $y, add $roffset, div $16, mul $16, add $127 | |
pi $g, s $y, sub $goffset, div $16, mul $2 | |
pi $b, s $y, sub $boffset, div $16, mul $4 | |
pi $realy, s $y, add $yoffset | |
x $x, y $realy, zi 4, s $r | |
x $x, y $realy, zi 5, s $g | |
x $x, y $realy, zi 6, s $b | |
pi $y, add $1, seq $0, j @yloop | |
pi $x, add $1, seq $0, j @xloop | |
pi $shifter, add $1 | |
w $1 | |
j @mainloop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment