This page (revision-22) was last changed on 03-Feb-2023 15:21 by Gromit 

This page was created on 14-Mar-2010 18:17 by Carsten Strotmann

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
22 03-Feb-2023 15:21 23 KB Gromit to previous
21 01-Feb-2011 12:53 23 KB Gromit to previous | to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 219 added 87 lines
Action! listing 1:
{{{
; KAL.ACT
: ANALOG Computing #17
; Copyright 1984 BY Clinton Parker
; All Rights Reserved
; last modified January 11, 1984
; Global variables
TYPE REC=[CARD cnt,ax,bx,cx,ay,by,cy]
REC p, e
CARD period, npts, persistence
PROC Gen(REC POINTER r)
BYTE x0, y0, x1, y1, ATRACT=77
; get new a
r.ax = (r.ax + r.bx) ! r.bx
r.ay = (r.ay + r.by) ! r.by
r.cnt = -1
IF r.cnt = 0 THEN ; get new b
r.bx = (r.bx + r.cx) ! r.cx
r.by = (r.by + r.cy) ! r.cy
r.cnt = period
ATRACT = 0 ; turn off attact mode
FI
x0 = r.ax RSH 9
y0 = r.ay RSH 9
IF x0 <= y0 AND y0 < 96 THEN
x1 = 191 - x0
y1 = 191 - y1
Plot(x0 + 64, y0) : Plot(x0 + 64, y1)
Plot(y0 + 64, x0) : Plot(y0 + 64, x1)
Plot(x1 + 64, y0) : Plot(x1 + 64, y1)
Plot(y1 + 64, x0) : Plot(y1 + 64, x1)
FI
RETURN
PROC Kal()
CHAR CH=764
Graphics(24)
SetColor(1,0,14) : SetColor(2,0,0)
; change for different patterns
persistence = 2500
period = 10000
p.cnt = period
p.ax = 5221
p.bx = 64449
p.cx = 3
p.ay = 57669
p.by = 64489
p.cy = 3
; copy plot record to erase record
MoveBlock(e, p, REC)
; handle persistence
color = 1
FOR npts = 1 TO persistence DO
Gen(p)
UNTIL CH # 255
OD
; draw patterns until key depressed
WHILE CH = 255 DO
color = 1 : Gen(p)
color = 0 : Gen(e)
OD
; ignore key and restore screen
CH = 255 : Graphics(0)
RETURN
}}}