home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
prog1
/
4th_86.lzh
/
HILSIER.4TH
< prev
next >
Wrap
Text File
|
1989-02-12
|
3KB
|
135 lines
( forget new
: new ; )
off printload
2 block n
2 n !
( 2 ' n 3 + @ b!)
512 const h0
7 const maxcolr
2 block colr
2 block ii
2 block hh
2 block x
2 block y
2 block x00
2 block y00
2 block mag
: incx x @ hh @ + x ! ;
: decx x @ hh @ - x ! ;
: dec2x x @ hh @ 2 * - x ! ;
: inc2x x @ hh @ 2 * + x ! ;
: incy y @ hh @ + y ! ;
: decy y @ hh @ - y ! ;
: dec2y y @ hh @ 2 * - y ! ;
: inc2y y @ hh @ 2 * + y ! ;
: plot x @ y @ colr @ dline ;
: hplot x @ 2 / y @ 2 / colr @ dline ;
: setplot x @ y @ 0 dline ;
: hsetplot x @ 2 / y @ 2 / 0 dline ;
: aa0 ;
: bb0 ;
: cc0 ;
: dd0 ;
: AA dup 0> if
1- DD0 decx plot
1- recurse decy plot
1- recurse incx plot
1- BB0 then 1+ ;
: BB dup 0> if
1- CC0 incy plot
1- recurse incx plot
1- recurse decy plot
1- AA0 then 1+ ;
: CC dup 0> if
1- BB0 incx plot
1- recurse incy plot
1- recurse decx plot
1- DD0 then 1+ ;
: DD1 dup 0> if
1- AA0 decy plot
1- recurse decx plot
1- recurse incy plot
1- CC0 then 1+ ;
link aa0 aa link bb0 bb link cc0 cc link dd0 dd1
: swcolr
colr @ 1+ maxcolr /mod drop dup 0= if 1+ then colr ! ;
: hilb 0 colr !
egam depth case 0 of 1 mag ! 2 n ! endof
1 of 1 mag ! n ! endof
2 of mag ! n ! endof endcase
0 ii ! h0 8 / hh ! hh @ 2 / 19 * dup 5 / 70h + x00 ! 5 / 40h + y00 !
h0 2 / mag @ * hh ! ( modified hilb)
begin swcolr
ii @ 1+ ii !
hh @ 2 / hh !
x00 @ hh @ 2 / + x00 !
y00 @ hh @ 2 / + y00 !
x00 @ x ! y00 @ y ! setplot
ii @ AA drop
n @ ii @ - 0= end ;
: aaa0 ;
: bbb0 ;
: ccc0 ;
: ddd0 ;
: AAA dup 0> if
1- recurse incx decy hplot
1- BBB0 inc2x hplot
1- DDD0 incx incy hplot
1- recurse then 1+ ;
: BBB dup 0> if
1- recurse decx decy hplot
1- CCC0 dec2y hplot
1- AAA0 incx decy hplot
1- recurse then 1+ ;
: CCC dup 0> if
1- recurse decx incy hplot
1- DDD0 dec2x hplot
1- BBB0 decx decy hplot
1- recurse then 1+ ;
: DDD1 dup 0> if
1- recurse incx incy hplot
1- AAA0 inc2y hplot
1- CCC0 decx incy hplot
1- recurse then 1+ ;
link aaa0 aaa link bbb0 bbb link ccc0 ccc link ddd0 ddd1
: sierp 0 colr !
egam depth case 0 of 1 mag ! 2 n ! endof
1 of 1 mag ! n ! endof
2 of mag ! n ! endof endcase
0 ii ! h0 8 / hh ! hh @ 19 * dup 4 / 140h + x00 ! 5 / afh + y00 !
h0 4 ( 8 ) / mag @ * hh !
begin swcolr
ii @ 1+ ii ! x00 @ hh @ - x00 !
hh @ 2 / hh ! y00 @ hh @ + y00 !
x00 @ x ! y00 @ y ! hsetplot
ii @ AAA incx decy hplot drop
ii @ BBB decx decy hplot drop
ii @ CCC decx incy hplot drop
ii @ DDD1 incx incy hplot drop
n @ ii @ - 0= end ;