digital literacy for everyone



[lit] fig is a multi-purpose educational language-- originally designed to offer 16 colours in the term window or vt, with a compatible 16-colour palette in a graphics window. in 2017, i decided that rather than extend the language, a simple function (rgbcolour) would allow 24-bit colour without any change to the language itself. spiralcone is one of the earliest programs that use this function. [img][img] [fig] #### license: creative commons cc0 1.0 (public domain) #### proginf = "spiralcone 2017 mn" function rgbcolor r g b c python figcgapal[c] = (r, g, b) fig fig v 1 c 400 for r 490 110 -1 for p -3.14159 3.14159 .003067958984375 w r divby 5 plus 5 int rc r divby 2 int rd 256 minus rc rgbcolor rc 255 0 11 x p times 2 cos times w plus c int y p times 2 sin times w plus r int m 6.28 plus 1.57 divby 108.503 divby 2 now v plus m swap now v now v int mod 2 times 11 pset x y now y2 y minus 1 pset x y2 now next now display next now display lineinput
fig main page: [url][url] home: [lit][lit]