digital literacy for everyone
[lit][generate-title]
[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.
[fig]
# 2019 mn
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
sa 100 display
cx arr times sa
cy arr times sa
cc arr times sa
function cir(x y c)
while
ifless x 100
z x plus 10 swap z x
fig
ifless y 100
z y plus 10 swap z y
fig
ifmore x 700
z x minus 10 swap z x
fig
ifmore y 500
z y minus 10 swap z y
fig
ifmore x 99
ifmore y 99
ifless x 701
ifless y 501
break
fig
fig
fig
fig
wend
xo = -10
yo = 0
for p -3.14159 3.14159 0.5 #4879857142857144
#p -3.14159
zx p times 10 cos times 5 int plus x
zy p times 10 sin times 5 int plus y
z pset zx zy c
#ifequal xo -10
#pass
#else
#z line xo yo zx zy c
#fig
xo = zx
yo = zy
next
fig
for r 1 sa 1
co randint 9 15
cc arrset r co
sx randint 5 750
cx arrset r sx
sy randint 5 550
cy arrset r sy
z cir sx sy co
next
dd
while
for r 1 sa 1
co arrget cc r
zx arrget cx r
sx randint -5 5 divby 1 int times 1 plus zx
cx arrset r sx
zy arrget cy r
sy randint -5 5 divby 1 int times 1 plus zy
cy arrset r sy
ifequal dd 0
z cir zx zy 0
z cir sx sy co
fig
next
z sleep .005
now dd plus 1 swap now dd
ifmore dd 5
dd 0
fig
ifequal dd 0
now display
dd 0
fig
wend
home: [lit]https://freesoftwareresistance.neocities.org[lit]