Home » Archimedes archive » Acorn User » AU 1996-03 B.adf » Regulars » StarInfo/Amery/Curlicues

StarInfo/Amery/Curlicues

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1996-03 B.adf » Regulars
Filename: StarInfo/Amery/Curlicues
Read OK:
File size: 0235 bytes
Load address: 0000
Exec address: 0000
File contents
   20MODE 29            :REM change these lines to use a different mode.
   30xx%=1600:yx%=1200  :REM xx% is width(in OS pixels) and yx% is height.
   40ORIGIN FNx(1),FNy(1)
   50xo=0:yo=0
   60INPUT"Formula:"f$
   70IF f$="QUIT" THEN END
   80INPUT"Line Length:"L
   81ON ERROR IF ERR=17 THEN RUN ELSE PRINTREPORT$;" at line ";ERL:END
   90X=0
  100REPEAT
  110X+=1
  120PRINTTAB(3,3);X
  130A=FNf(EVAL(f$))*2*PI
  140PROCline(((L*COSA)+xo),((L*SINA)+yo),xo,yo)
  150UNTIL FALSE
  160:
  170DEFPROCmove(x,y)
  180MOVE FNx(x),FNy(y)
  190ENDPROC
  200:
  210DEFPROCline(x,y,RETURN ox,RETURN oy)
  220LINE FNx(x),FNy(y),FNx(ox),FNy(oy)
  230oy=y:ox=x
  240ENDPROC
  250:
  260DEFFNx(x)
  270=x*xx%/2
  280:
  290DEFFNy(y)
  300=y*yx%/2
  310:
  320DEFFNf(f)
  330=f-INT(f)
B� 29            :� change these lines to use a different mode.
Gxx%=1600:yx%=1200  :� xx% is width(in OS pixels) and yx% is height.
(ȑ �x(1),�y(1)
2
xo=0:yo=0
<�"Formula:"f$
F� f$="QUIT" � �
P�"Line Length:"L
Q(� � � �=17 � � � �$;" at line ";�:�
ZX=0
d�
nX+=1
x�3,3);X
�A=�f(�(f$))*2*�
�(�line(((L*�A)+xo),((L*�A)+yo),xo,yo)
�� �
�:
���move(x,y)
�� �x(x),�y(y)
��
�:
���line(x,y,� ox,� oy)
�� �x(x),�y(y),�x(ox),�y(oy)
�
oy=y:ox=x
��
�:

ݤx(x)
=x*xx%/2
:
"
ݤy(y)
,=y*yx%/2
6:
@
ݤf(f)
J=f-�(f)
�
00000000  0d 00 14 42 eb 20 32 39  20 20 20 20 20 20 20 20  |...B. 29        |
00000010  20 20 20 20 3a f4 20 63  68 61 6e 67 65 20 74 68  |    :. change th|
00000020  65 73 65 20 6c 69 6e 65  73 20 74 6f 20 75 73 65  |ese lines to use|
00000030  20 61 20 64 69 66 66 65  72 65 6e 74 20 6d 6f 64  | a different mod|
00000040  65 2e 0d 00 1e 47 78 78  25 3d 31 36 30 30 3a 79  |e....Gxx%=1600:y|
00000050  78 25 3d 31 32 30 30 20  20 3a f4 20 78 78 25 20  |x%=1200  :. xx% |
00000060  69 73 20 77 69 64 74 68  28 69 6e 20 4f 53 20 70  |is width(in OS p|
00000070  69 78 65 6c 73 29 20 61  6e 64 20 79 78 25 20 69  |ixels) and yx% i|
00000080  73 20 68 65 69 67 68 74  2e 0d 00 28 12 c8 91 20  |s height...(... |
00000090  a4 78 28 31 29 2c a4 79  28 31 29 0d 00 32 0d 78  |.x(1),.y(1)..2.x|
000000a0  6f 3d 30 3a 79 6f 3d 30  0d 00 3c 11 e8 22 46 6f  |o=0:yo=0..<.."Fo|
000000b0  72 6d 75 6c 61 3a 22 66  24 0d 00 46 13 e7 20 66  |rmula:"f$..F.. f|
000000c0  24 3d 22 51 55 49 54 22  20 8c 20 e0 0d 00 50 14  |$="QUIT" . ...P.|
000000d0  e8 22 4c 69 6e 65 20 4c  65 6e 67 74 68 3a 22 4c  |."Line Length:"L|
000000e0  0d 00 51 28 ee 20 85 20  e7 20 9f 3d 31 37 20 8c  |..Q(. . . .=17 .|
000000f0  20 f9 20 8b 20 f1 f6 24  3b 22 20 61 74 20 6c 69  | . . ..$;" at li|
00000100  6e 65 20 22 3b 9e 3a e0  0d 00 5a 07 58 3d 30 0d  |ne ";.:...Z.X=0.|
00000110  00 64 05 f5 0d 00 6e 08  58 2b 3d 31 0d 00 78 0c  |.d....n.X+=1..x.|
00000120  f1 8a 33 2c 33 29 3b 58  0d 00 82 13 41 3d a4 66  |..3,3);X....A=.f|
00000130  28 a0 28 66 24 29 29 2a  32 2a af 0d 00 8c 28 f2  |(.(f$))*2*....(.|
00000140  6c 69 6e 65 28 28 28 4c  2a 9b 41 29 2b 78 6f 29  |line(((L*.A)+xo)|
00000150  2c 28 28 4c 2a b5 41 29  2b 79 6f 29 2c 78 6f 2c  |,((L*.A)+yo),xo,|
00000160  79 6f 29 0d 00 96 07 fd  20 a3 0d 00 a0 05 3a 0d  |yo)..... .....:.|
00000170  00 aa 0f dd f2 6d 6f 76  65 28 78 2c 79 29 0d 00  |.....move(x,y)..|
00000180  b4 11 ec 20 a4 78 28 78  29 2c a4 79 28 79 29 0d  |... .x(x),.y(y).|
00000190  00 be 05 e1 0d 00 c8 05  3a 0d 00 d2 19 dd f2 6c  |........:......l|
000001a0  69 6e 65 28 78 2c 79 2c  f8 20 6f 78 2c f8 20 6f  |ine(x,y,. ox,. o|
000001b0  79 29 0d 00 dc 1f 86 20  a4 78 28 78 29 2c a4 79  |y)..... .x(x),.y|
000001c0  28 79 29 2c a4 78 28 6f  78 29 2c a4 79 28 6f 79  |(y),.x(ox),.y(oy|
000001d0  29 0d 00 e6 0d 6f 79 3d  79 3a 6f 78 3d 78 0d 00  |)....oy=y:ox=x..|
000001e0  f0 05 e1 0d 00 fa 05 3a  0d 01 04 0a dd a4 78 28  |.......:......x(|
000001f0  78 29 0d 01 0e 0c 3d 78  2a 78 78 25 2f 32 0d 01  |x)....=x*xx%/2..|
00000200  18 05 3a 0d 01 22 0a dd  a4 79 28 79 29 0d 01 2c  |..:.."...y(y)..,|
00000210  0c 3d 79 2a 79 78 25 2f  32 0d 01 36 05 3a 0d 01  |.=y*yx%/2..6.:..|
00000220  40 0a dd a4 66 28 66 29  0d 01 4a 0b 3d 66 2d a8  |@...f(f)..J.=f-.|
00000230  28 66 29 0d ff                                    |(f)..|
00000235