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.
[img]cd.fig.png[img]
[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.
#text mode:
now display # public domain
function circle x y r c
cr r int plus 1
p -3.14159
try
rcpr 1 divby r
except
rcpr .005
resume
while
now p plus rcpr swap now p
ifmore p 3.14159
break
fig
cosx p cos times cr plus x int
siny p sin times cr plus y int
now pset cosx siny c
wend
fig
x
y
r
c
xf = 1
yf = 1
rf = .5
cf = 1
try
while
now circle (x, y), r, c : display
python
x = x + xf ; y = y + yf ; c = c + cf ; r = r + rf
if x < 1: xf = 1
if x > 638: xf = -1
if y < 1: yf = 1
if y > 477: yf = -1
if c < 1: cf = 1
if c > 14: cf = -1
if r < 1: rf = .5
if r > 200: rf = -.5
fig
wend
except
now colortext 7 : highlight 0 : cls : system : end
resume
home: [lit]https://freesoftwareresistance.neocities.org[lit]