Home » Archimedes archive » Acorn User » AU 1998-06 A.adf » Regulars » StarInfo/Brobecker/DevilCurve
StarInfo/Brobecker/DevilCurve
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 1998-06 A.adf » Regulars |
Filename: | StarInfo/Brobecker/DevilCurve |
Read OK: | ✔ |
File size: | 020A bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM>>> Devil's curve 20REM Alain BROBECKER (baah/Arm's Tech) on 12-Dec-1997 30REMDevil's curve function is based upon Cantor's set, 40REMit is everywhere continuous, nowhere differenciable. 50MODE12:OFF 60FOR i=1 TO 7 70 GCOL i 80 PROCdevil(i,0,0,1279,1023) 90 IFGET 100NEXT 110END 120 130DEFPROCdevil(depth,x1,y1,x2,y2) 140 IFdepth=0THEN 150 LINEx1,y1,x2,y2 160 ELSE 170 PROCdevil(depth-1,x1,y1,(2*x1+x2)/3,(y1+2*y2)/3) 180 PROCdevil(depth-1,(2*x1+x2)/3,(y1+2*y2)/3,(x1+2*x2)/3,(2*y1+y2)/3) 190 PROCdevil(depth-1,(x1+2*x2)/3,(2*y1+y2)/3,x2,y2) 200 ENDIF 210ENDPROC
�>>> Devil's curve 9� Alain BROBECKER (baah/Arm's Tech) on 12-Dec-1997 7�Devil's curve function is based upon Cantor's set, (9�it is everywhere continuous, nowhere differenciable. 2 �12:� < � i=1 � 7 F � i P �devil(i,0,0,1279,1023) Z � d� n� x ���devil(depth,x1,y1,x2,y2) � �depth=0� � �x1,y1,x2,y2 � � �3 �devil(depth-1,x1,y1,(2*x1+x2)/3,(y1+2*y2)/3) �E �devil(depth-1,(2*x1+x2)/3,(y1+2*y2)/3,(x1+2*x2)/3,(2*y1+y2)/3) �3 �devil(depth-1,(x1+2*x2)/3,(2*y1+y2)/3,x2,y2) � � �� �
00000000 0d 00 0a 16 f4 3e 3e 3e 20 44 65 76 69 6c 27 73 |.....>>> Devil's| 00000010 20 63 75 72 76 65 0d 00 14 39 f4 20 20 20 20 41 | curve...9. A| 00000020 6c 61 69 6e 20 42 52 4f 42 45 43 4b 45 52 20 28 |lain BROBECKER (| 00000030 62 61 61 68 2f 41 72 6d 27 73 20 54 65 63 68 29 |baah/Arm's Tech)| 00000040 20 6f 6e 20 31 32 2d 44 65 63 2d 31 39 39 37 0d | on 12-Dec-1997.| 00000050 00 1e 37 f4 44 65 76 69 6c 27 73 20 63 75 72 76 |..7.Devil's curv| 00000060 65 20 66 75 6e 63 74 69 6f 6e 20 69 73 20 62 61 |e function is ba| 00000070 73 65 64 20 75 70 6f 6e 20 43 61 6e 74 6f 72 27 |sed upon Cantor'| 00000080 73 20 73 65 74 2c 0d 00 28 39 f4 69 74 20 69 73 |s set,..(9.it is| 00000090 20 65 76 65 72 79 77 68 65 72 65 20 63 6f 6e 74 | everywhere cont| 000000a0 69 6e 75 6f 75 73 2c 20 6e 6f 77 68 65 72 65 20 |inuous, nowhere | 000000b0 64 69 66 66 65 72 65 6e 63 69 61 62 6c 65 2e 0d |differenciable..| 000000c0 00 32 09 eb 31 32 3a 87 0d 00 3c 0d e3 20 69 3d |.2..12:...<.. i=| 000000d0 31 20 b8 20 37 0d 00 46 08 20 e6 20 69 0d 00 50 |1 . 7..F. . i..P| 000000e0 1c 20 f2 64 65 76 69 6c 28 69 2c 30 2c 30 2c 31 |. .devil(i,0,0,1| 000000f0 32 37 39 2c 31 30 32 33 29 0d 00 5a 07 20 e7 a5 |279,1023)..Z. ..| 00000100 0d 00 64 05 ed 0d 00 6e 05 e0 0d 00 78 04 0d 00 |..d....n....x...| 00000110 82 1e dd f2 64 65 76 69 6c 28 64 65 70 74 68 2c |....devil(depth,| 00000120 78 31 2c 79 31 2c 78 32 2c 79 32 29 0d 00 8c 0e |x1,y1,x2,y2)....| 00000130 20 e7 64 65 70 74 68 3d 30 8c 0d 00 96 12 20 20 | .depth=0..... | 00000140 86 78 31 2c 79 31 2c 78 32 2c 79 32 0d 00 a0 06 |.x1,y1,x2,y2....| 00000150 20 cc 0d 00 aa 33 20 20 f2 64 65 76 69 6c 28 64 | ....3 .devil(d| 00000160 65 70 74 68 2d 31 2c 78 31 2c 79 31 2c 28 32 2a |epth-1,x1,y1,(2*| 00000170 78 31 2b 78 32 29 2f 33 2c 28 79 31 2b 32 2a 79 |x1+x2)/3,(y1+2*y| 00000180 32 29 2f 33 29 0d 00 b4 45 20 20 f2 64 65 76 69 |2)/3)...E .devi| 00000190 6c 28 64 65 70 74 68 2d 31 2c 28 32 2a 78 31 2b |l(depth-1,(2*x1+| 000001a0 78 32 29 2f 33 2c 28 79 31 2b 32 2a 79 32 29 2f |x2)/3,(y1+2*y2)/| 000001b0 33 2c 28 78 31 2b 32 2a 78 32 29 2f 33 2c 28 32 |3,(x1+2*x2)/3,(2| 000001c0 2a 79 31 2b 79 32 29 2f 33 29 0d 00 be 33 20 20 |*y1+y2)/3)...3 | 000001d0 f2 64 65 76 69 6c 28 64 65 70 74 68 2d 31 2c 28 |.devil(depth-1,(| 000001e0 78 31 2b 32 2a 78 32 29 2f 33 2c 28 32 2a 79 31 |x1+2*x2)/3,(2*y1| 000001f0 2b 79 32 29 2f 33 2c 78 32 2c 79 32 29 0d 00 c8 |+y2)/3,x2,y2)...| 00000200 06 20 cd 0d 00 d2 05 e1 0d ff |. ........| 0000020a