Home » Archimedes archive » Micro User » MU 1991-07.adf » PD-Stuff » Fractals/!Martin/Martin

Fractals/!Martin/Martin

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 » Micro User » MU 1991-07.adf » PD-Stuff
Filename: Fractals/!Martin/Martin
Read OK:
File size: 0310 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM > Martin 1.0
   20REM by Mike Curnow
   30REM Algorithm by Dr. Martin
   40ON ERROR:PRINT"Press Y To End":A$=GET$:IF A$="Y" OR A$="y" THEN END
   50s=15*SINRAD(45)
   60c=20*COSRAD(45)
   70MODE 15
   80ORIGIN 640,512
   90PROCcp("Martin's Mappings")
  100PRINT
  110PROCcp("by")
  120PRINT
  130PROCcp("Mike Curnow")
  140PRINT''"Enter 3 numbers: a, b and z  (small values such as 1.5 are best)."
  150PRINT"Numbers can be positive or negative, and include decimal places ."
  160PRINT"Increasing the value of 'z' zooms outwards."
  170PRINT"Colours are plotted at random, so a different display will always result."
  180PRINT'"The drawing will continue until you press ESCAPE"'
  190INPUT"Enter a,b,z:"a,b,z
  200OFF
  210CLS:x=0:y=0
  220REPEAT:GCOL RND(64)-1 TINT (RND(3)-1)<<6:FOR i=1 TO 500:xx=y-SGN(x)*SQR(ABS(b*x-z)):y=a-x:x=xx:POINT x*s+y*c-48,y*s-x*c-16:NEXT
  230UNTILFALSE
  240REM Centred Print
  250DEFPROCcp(T$)
  260PRINTTAB(40-LEN(T$)/2)T$
  270ENDPROC

� > Martin 1.0
� by Mike Curnow
� Algorithm by Dr. Martin
(4� �:�"Press Y To End":A$=�:� A$="Y" � A$="y" � �
2s=15*��(45)
<c=20*��(45)
F� 15
Pȑ 640,512
Z�cp("Martin's Mappings")
d�
n
�cp("by")
x�
��cp("Mike Curnow")
�J�''"Enter 3 numbers: a, b and z  (small values such as 1.5 are best)."
�H�"Numbers can be positive or negative, and include decimal places ."
�2�"Increasing the value of 'z' zooms outwards."
�P�"Colours are plotted at random, so a different display will always result."
�9�'"The drawing will continue until you press ESCAPE"'
��"Enter a,b,z:"a,b,z
��
�
�:x=0:y=0
�f�:� �(64)-1 Ȝ (�(3)-1)<<6:� i=1 � 500:xx=y-�(x)*�(�(b*x-z)):y=a-x:x=xx:Ȓ x*s+y*c-48,y*s-x*c-16:�
���
�� Centred Print
���cp(T$)
�40-�(T$)/2)T$
�
�
00000000  0d 00 0a 12 f4 20 3e 20  4d 61 72 74 69 6e 20 31  |..... > Martin 1|
00000010  2e 30 0d 00 14 14 f4 20  62 79 20 4d 69 6b 65 20  |.0..... by Mike |
00000020  43 75 72 6e 6f 77 0d 00  1e 1d f4 20 41 6c 67 6f  |Curnow..... Algo|
00000030  72 69 74 68 6d 20 62 79  20 44 72 2e 20 4d 61 72  |rithm by Dr. Mar|
00000040  74 69 6e 0d 00 28 34 ee  20 85 3a f1 22 50 72 65  |tin..(4. .:."Pre|
00000050  73 73 20 59 20 54 6f 20  45 6e 64 22 3a 41 24 3d  |ss Y To End":A$=|
00000060  be 3a e7 20 41 24 3d 22  59 22 20 84 20 41 24 3d  |.:. A$="Y" . A$=|
00000070  22 79 22 20 8c 20 e0 0d  00 32 0f 73 3d 31 35 2a  |"y" . ...2.s=15*|
00000080  b5 b2 28 34 35 29 0d 00  3c 0f 63 3d 32 30 2a 9b  |..(45)..<.c=20*.|
00000090  b2 28 34 35 29 0d 00 46  08 eb 20 31 35 0d 00 50  |.(45)..F.. 15..P|
000000a0  0e c8 91 20 36 34 30 2c  35 31 32 0d 00 5a 1c f2  |... 640,512..Z..|
000000b0  63 70 28 22 4d 61 72 74  69 6e 27 73 20 4d 61 70  |cp("Martin's Map|
000000c0  70 69 6e 67 73 22 29 0d  00 64 05 f1 0d 00 6e 0d  |pings")..d....n.|
000000d0  f2 63 70 28 22 62 79 22  29 0d 00 78 05 f1 0d 00  |.cp("by")..x....|
000000e0  82 16 f2 63 70 28 22 4d  69 6b 65 20 43 75 72 6e  |...cp("Mike Curn|
000000f0  6f 77 22 29 0d 00 8c 4a  f1 27 27 22 45 6e 74 65  |ow")...J.''"Ente|
00000100  72 20 33 20 6e 75 6d 62  65 72 73 3a 20 61 2c 20  |r 3 numbers: a, |
00000110  62 20 61 6e 64 20 7a 20  20 28 73 6d 61 6c 6c 20  |b and z  (small |
00000120  76 61 6c 75 65 73 20 73  75 63 68 20 61 73 20 31  |values such as 1|
00000130  2e 35 20 61 72 65 20 62  65 73 74 29 2e 22 0d 00  |.5 are best)."..|
00000140  96 48 f1 22 4e 75 6d 62  65 72 73 20 63 61 6e 20  |.H."Numbers can |
00000150  62 65 20 70 6f 73 69 74  69 76 65 20 6f 72 20 6e  |be positive or n|
00000160  65 67 61 74 69 76 65 2c  20 61 6e 64 20 69 6e 63  |egative, and inc|
00000170  6c 75 64 65 20 64 65 63  69 6d 61 6c 20 70 6c 61  |lude decimal pla|
00000180  63 65 73 20 2e 22 0d 00  a0 32 f1 22 49 6e 63 72  |ces ."...2."Incr|
00000190  65 61 73 69 6e 67 20 74  68 65 20 76 61 6c 75 65  |easing the value|
000001a0  20 6f 66 20 27 7a 27 20  7a 6f 6f 6d 73 20 6f 75  | of 'z' zooms ou|
000001b0  74 77 61 72 64 73 2e 22  0d 00 aa 50 f1 22 43 6f  |twards."...P."Co|
000001c0  6c 6f 75 72 73 20 61 72  65 20 70 6c 6f 74 74 65  |lours are plotte|
000001d0  64 20 61 74 20 72 61 6e  64 6f 6d 2c 20 73 6f 20  |d at random, so |
000001e0  61 20 64 69 66 66 65 72  65 6e 74 20 64 69 73 70  |a different disp|
000001f0  6c 61 79 20 77 69 6c 6c  20 61 6c 77 61 79 73 20  |lay will always |
00000200  72 65 73 75 6c 74 2e 22  0d 00 b4 39 f1 27 22 54  |result."...9.'"T|
00000210  68 65 20 64 72 61 77 69  6e 67 20 77 69 6c 6c 20  |he drawing will |
00000220  63 6f 6e 74 69 6e 75 65  20 75 6e 74 69 6c 20 79  |continue until y|
00000230  6f 75 20 70 72 65 73 73  20 45 53 43 41 50 45 22  |ou press ESCAPE"|
00000240  27 0d 00 be 18 e8 22 45  6e 74 65 72 20 61 2c 62  |'....."Enter a,b|
00000250  2c 7a 3a 22 61 2c 62 2c  7a 0d 00 c8 05 87 0d 00  |,z:"a,b,z.......|
00000260  d2 0d db 3a 78 3d 30 3a  79 3d 30 0d 00 dc 66 f5  |...:x=0:y=0...f.|
00000270  3a e6 20 b3 28 36 34 29  2d 31 20 c8 9c 20 28 b3  |:. .(64)-1 .. (.|
00000280  28 33 29 2d 31 29 3c 3c  36 3a e3 20 69 3d 31 20  |(3)-1)<<6:. i=1 |
00000290  b8 20 35 30 30 3a 78 78  3d 79 2d b4 28 78 29 2a  |. 500:xx=y-.(x)*|
000002a0  b6 28 94 28 62 2a 78 2d  7a 29 29 3a 79 3d 61 2d  |.(.(b*x-z)):y=a-|
000002b0  78 3a 78 3d 78 78 3a c8  92 20 78 2a 73 2b 79 2a  |x:x=xx:.. x*s+y*|
000002c0  63 2d 34 38 2c 79 2a 73  2d 78 2a 63 2d 31 36 3a  |c-48,y*s-x*c-16:|
000002d0  ed 0d 00 e6 06 fd a3 0d  00 f0 13 f4 20 43 65 6e  |............ Cen|
000002e0  74 72 65 64 20 50 72 69  6e 74 0d 00 fa 0c dd f2  |tred Print......|
000002f0  63 70 28 54 24 29 0d 01  04 13 f1 8a 34 30 2d a9  |cp(T$)......40-.|
00000300  28 54 24 29 2f 32 29 54  24 0d 01 0e 05 e1 0d ff  |(T$)/2)T$.......|
00000310