home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / unix_c / windows / mandlbrt.tar < prev    next >
Tape Archive  |  1989-03-09  |  32.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Tape Archive (archive/tar).

You can browse this item here: mandlbrt.tar

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Tape Archive (archive/tar) magic Supported
100% file tar archive default
99% file tar archive (V7), file mandelbrot/, mode 755 , uid 243 , gid 13 , size 0 , seconds 4405533130 default
98% file data default
100% lsar Tar default
100% gt2 TAR Archiv gefunden (Auflistung ist deaktiviert) default
100% disktype Pre-POSIX tar archive default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 6d 61 6e 64 65 6c 62 72 | 6f 74 2f 00 00 00 00 00 |mandelbr|ot/.....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 20 20 37 | 35 35 20 00 20 20 20 32 |.... 7|55 . 2|
|00000070| 34 33 20 00 20 20 20 20 | 31 33 20 00 20 20 20 20 |43 . |13 . |
|00000080| 20 20 20 20 20 20 30 20 | 20 34 34 30 35 35 33 33 | 0 | 4405533|
|00000090| 31 33 30 20 20 20 36 31 | 34 31 00 20 00 00 00 00 |130 61|41. ....|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 6d 61 6e 64 65 6c 62 72 | 6f 74 2f 53 68 61 72 46 |mandelbr|ot/SharF|
|00000210| 69 6c 65 2e 48 65 61 64 | 65 72 73 00 00 00 00 00 |ile.Head|ers.....|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00000270| 34 33 20 00 20 20 20 20 | 31 33 20 00 20 20 20 20 |43 . |13 . |
|00000280| 20 20 20 31 34 32 36 20 | 20 34 34 30 35 35 33 33 | 1426 | 4405533|
|00000290| 31 33 33 20 20 31 31 32 | 32 36 00 20 00 00 00 00 |133 112|26. ....|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 3d 3d 3d 20 6d 61 6e 64 | 65 6c 62 72 6f 74 2e 73 |=== mand|elbrot.s|
|00000410| 68 61 72 20 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |har ====|========|
|00000420| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 0a 46 72 |========|=====.Fr|
|00000430| 6f 6d 20 72 69 61 63 73 | 21 65 6f 73 21 61 6d 65 |om riacs|!eos!ame|
|00000440| 73 21 61 6d 64 61 68 6c | 21 75 75 6e 65 74 21 61 |s!amdahl|!uunet!a|
|00000450| 6c 6c 62 65 72 79 20 57 | 65 64 20 4d 61 72 20 20 |llbery W|ed Mar |
|00000460| 38 20 30 39 3a 32 32 3a | 33 34 20 50 53 54 20 31 |8 09:22:|34 PST 1|
|00000470| 39 38 39 0a 0a 50 6f 73 | 74 69 6e 67 2d 6e 75 6d |989..Pos|ting-num|
|00000480| 62 65 72 3a 20 56 6f 6c | 75 6d 65 20 36 2c 20 49 |ber: Vol|ume 6, I|
|00000490| 73 73 75 65 20 36 30 0a | 53 75 62 6d 69 74 74 65 |ssue 60.|Submitte|
|000004a0| 64 2d 62 79 3a 20 70 65 | 6c 6c 40 69 73 79 2e 6c |d-by: pe|ll@isy.l|
|000004b0| 69 75 2e 73 65 20 28 50 | 7b 72 20 45 6d 61 6e 75 |iu.se (P|{r Emanu|
|000004c0| 65 6c 73 73 6f 6e 29 0a | 41 72 63 68 69 76 65 2d |elsson).|Archive-|
|000004d0| 6e 61 6d 65 3a 20 66 61 | 73 74 6d 74 6f 6f 6c 2e |name: fa|stmtool.|
|000004e0| 73 75 6e 0a 0a 54 68 69 | 73 20 69 73 20 53 55 4e |sun..Thi|s is SUN|
|000004f0| 20 73 70 65 63 69 66 69 | 63 20 73 74 75 66 66 2c | specifi|c stuff,|
|00000500| 20 62 75 74 20 74 68 65 | 20 61 6c 67 6f 72 69 74 | but the| algorit|
|00000510| 68 6d 2c 20 77 68 69 63 | 68 20 69 73 20 6e 65 77 |hm, whic|h is new|
|00000520| 2c 20 69 73 0a 76 65 72 | 79 20 73 69 6d 70 6c 65 |, is.ver|y simple|
|00000530| 20 74 6f 20 72 69 70 20 | 6f 75 74 20 61 6e 64 20 | to rip |out and |
|00000540| 75 73 65 20 69 6e 20 73 | 6f 6d 65 74 68 69 6e 67 |use in s|omething|
|00000550| 20 65 6c 73 65 2e 0a 0a | 20 20 20 20 57 68 61 74 | else...| What|
|00000560| 27 73 20 6e 65 77 20 61 | 6e 64 20 65 78 63 69 74 |'s new a|nd excit|
|00000570| 69 6e 67 20 77 69 74 68 | 20 74 68 69 73 20 70 72 |ing with| this pr|
|00000580| 6f 67 72 61 6d 20 28 49 | 4d 48 4f 20 3a 2d 29 20 |ogram (I|MHO :-) |
|00000590| 29 20 69 73 20 74 68 61 | 74 20 69 74 20 69 6d 70 |) is tha|t it imp|
|000005a0| 6c 65 6d 65 6e 74 73 0a | 61 20 6e 65 77 20 61 6c |lements.|a new al|
|000005b0| 67 6f 72 69 74 68 6d 2e | 20 54 68 69 73 20 69 73 |gorithm.| This is|
|000005c0| 20 67 6f 6f 64 20 66 6f | 72 20 66 61 73 74 20 63 | good fo|r fast c|
|000005d0| 61 6c 63 75 6c 61 74 69 | 6f 6e 20 6f 66 20 61 20 |alculati|on of a |
|000005e0| 28 72 6f 75 67 68 29 20 | 6f 75 74 6c 69 6e 65 20 |(rough) |outline |
|000005f0| 6f 66 0a 74 68 65 20 4d | 61 6e 64 65 6c 62 72 6f |of.the M|andelbro|
|00000600| 74 20 73 65 74 20 61 6e | 64 20 74 68 75 73 20 73 |t set an|d thus s|
|00000610| 75 69 74 61 62 6c 65 20 | 66 6f 72 20 69 6e 74 65 |uitable |for inte|
|00000620| 72 61 63 74 69 76 65 20 | 6d 61 6e 69 70 75 6c 61 |ractive |manipula|
|00000630| 74 69 6f 6e 73 2e 20 54 | 68 69 73 0a 6d 61 6b 65 |tions. T|his.make|
|00000640| 73 20 69 74 20 70 6f 73 | 73 69 62 6c 65 20 74 6f |s it pos|sible to|
|00000650| 20 69 74 65 72 61 74 65 | 20 65 2e 67 2e 20 6f 6e | iterate| e.g. on|
|00000660| 6c 79 20 65 76 65 72 79 | 20 31 30 3a 74 68 20 72 |ly every| 10:th r|
|00000670| 6f 77 20 61 6e 64 20 63 | 6f 6c 75 6d 6e 20 6f 66 |ow and c|olumn of|
|00000680| 20 74 68 65 20 69 6d 61 | 67 65 2c 0a 74 68 75 73 | the ima|ge,.thus|
|00000690| 20 72 65 64 75 63 69 6e | 67 20 74 68 65 20 74 69 | reducin|g the ti|
|000006a0| 6d 65 20 62 79 20 61 20 | 66 61 63 74 6f 72 20 6f |me by a |factor o|
|000006b0| 66 20 31 30 30 20 63 6f | 6d 70 61 72 65 64 20 74 |f 100 co|mpared t|
|000006c0| 6f 20 74 68 65 20 73 74 | 61 6e 64 61 72 64 20 4d |o the st|andard M|
|000006d0| 61 6e 64 65 6c 62 72 6f | 74 0a 61 6c 67 6f 72 69 |andelbro|t.algori|
|000006e0| 74 68 6d 2e 20 49 74 27 | 73 20 61 6c 73 6f 20 66 |thm. It'|s also f|
|000006f0| 75 6e 20 74 6f 20 77 61 | 74 63 68 2c 20 73 69 6e |un to wa|tch, sin|
|00000700| 63 65 20 69 74 27 73 20 | 72 65 63 75 72 73 69 76 |ce it's |recursiv|
|00000710| 65 2e 2e 2e 0a 0a 00 00 | 00 00 00 00 00 00 00 00 |e.......|........|
|00000720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000800| 6d 61 6e 64 65 6c 62 72 | 6f 74 2f 52 45 41 44 4d |mandelbr|ot/READM|
|00000810| 45 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |E.......|........|
|00000820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000860| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00000870| 34 33 20 00 20 20 20 20 | 31 33 20 00 20 20 20 20 |43 . |13 . |
|00000880| 20 20 20 37 36 33 34 20 | 20 34 34 30 35 35 33 33 | 7634 | 4405533|
|00000890| 31 31 36 20 20 20 37 31 | 32 34 00 20 00 00 00 00 |116 71|24. ....|
|000008a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a00| 20 20 20 20 54 68 69 73 | 20 69 73 20 61 20 70 72 | This| is a pr|
|00000a10| 6f 67 72 61 6d 20 66 6f | 72 20 69 6e 74 65 72 61 |ogram fo|r intera|
|00000a20| 63 74 69 76 65 20 4d 61 | 6e 64 65 6c 62 72 6f 74 |ctive Ma|ndelbrot|
|00000a30| 20 65 78 70 6c 6f 72 61 | 74 69 6f 6e 20 66 6f 72 | explora|tion for|
|00000a40| 20 53 75 6e 0a 77 6f 72 | 6b 73 74 61 74 69 6f 6e | Sun.wor|kstation|
|00000a50| 73 20 75 73 69 6e 67 20 | 53 75 6e 56 69 65 77 2e |s using |SunView.|
|00000a60| 0a 0a 20 20 20 20 57 68 | 61 74 27 73 20 6e 65 77 |.. Wh|at's new|
|00000a70| 20 61 6e 64 20 65 78 63 | 69 74 69 6e 67 20 77 69 | and exc|iting wi|
|00000a80| 74 68 20 74 68 69 73 20 | 70 72 6f 67 72 61 6d 20 |th this |program |
|00000a90| 28 49 4d 48 4f 20 3a 2d | 29 20 29 20 69 73 20 74 |(IMHO :-|) ) is t|
|00000aa0| 68 61 74 20 69 74 20 69 | 6d 70 6c 65 6d 65 6e 74 |hat it i|mplement|
|00000ab0| 73 0a 61 20 6e 65 77 20 | 61 6c 67 6f 72 69 74 68 |s.a new |algorith|
|00000ac0| 6d 2e 20 54 68 69 73 20 | 69 73 20 67 6f 6f 64 20 |m. This |is good |
|00000ad0| 66 6f 72 20 66 61 73 74 | 20 63 61 6c 63 75 6c 61 |for fast| calcula|
|00000ae0| 74 69 6f 6e 20 6f 66 20 | 61 20 28 72 6f 75 67 68 |tion of |a (rough|
|00000af0| 29 20 6f 75 74 6c 69 6e | 65 20 6f 66 0a 74 68 65 |) outlin|e of.the|
|00000b00| 20 4d 61 6e 64 65 6c 62 | 72 6f 74 20 73 65 74 20 | Mandelb|rot set |
|00000b10| 61 6e 64 20 74 68 75 73 | 20 73 75 69 74 61 62 6c |and thus| suitabl|
|00000b20| 65 20 66 6f 72 20 69 6e | 74 65 72 61 63 74 69 76 |e for in|teractiv|
|00000b30| 65 20 6d 61 6e 69 70 75 | 6c 61 74 69 6f 6e 73 2e |e manipu|lations.|
|00000b40| 20 54 68 69 73 0a 6d 61 | 6b 65 73 20 69 74 20 70 | This.ma|kes it p|
|00000b50| 6f 73 73 69 62 6c 65 20 | 74 6f 20 69 74 65 72 61 |ossible |to itera|
|00000b60| 74 65 20 65 2e 67 2e 20 | 6f 6e 6c 79 20 65 76 65 |te e.g. |only eve|
|00000b70| 72 79 20 31 30 3a 74 68 | 20 72 6f 77 20 61 6e 64 |ry 10:th| row and|
|00000b80| 20 63 6f 6c 75 6d 6e 20 | 6f 66 20 74 68 65 20 69 | column |of the i|
|00000b90| 6d 61 67 65 2c 0a 74 68 | 75 73 20 72 65 64 75 63 |mage,.th|us reduc|
|00000ba0| 69 6e 67 20 74 68 65 20 | 74 69 6d 65 20 62 79 20 |ing the |time by |
|00000bb0| 61 20 66 61 63 74 6f 72 | 20 6f 66 20 31 30 30 20 |a factor| of 100 |
|00000bc0| 63 6f 6d 70 61 72 65 64 | 20 74 6f 20 74 68 65 20 |compared| to the |
|00000bd0| 73 74 61 6e 64 61 72 64 | 20 4d 61 6e 64 65 6c 62 |standard| Mandelb|
|00000be0| 72 6f 74 0a 61 6c 67 6f | 72 69 74 68 6d 2e 20 49 |rot.algo|rithm. I|
|00000bf0| 74 27 73 20 61 6c 73 6f | 20 66 75 6e 20 74 6f 20 |t's also| fun to |
|00000c00| 77 61 74 63 68 2c 20 73 | 69 6e 63 65 20 69 74 27 |watch, s|ince it'|
|00000c10| 73 20 72 65 63 75 72 73 | 69 76 65 2e 2e 2e 0a 0a |s recurs|ive.....|
|00000c20| 20 20 20 20 49 74 20 68 | 61 73 20 62 65 65 6e 20 | It h|as been |
|00000c30| 74 65 73 74 65 64 20 6f | 6e 20 74 68 65 20 66 6f |tested o|n the fo|
|00000c40| 6c 6c 6f 77 69 6e 67 20 | 63 6f 6e 66 69 67 75 72 |llowing |configur|
|00000c50| 61 74 69 6f 6e 73 3a 0a | 0a 53 75 6e 2d 32 2f 31 |ations:.|.Sun-2/1|
|00000c60| 32 30 20 75 6e 64 65 72 | 20 53 75 6e 4f 53 20 33 |20 under| SunOS 3|
|00000c70| 2e 35 2c 20 53 75 6e 2d | 33 2f 35 30 2c 20 33 2f |.5, Sun-|3/50, 3/|
|00000c80| 37 35 2c 20 33 2f 31 31 | 30 20 77 69 74 68 20 46 |75, 3/11|0 with F|
|00000c90| 50 41 2c 20 33 2f 32 38 | 30 2c 20 34 2f 31 31 30 |PA, 3/28|0, 4/110|
|00000ca0| 0a 61 6e 64 20 34 2f 32 | 38 30 2c 20 61 6c 6c 20 |.and 4/2|80, all |
|00000cb0| 75 73 69 6e 67 20 53 75 | 6e 4f 53 20 34 2e 30 28 |using Su|nOS 4.0(|
|00000cc0| 2e 31 29 2e 20 48 6f 70 | 65 66 75 6c 6c 79 20 69 |.1). Hop|efully i|
|00000cd0| 74 20 73 68 6f 75 6c 64 | 20 77 6f 72 6b 20 6f 6e |t should| work on|
|00000ce0| 20 6f 74 68 65 72 73 20 | 74 6f 6f 2e 0a 0a 20 20 | others |too... |
|00000cf0| 20 20 53 6f 20 68 6f 77 | 20 64 6f 65 73 20 69 74 | So how| does it|
|00000d00| 20 77 6f 72 6b 3f 20 57 | 65 6c 6c 2c 20 75 73 69 | work? W|ell, usi|
|00000d10| 6e 67 20 73 6f 6d 65 20 | 69 6e 74 72 69 63 61 74 |ng some |intricat|
|00000d20| 65 20 6d 61 74 68 65 6d | 61 74 69 63 73 20 79 6f |e mathem|atics yo|
|00000d30| 75 20 63 61 6e 0a 61 72 | 72 69 76 65 20 61 74 20 |u can.ar|rive at |
|00000d40| 61 6e 20 65 71 75 61 74 | 69 6f 6e 20 74 68 61 74 |an equat|ion that|
|00000d50| 20 65 73 74 69 6d 61 74 | 65 73 20 74 68 65 20 64 | estimat|es the d|
|00000d60| 69 73 74 61 6e 63 65 20 | 66 72 6f 6d 20 61 20 70 |istance |from a p|
|00000d70| 6f 69 6e 74 20 6f 75 74 | 73 69 64 65 20 74 68 65 |oint out|side the|
|00000d80| 0a 4d 61 6e 64 65 6c 62 | 72 6f 74 20 73 65 74 20 |.Mandelb|rot set |
|00000d90| 74 6f 20 74 68 65 20 6e | 65 61 72 65 73 74 20 70 |to the n|earest p|
|00000da0| 6f 69 6e 74 20 49 4e 20 | 74 68 65 20 73 65 74 2e |oint IN |the set.|
|00000db0| 20 55 73 69 6e 67 20 74 | 68 69 73 20 6b 6e 6f 77 | Using t|his know|
|00000dc0| 6c 65 64 67 65 2c 20 69 | 74 27 73 0a 70 6f 73 73 |ledge, i|t's.poss|
|00000dd0| 69 62 6c 65 20 74 6f 20 | 65 78 63 6c 75 64 65 20 |ible to |exclude |
|00000de0| 61 6c 6c 20 70 6f 69 6e | 74 73 20 6c 79 69 6e 67 |all poin|ts lying|
|00000df0| 20 69 6e 73 69 64 65 20 | 61 20 64 69 73 6b 20 77 | inside |a disk w|
|00000e00| 69 74 68 20 74 68 65 20 | 72 61 64 69 75 73 20 65 |ith the |radius e|
|00000e10| 71 75 61 6c 20 74 6f 0a | 74 68 69 73 20 64 69 73 |qual to.|this dis|
|00000e20| 74 61 6e 63 65 2e 20 59 | 6f 75 20 6b 6e 6f 77 20 |tance. Y|ou know |
|00000e30| 74 68 65 79 20 63 61 6e | 27 74 20 62 65 20 70 61 |they can|'t be pa|
|00000e40| 72 74 20 6f 66 20 74 68 | 65 20 73 65 74 20 61 6e |rt of th|e set an|
|00000e50| 64 20 6d 61 72 6b 20 74 | 68 65 6d 20 61 73 0a 75 |d mark t|hem as.u|
|00000e60| 6e 69 6e 74 65 72 65 73 | 74 69 6e 67 2e 20 54 68 |ninteres|ting. Th|
|00000e70| 65 6e 20 79 6f 75 20 72 | 65 70 65 61 74 20 74 68 |en you r|epeat th|
|00000e80| 65 20 63 61 6c 63 75 6c | 61 74 69 6f 6e 20 77 69 |e calcul|ation wi|
|00000e90| 74 68 20 61 20 63 6f 75 | 70 6c 65 20 6f 66 20 70 |th a cou|ple of p|
|00000ea0| 6f 69 6e 74 73 0a 70 69 | 63 6b 65 64 20 66 72 6f |oints.pi|cked fro|
|00000eb0| 6d 20 74 68 65 20 65 64 | 67 65 20 6f 66 20 74 68 |m the ed|ge of th|
|00000ec0| 69 73 20 64 69 73 6b 2e | 20 49 6e 20 74 68 69 73 |is disk.| In this|
|00000ed0| 20 66 61 73 68 69 6f 6e | 2c 20 79 6f 75 20 77 69 | fashion|, you wi|
|00000ee0| 6c 6c 20 67 65 74 20 61 | 6e 20 6f 75 74 6c 69 6e |ll get a|n outlin|
|00000ef0| 65 0a 6f 66 20 74 68 65 | 20 73 65 74 20 69 6e 20 |e.of the| set in |
|00000f00| 61 20 76 65 72 79 20 73 | 68 6f 72 74 20 74 69 6d |a very s|hort tim|
|00000f10| 65 2e 0a 0a 20 20 20 20 | 54 69 6d 65 20 66 6f 72 |e... |Time for|
|00000f20| 20 74 68 65 20 62 61 64 | 20 6e 65 77 73 3a 20 69 | the bad| news: i|
|00000f30| 66 20 79 6f 75 20 77 61 | 6e 74 20 61 6e 20 69 6d |f you wa|nt an im|
|00000f40| 61 67 65 20 77 69 74 68 | 20 74 68 65 20 73 61 6d |age with| the sam|
|00000f50| 65 20 72 65 73 6f 6c 75 | 74 69 6f 6e 0a 61 73 20 |e resolu|tion.as |
|00000f60| 6f 6e 65 20 67 65 6e 65 | 72 61 74 65 64 20 77 69 |one gene|rated wi|
|00000f70| 74 68 20 74 68 65 20 73 | 74 61 6e 64 61 72 64 20 |th the s|tandard |
|00000f80| 61 6c 67 6f 72 69 74 68 | 6d 2c 20 74 68 69 73 20 |algorith|m, this |
|00000f90| 61 6c 67 6f 72 69 74 68 | 6d 20 77 69 6c 6c 20 62 |algorith|m will b|
|00000fa0| 65 20 6a 75 73 74 0a 61 | 73 20 73 6c 6f 77 2e 20 |e just.a|s slow. |
|00000fb0| 54 68 69 73 20 69 73 20 | 62 65 63 61 75 73 65 20 |This is |because |
|00000fc0| 74 68 69 73 20 61 6c 67 | 6f 72 69 74 68 6d 20 71 |this alg|orithm q|
|00000fd0| 75 69 63 6b 6c 79 20 65 | 78 63 6c 75 64 65 73 20 |uickly e|xcludes |
|00000fe0| 70 6f 69 6e 74 73 20 74 | 68 61 74 20 61 72 65 0a |points t|hat are.|
|00000ff0| 6e 6f 74 20 70 61 72 74 | 20 6f 66 20 74 68 65 20 |not part| of the |
|00001000| 4d 61 6e 64 65 6c 62 72 | 6f 74 20 73 65 74 2e 20 |Mandelbr|ot set. |
|00001010| 55 6e 66 6f 72 74 75 6e | 61 74 65 6c 79 2c 20 74 |Unfortun|ately, t|
|00001020| 68 65 20 63 61 6c 63 75 | 6c 61 74 69 6f 6e 73 20 |he calcu|lations |
|00001030| 66 6f 72 20 74 68 65 73 | 65 0a 70 6f 69 6e 74 73 |for thes|e.points|
|00001040| 20 77 69 6c 6c 20 75 73 | 75 61 6c 6c 79 20 62 65 | will us|ually be|
|00001050| 20 66 61 73 74 20 73 69 | 6e 63 65 20 74 68 65 79 | fast si|nce they|
|00001060| 20 72 61 70 69 64 6c 79 | 20 64 69 76 65 72 67 65 | rapidly| diverge|
|00001070| 73 20 74 6f 20 69 6e 66 | 69 6e 69 74 79 2e 20 53 |s to inf|inity. S|
|00001080| 6f 20 74 68 65 0a 70 6f | 69 6e 74 73 20 6c 65 66 |o the.po|ints lef|
|00001090| 74 20 74 68 61 74 20 6e | 65 65 64 20 74 6f 20 62 |t that n|eed to b|
|000010a0| 65 20 69 74 65 72 61 74 | 65 64 20 61 72 65 20 61 |e iterat|ed are a|
|000010b0| 6c 6c 20 76 65 72 79 20 | 74 69 6d 65 2d 63 6f 6e |ll very |time-con|
|000010c0| 73 75 6d 69 6e 67 2e 20 | 46 75 72 74 68 65 72 6d |suming. |Furtherm|
|000010d0| 6f 72 65 2c 0a 74 68 69 | 73 20 61 6c 67 6f 72 69 |ore,.thi|s algori|
|000010e0| 74 68 6d 20 63 61 6e 6e | 6f 74 20 70 72 6f 76 69 |thm cann|ot provi|
|000010f0| 64 65 20 74 68 6f 73 65 | 20 67 6f 6f 64 2d 6c 6f |de those| good-lo|
|00001100| 6f 6b 69 6e 67 20 63 6f | 6c 6f 72 20 69 6d 61 67 |oking co|lor imag|
|00001110| 65 73 20 79 6f 75 20 68 | 61 76 65 20 61 6c 6c 0a |es you h|ave all.|
|00001120| 73 65 65 6e 2e 20 49 74 | 20 6f 6e 6c 79 20 70 72 |seen. It| only pr|
|00001130| 6f 76 69 64 65 73 20 69 | 6e 66 6f 72 6d 61 74 69 |ovides i|nformati|
|00001140| 6f 6e 20 77 68 65 74 68 | 65 72 20 61 20 70 6f 69 |on wheth|er a poi|
|00001150| 6e 74 20 69 73 20 69 6e | 20 74 68 65 20 73 65 74 |nt is in| the set|
|00001160| 20 6f 72 20 6e 6f 74 2e | 0a 4f 66 20 63 6f 75 72 | or not.|.Of cour|
|00001170| 73 65 2c 20 6f 6e 20 61 | 20 42 2f 57 20 73 63 72 |se, on a| B/W scr|
|00001180| 65 65 6e 20 74 68 69 73 | 20 77 69 6c 6c 20 75 73 |een this| will us|
|00001190| 75 61 6c 6c 79 20 73 75 | 66 66 69 63 65 2e 20 55 |ually su|ffice. U|
|000011a0| 73 69 6e 67 20 74 68 69 | 73 20 70 72 6f 67 72 61 |sing thi|s progra|
|000011b0| 6d 2c 20 79 6f 75 0a 63 | 61 6e 20 71 75 69 63 6b |m, you.c|an quick|
|000011c0| 6c 79 20 66 69 6e 64 20 | 69 6e 74 65 72 65 73 74 |ly find |interest|
|000011d0| 69 6e 67 20 61 72 65 61 | 73 20 61 6e 64 20 74 68 |ing area|s and th|
|000011e0| 65 6e 20 72 75 6e 20 6f | 66 66 20 74 6f 20 79 6f |en run o|ff to yo|
|000011f0| 75 72 20 63 72 61 79 20 | 61 6e 64 20 66 65 65 64 |ur cray |and feed|
|00001200| 20 74 68 65 0a 63 6f 6f | 72 64 69 6e 61 74 65 73 | the.coo|rdinates|
|00001210| 20 74 6f 20 61 20 73 74 | 61 6e 64 61 72 64 20 4d | to a st|andard M|
|00001220| 61 6e 64 65 6c 62 72 6f | 74 20 61 6c 67 6f 72 69 |andelbro|t algori|
|00001230| 74 68 6d 2e 0a 0a 20 20 | 20 20 49 20 63 65 72 74 |thm... | I cert|
|00001240| 61 69 6e 6c 79 20 64 69 | 64 6e 27 74 20 69 6e 76 |ainly di|dn't inv|
|00001250| 65 6e 74 20 74 68 69 73 | 20 6d 79 73 65 6c 66 2e |ent this| myself.|
|00001260| 20 49 20 75 72 67 65 20 | 79 6f 75 20 74 6f 20 67 | I urge |you to g|
|00001270| 65 74 20 74 68 65 20 62 | 6f 6f 6b 0a 22 54 68 65 |et the b|ook."The|
|00001280| 20 53 63 69 65 6e 63 65 | 20 6f 66 20 46 72 61 63 | Science| of Frac|
|00001290| 74 61 6c 20 49 6d 61 67 | 65 73 22 20 65 64 69 74 |tal Imag|es" edit|
|000012a0| 65 64 20 62 79 20 50 65 | 69 74 67 65 6e 20 61 6e |ed by Pe|itgen an|
|000012b0| 64 20 53 61 75 70 65 2e | 20 53 70 72 69 6e 67 65 |d Saupe.| Springe|
|000012c0| 72 20 56 65 72 6c 61 67 | 2c 0a 49 53 42 4e 20 30 |r Verlag|,.ISBN 0|
|000012d0| 2d 33 38 37 2d 39 36 36 | 30 38 2d 30 2e 20 49 74 |-387-966|08-0. It|
|000012e0| 27 73 20 66 69 6c 6c 65 | 64 20 77 69 74 68 20 67 |'s fille|d with g|
|000012f0| 6f 6f 64 20 73 74 75 66 | 66 20 6c 69 6b 65 20 74 |ood stuf|f like t|
|00001300| 68 69 73 2e 0a 0a 20 20 | 20 20 41 20 70 6f 73 73 |his... | A poss|
|00001310| 69 62 6c 65 20 65 6e 68 | 61 6e 63 65 6d 65 6e 74 |ible enh|ancement|
|00001320| 20 77 6f 75 6c 64 20 62 | 65 20 66 6f 72 20 74 68 | would b|e for th|
|00001330| 65 20 70 72 6f 67 72 61 | 6d 20 74 6f 20 64 72 61 |e progra|m to dra|
|00001340| 77 20 64 69 73 6b 73 20 | 49 4e 53 49 44 45 0a 74 |w disks |INSIDE.t|
|00001350| 68 65 20 4d 61 6e 64 65 | 6c 62 72 6f 74 20 73 65 |he Mande|lbrot se|
|00001360| 74 20 74 6f 6f 2e 20 55 | 6e 66 6f 72 74 75 6e 61 |t too. U|nfortuna|
|00001370| 74 65 6c 79 2c 20 74 68 | 69 73 20 70 72 6f 62 6c |tely, th|is probl|
|00001380| 65 6d 20 69 73 20 71 75 | 69 74 65 20 6e 6f 6e 2d |em is qu|ite non-|
|00001390| 64 65 74 65 72 6d 69 6e | 69 73 74 69 63 0a 61 6e |determin|istic.an|
|000013a0| 64 20 64 6f 65 73 20 6e | 6f 74 20 68 61 76 65 20 |d does n|ot have |
|000013b0| 61 20 73 69 6d 70 6c 65 | 20 73 6f 6c 75 74 69 6f |a simple| solutio|
|000013c0| 6e 2e 20 42 65 73 69 64 | 65 73 2c 20 74 68 65 20 |n. Besid|es, the |
|000013d0| 73 65 74 2c 20 61 74 20 | 6c 61 72 67 65 72 20 6d |set, at |larger m|
|000013e0| 61 67 6e 69 66 69 63 61 | 74 69 6f 6e 73 2c 0a 68 |agnifica|tions,.h|
|000013f0| 61 73 20 61 20 76 65 72 | 79 20 69 6e 74 72 69 63 |as a ver|y intric|
|00001400| 61 74 65 20 73 74 72 75 | 63 74 75 72 65 20 61 6e |ate stru|cture an|
|00001410| 64 20 69 74 20 77 6f 75 | 6c 64 20 70 72 6f 62 61 |d it wou|ld proba|
|00001420| 62 6c 79 20 6e 6f 74 20 | 62 65 20 70 6f 73 73 69 |bly not |be possi|
|00001430| 62 6c 65 20 74 6f 0a 64 | 72 61 77 20 61 6e 79 20 |ble to.d|raw any |
|00001440| 6c 61 72 67 65 20 64 69 | 73 6b 73 20 69 6e 73 69 |large di|sks insi|
|00001450| 64 65 20 69 74 2e 0a 0a | 20 20 20 20 49 20 72 65 |de it...| I re|
|00001460| 66 65 72 20 79 6f 75 20 | 74 6f 20 74 68 65 20 6d |fer you |to the m|
|00001470| 61 6e 2d 70 61 67 65 20 | 66 6f 72 20 6d 6f 72 65 |an-page |for more|
|00001480| 20 69 6e 73 74 72 75 63 | 74 69 6f 6e 73 20 61 62 | instruc|tions ab|
|00001490| 6f 75 74 20 72 75 6e 6e | 69 6e 67 20 74 68 65 20 |out runn|ing the |
|000014a0| 73 74 75 66 66 2e 0a 54 | 6f 20 67 65 74 20 67 6f |stuff..T|o get go|
|000014b0| 69 6e 67 2c 20 6a 75 73 | 74 20 68 69 74 20 74 68 |ing, jus|t hit th|
|000014c0| 65 20 44 52 41 57 20 62 | 75 74 74 6f 6e 20 61 73 |e DRAW b|utton as|
|000014d0| 20 73 6f 6f 6e 20 61 73 | 20 69 74 20 73 74 61 72 | soon as| it star|
|000014e0| 74 73 2e 0a 0a 20 20 20 | 20 59 6f 75 20 77 69 6c |ts... | You wil|
|000014f0| 6c 20 70 72 6f 62 61 62 | 6c 79 20 73 65 65 20 61 |l probab|ly see a|
|00001500| 20 6c 6f 74 20 6f 66 20 | 69 6e 65 66 66 69 63 69 | lot of |ineffici|
|00001510| 65 6e 74 20 63 6f 64 69 | 6e 67 2c 20 65 2e 67 2e |ent codi|ng, e.g.|
|00001520| 20 75 73 69 6e 67 20 61 | 72 72 61 79 0a 73 75 62 | using a|rray.sub|
|00001530| 73 63 72 69 70 74 69 6e | 67 20 69 6e 73 74 65 61 |scriptin|g instea|
|00001540| 64 20 6f 66 20 70 6f 69 | 6e 74 65 72 73 20 65 74 |d of poi|nters et|
|00001550| 63 2e 20 4c 65 74 20 6d | 65 20 6a 75 73 74 20 73 |c. Let m|e just s|
|00001560| 61 79 20 74 68 61 74 20 | 70 72 6f 66 69 6c 69 6e |ay that |profilin|
|00001570| 67 20 73 68 6f 77 73 0a | 74 68 61 74 20 77 69 74 |g shows.|that wit|
|00001580| 68 6f 75 74 20 74 68 65 | 20 53 75 6e 2d 73 70 65 |hout the| Sun-spe|
|00001590| 63 69 66 69 63 20 73 74 | 75 66 66 2c 20 69 74 20 |cific st|uff, it |
|000015a0| 63 61 6e 20 73 70 65 6e | 64 20 61 73 20 6d 75 63 |can spen|d as muc|
|000015b0| 68 20 61 73 20 39 38 25 | 20 6f 66 20 74 68 65 0a |h as 98%| of the.|
|000015c0| 74 69 6d 65 20 69 6e 20 | 74 68 65 20 4d 53 65 74 |time in |the MSet|
|000015d0| 44 69 73 74 20 72 6f 75 | 74 69 6e 65 20 28 6d 6f |Dist rou|tine (mo|
|000015e0| 73 74 20 6f 66 20 77 68 | 69 63 68 20 61 72 65 20 |st of wh|ich are |
|000015f0| 66 6c 6f 61 74 69 6e 67 | 2d 70 6f 69 6e 74 0a 63 |floating|-point.c|
|00001600| 61 6c 63 75 6c 61 74 69 | 6f 6e 73 29 2e 2e 2e 20 |alculati|ons)... |
|00001610| 54 68 61 74 20 69 73 20 | 77 68 79 20 49 20 68 61 |That is |why I ha|
|00001620| 76 65 20 6b 65 70 74 20 | 74 68 65 20 69 6e 65 66 |ve kept |the inef|
|00001630| 66 69 63 69 65 6e 74 2c | 20 62 75 74 20 6d 6f 72 |ficient,| but mor|
|00001640| 65 0a 72 65 61 64 61 62 | 6c 65 2c 20 63 6f 64 65 |e.readab|le, code|
|00001650| 2e 20 55 73 69 6e 67 20 | 47 43 43 2c 20 79 6f 75 |. Using |GCC, you|
|00001660| 20 63 61 6e 6e 6f 74 20 | 61 63 68 69 76 65 20 6d | cannot |achive m|
|00001670| 75 63 68 20 62 65 74 74 | 65 72 20 73 70 65 65 64 |uch bett|er speed|
|00001680| 20 68 61 6e 64 2d 63 6f | 64 69 6e 67 0a 4d 53 65 | hand-co|ding.MSe|
|00001690| 74 44 69 73 74 20 69 6e | 20 61 73 73 65 6d 62 6c |tDist in| assembl|
|000016a0| 65 72 2c 20 62 75 74 20 | 79 6f 75 20 61 72 65 20 |er, but |you are |
|000016b0| 77 65 6c 63 6f 6d 65 20 | 74 6f 20 74 72 79 2e 2e |welcome |to try..|
|000016c0| 2e 0a 0a 20 20 20 20 46 | 69 6e 61 6c 6c 79 2c 20 |... F|inally, |
|000016d0| 64 6f 6e 27 74 20 66 6c | 61 6d 65 20 6d 65 20 66 |don't fl|ame me f|
|000016e0| 6f 72 20 74 68 65 20 63 | 6f 64 69 6e 67 2e 20 49 |or the c|oding. I|
|000016f0| 20 6a 75 73 74 20 77 61 | 6e 74 65 64 20 74 6f 20 | just wa|nted to |
|00001700| 74 72 79 20 74 68 69 73 | 0a 61 6c 67 6f 72 69 74 |try this|.algorit|
|00001710| 68 6d 2c 20 61 6e 64 20 | 77 68 69 70 70 65 64 20 |hm, and |whipped |
|00001720| 74 6f 67 65 74 68 65 72 | 20 61 20 64 65 6d 6f 6e |together| a demon|
|00001730| 73 74 72 61 74 69 6f 6e | 20 70 72 6f 67 72 61 6d |stration| program|
|00001740| 20 75 73 69 6e 67 20 70 | 61 72 74 73 20 66 72 6f | using p|arts fro|
|00001750| 6d 0a 6f 74 68 65 72 20 | 70 72 6f 67 72 61 6d 73 |m.other |programs|
|00001760| 20 69 6e 20 61 20 76 65 | 72 79 20 73 68 6f 72 74 | in a ve|ry short|
|00001770| 20 74 69 6d 65 2e 20 53 | 70 65 63 69 66 69 63 61 | time. S|pecifica|
|00001780| 6c 6c 79 3a 20 64 6f 6e | 27 74 20 72 75 6e 20 69 |lly: don|'t run i|
|00001790| 74 20 74 68 72 6f 75 67 | 68 20 6c 69 6e 74 21 0a |t throug|h lint!.|
|000017a0| 28 49 20 68 61 76 65 6e | 27 74 20 3a 2d 29 2e 20 |(I haven|'t :-). |
|000017b0| 49 20 64 6f 6e 27 74 20 | 68 61 76 65 20 74 68 65 |I don't |have the|
|000017c0| 20 74 69 6d 65 20 74 6f | 20 77 6f 72 6b 20 6f 6e | time to| work on|
|000017d0| 20 74 68 69 73 20 61 6e | 79 6d 6f 72 65 20 62 75 | this an|ymore bu|
|000017e0| 74 20 49 20 74 68 6f 75 | 67 68 74 0a 74 68 69 73 |t I thou|ght.this|
|000017f0| 20 77 61 73 20 69 6e 74 | 65 72 65 73 74 69 6e 67 | was int|eresting|
|00001800| 20 65 6e 6f 75 67 68 20 | 74 6f 20 77 61 72 72 61 | enough |to warra|
|00001810| 6e 74 20 70 6f 73 74 69 | 6e 67 2e 0a 0a 20 20 20 |nt posti|ng... |
|00001820| 20 4f 6e 65 20 74 68 69 | 6e 67 20 49 20 77 6f 75 | One thi|ng I wou|
|00001830| 6c 64 20 72 65 61 6c 6c | 79 20 6c 6f 76 65 20 69 |ld reall|y love i|
|00001840| 73 20 61 6e 20 58 20 76 | 65 72 73 69 6f 6e 20 6f |s an X v|ersion o|
|00001850| 66 20 74 68 69 73 20 28 | 68 69 6e 74 2c 20 68 69 |f this (|hint, hi|
|00001860| 6e 74 21 29 2e 0a 50 6f | 6f 72 20 6d 65 20 6f 6e |nt!)..Po|or me on|
|00001870| 6c 79 20 6b 6e 6f 77 73 | 20 74 68 65 20 77 6f 72 |ly knows| the wor|
|00001880| 6b 69 6e 67 73 20 6f 66 | 20 53 75 6e 56 69 65 77 |kings of| SunView|
|00001890| 2e 2e 2e 20 3a 2d 28 0a | 0a 48 61 76 65 20 66 75 |... :-(.|.Have fu|
|000018a0| 6e 21 0a 0a 20 20 20 20 | 2f 50 65 6c 6c 0a 2d 2d |n!.. |/Pell.--|
|000018b0| 0a 22 44 6f 6e 27 74 20 | 74 68 69 6e 6b 3b 20 6c |."Don't |think; l|
|000018c0| 65 74 20 74 68 65 20 6d | 61 63 68 69 6e 65 20 64 |et the m|achine d|
|000018d0| 6f 20 69 74 20 66 6f 72 | 20 79 6f 75 21 22 0a 20 |o it for| you!". |
|000018e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000018f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001900| 20 20 2d 2d 20 45 2e 20 | 43 2e 20 42 65 72 6b 65 | -- E. |C. Berke|
|00001910| 6c 65 79 0a 44 65 70 74 | 2e 20 6f 66 20 45 6c 65 |ley.Dept|. of Ele|
|00001920| 63 74 72 69 63 61 6c 20 | 45 6e 67 69 6e 65 65 72 |ctrical |Engineer|
|00001930| 69 6e 67 09 20 20 20 20 | 20 20 20 20 20 3d 3d 3d |ing. | ===|
|00001940| 3d 3e 3e 3e 20 20 20 20 | 70 65 6c 6c 40 69 73 79 |=>>> |pell@isy|
|00001950| 2e 6c 69 75 2e 73 65 0a | 55 6e 69 76 65 72 73 69 |.liu.se.|Universi|
|00001960| 74 79 20 6f 66 20 4c 69 | 6e 6b 6f 70 69 6e 67 2c |ty of Li|nkoping,|
|00001970| 20 53 77 65 64 65 6e 09 | 20 20 20 20 20 2e 2e 2e | Sweden.| ...|
|00001980| 21 75 75 6e 65 74 21 65 | 6e 65 61 21 69 73 79 2e |!uunet!e|nea!isy.|
|00001990| 6c 69 75 2e 73 65 21 70 | 65 6c 6c 0a 00 00 00 00 |liu.se!p|ell.....|
|000019a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a00| 6d 61 6e 64 65 6c 62 72 | 6f 74 2f 4d 61 6b 65 66 |mandelbr|ot/Makef|
|00001a10| 69 6c 65 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |ile.....|........|
|00001a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a60| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00001a70| 34 33 20 00 20 20 20 20 | 31 33 20 00 20 20 20 20 |43 . |13 . |
|00001a80| 20 20 20 31 31 37 32 20 | 20 34 34 30 35 35 33 33 | 1172 | 4405533|
|00001a90| 31 32 30 20 20 20 37 36 | 36 36 00 20 00 00 00 00 |120 76|66. ....|
|00001aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c00| 4c 49 42 53 20 3d 20 2d | 6c 6d 20 2d 6c 73 75 6e |LIBS = -|lm -lsun|
|00001c10| 74 6f 6f 6c 20 2d 6c 73 | 75 6e 77 69 6e 64 6f 77 |tool -ls|unwindow|
|00001c20| 20 2d 6c 70 69 78 72 65 | 63 74 0a 0a 23 20 43 68 | -lpixre|ct..# Ch|
|00001c30| 6f 6f 73 65 20 74 68 65 | 20 63 6f 6d 70 69 6c 65 |oose the| compile|
|00001c40| 20 6c 69 6e 65 20 74 68 | 61 74 20 73 75 69 74 73 | line th|at suits|
|00001c50| 20 79 6f 75 20 62 65 73 | 74 2e 0a 23 20 4e 6f 74 | you bes|t..# Not|
|00001c60| 65 20 74 68 61 74 20 63 | 63 20 2d 4f 34 20 67 69 |e that c|c -O4 gi|
|00001c70| 76 65 73 20 32 35 25 20 | 66 61 73 74 65 72 20 63 |ves 25% |faster c|
|00001c80| 6f 64 65 20 74 68 61 74 | 20 67 63 63 20 31 2e 33 |ode that| gcc 1.3|
|00001c90| 30 2e 20 49 27 6d 20 6e | 6f 74 20 73 75 72 65 20 |0. I'm n|ot sure |
|00001ca0| 77 68 79 2e 0a 23 20 49 | 66 20 79 6f 75 20 68 61 |why..# I|f you ha|
|00001cb0| 76 65 20 61 20 6c 61 74 | 65 72 20 76 65 72 73 69 |ve a lat|er versi|
|00001cc0| 6f 6e 20 79 6f 75 20 6d | 61 79 20 77 61 6e 74 20 |on you m|ay want |
|00001cd0| 74 6f 20 74 72 79 20 67 | 63 63 20 61 6e 79 77 61 |to try g|cc anywa|
|00001ce0| 79 2c 20 70 65 72 68 61 | 70 73 0a 23 20 77 69 74 |y, perha|ps.# wit|
|00001cf0| 68 20 66 61 6e 63 69 65 | 72 20 6f 70 74 69 6d 69 |h fancie|r optimi|
|00001d00| 7a 61 74 69 6f 6e 73 2e | 2e 2e 0a 0a 46 61 73 74 |zations.|....Fast|
|00001d10| 4d 74 6f 6f 6c 3a 20 46 | 61 73 74 4d 74 6f 6f 6c |Mtool: F|astMtool|
|00001d20| 2e 63 0a 23 20 47 43 43 | 2c 20 53 75 6e 2d 33 20 |.c.# GCC|, Sun-3 |
|00001d30| 77 69 74 68 20 36 38 38 | 38 31 20 6d 61 74 68 20 |with 688|81 math |
|00001d40| 63 68 69 70 2e 0a 23 09 | 67 63 63 20 2d 4f 20 2d |chip..#.|gcc -O -|
|00001d50| 74 72 61 64 69 74 69 6f | 6e 61 6c 20 2d 6d 36 38 |traditio|nal -m68|
|00001d60| 38 38 31 20 2d 6f 20 46 | 61 73 74 4d 74 6f 6f 6c |881 -o F|astMtool|
|00001d70| 20 46 61 73 74 4d 74 6f | 6f 6c 2e 63 20 24 28 4c | FastMto|ol.c $(L|
|00001d80| 49 42 53 29 0a 23 20 53 | 75 6e 2d 33 20 77 69 74 |IBS).# S|un-3 wit|
|00001d90| 68 20 53 75 6e 4f 53 20 | 34 2c 20 36 38 38 38 31 |h SunOS |4, 68881|
|00001da0| 20 6d 61 74 68 20 63 68 | 69 70 3a 0a 09 63 63 20 | math ch|ip:..cc |
|00001db0| 2d 4f 34 20 2d 66 36 38 | 38 38 31 20 2d 6f 20 46 |-O4 -f68|881 -o F|
|00001dc0| 61 73 74 4d 74 6f 6f 6c | 20 46 61 73 74 4d 74 6f |astMtool| FastMto|
|00001dd0| 6f 6c 2e 63 20 24 28 4c | 49 42 53 29 0a 23 20 53 |ol.c $(L|IBS).# S|
|00001de0| 75 6e 2d 34 20 77 69 74 | 68 20 53 75 6e 4f 53 20 |un-4 wit|h SunOS |
|00001df0| 34 3a 0a 23 09 63 63 20 | 2d 4f 34 20 2d 6f 20 46 |4:.#.cc |-O4 -o F|
|00001e00| 61 73 74 4d 74 6f 6f 6c | 20 46 61 73 74 4d 74 6f |astMtool| FastMto|
|00001e10| 6f 6c 2e 63 20 24 28 4c | 49 42 53 29 0a 23 20 4f |ol.c $(L|IBS).# O|
|00001e20| 74 68 65 72 20 73 75 6e | 73 2c 20 63 6f 6e 66 69 |ther sun|s, confi|
|00001e30| 67 75 72 65 20 66 6f 72 | 20 6d 61 78 69 6d 75 6d |gure for| maximum|
|00001e40| 20 73 70 65 65 64 20 79 | 6f 75 72 73 65 6c 66 3a | speed y|ourself:|
|00001e50| 0a 23 09 63 63 20 2d 4f | 20 2d 6f 20 46 61 73 74 |.#.cc -O| -o Fast|
|00001e60| 4d 74 6f 6f 6c 20 46 61 | 73 74 4d 74 6f 6f 6c 2e |Mtool Fa|stMtool.|
|00001e70| 63 20 24 28 4c 49 42 53 | 29 0a 35 30 2c 20 33 2f |c $(LIBS|).50, 3/|
|00001e80| 37 35 2c 20 33 2f 31 31 | 30 20 77 69 74 68 20 46 |75, 3/11|0 with F|
|00001e90| 50 41 2c 20 33 2f 32 38 | 30 2c 20 34 2f 31 31 30 |PA, 3/28|0, 4/110|
|00001ea0| 0a 61 6e 64 20 34 2f 32 | 38 30 2c 20 61 6c 6c 20 |.and 4/2|80, all |
|00001eb0| 75 73 69 6e 67 20 53 75 | 6e 4f 53 20 34 2e 30 28 |using Su|nOS 4.0(|
|00001ec0| 2e 31 29 2e 20 48 6f 70 | 65 66 75 6c 6c 79 20 69 |.1). Hop|efully i|
|00001ed0| 74 20 73 68 6f 75 6c 64 | 20 77 6f 72 6b 20 6f 6e |t should| work on|
|00001ee0| 20 6f 74 68 65 72 73 20 | 74 6f 6f 2e 0a 0a 20 20 | others |too... |
|00001ef0| 20 20 53 6f 20 68 6f 77 | 20 64 6f 65 73 20 69 74 | So how| does it|
|00001f00| 20 77 6f 72 6b 3f 20 57 | 65 6c 6c 2c 20 75 73 69 | work? W|ell, usi|
|00001f10| 6e 67 20 73 6f 6d 65 20 | 69 6e 74 72 69 63 61 74 |ng some |intricat|
|00001f20| 65 20 6d 61 74 68 65 6d | 61 74 69 63 73 20 79 6f |e mathem|atics yo|
|00001f30| 75 20 63 61 6e 0a 61 72 | 72 69 76 65 20 61 74 20 |u can.ar|rive at |
|00001f40| 61 6e 20 65 71 75 61 74 | 69 6f 6e 20 74 68 61 74 |an equat|ion that|
|00001f50| 20 65 73 74 69 6d 61 74 | 65 73 20 74 68 65 20 64 | estimat|es the d|
|00001f60| 69 73 74 61 6e 63 65 20 | 66 72 6f 6d 20 61 20 70 |istance |from a p|
|00001f70| 6f 69 6e 74 20 6f 75 74 | 73 69 64 65 20 74 68 65 |oint out|side the|
|00001f80| 0a 4d 61 6e 64 65 6c 62 | 72 6f 74 20 73 65 74 20 |.Mandelb|rot set |
|00001f90| 74 6f 20 74 68 65 20 6e | 65 61 72 65 73 74 20 70 |to the n|earest p|
|00001fa0| 6f 69 6e 74 20 49 4e 20 | 74 68 65 20 73 65 74 2e |oint IN |the set.|
|00001fb0| 20 55 73 69 6e 67 20 74 | 68 69 73 20 6b 6e 6f 77 | Using t|his know|
|00001fc0| 6c 65 64 67 65 2c 20 69 | 74 27 73 0a 70 6f 73 73 |ledge, i|t's.poss|
|00001fd0| 69 62 6c 65 20 74 6f 20 | 65 78 63 6c 75 64 65 20 |ible to |exclude |
|00001fe0| 61 6c 6c 20 70 6f 69 6e | 74 73 20 6c 79 69 6e 67 |all poin|ts lying|
|00001ff0| 20 69 6e 73 69 64 65 20 | 61 20 64 69 73 6b 20 77 | inside |a disk w|
|00002000| 6d 61 6e 64 65 6c 62 72 | 6f 74 2f 46 61 73 74 4d |mandelbr|ot/FastM|
|00002010| 74 6f 6f 6c 2e 31 00 00 | 00 00 00 00 00 00 00 00 |tool.1..|........|
|00002020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002060| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00002070| 34 33 20 00 20 20 20 20 | 31 33 20 00 20 20 20 20 |43 . |13 . |
|00002080| 20 20 20 35 32 34 35 20 | 20 34 34 30 35 35 33 33 | 5245 | 4405533|
|00002090| 31 32 33 20 20 31 30 32 | 33 30 00 20 00 00 00 00 |123 102|30. ....|
|000020a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002200| 2e 54 48 20 46 61 73 74 | 4d 74 6f 6f 6c 20 31 20 |.TH Fast|Mtool 1 |
|00002210| 22 31 39 38 39 20 46 65 | 62 72 75 61 72 79 20 32 |"1989 Fe|bruary 2|
|00002220| 35 22 0a 2e 55 43 20 34 | 0a 2e 53 48 20 4e 41 4d |5"..UC 4|..SH NAM|
|00002230| 45 0a 46 61 73 74 4d 74 | 6f 6f 6c 20 5c 2d 20 45 |E.FastMt|ool \- E|
|00002240| 78 70 6c 6f 72 65 20 74 | 68 65 20 4d 61 6e 64 65 |xplore t|he Mande|
|00002250| 6c 62 72 6f 74 20 73 65 | 74 20 75 6e 64 65 72 20 |lbrot se|t under |
|00002260| 53 75 6e 56 69 65 77 28 | 31 29 0a 2e 53 48 20 53 |SunView(|1)..SH S|
|00002270| 59 4e 4f 50 53 49 53 0a | 2e 42 20 46 61 73 74 4d |YNOPSIS.|.B FastM|
|00002280| 74 6f 6f 6c 0a 2e 53 48 | 20 44 45 53 43 52 49 50 |tool..SH| DESCRIP|
|00002290| 54 49 4f 4e 0a 2e 49 20 | 46 61 73 74 4d 74 6f 6f |TION..I |FastMtoo|
|000022a0| 6c 0a 75 73 65 73 20 61 | 20 6e 65 77 20 61 6c 67 |l.uses a| new alg|
|000022b0| 6f 72 69 74 68 6d 2c 20 | 70 72 65 73 65 6e 74 65 |orithm, |presente|
|000022c0| 64 20 69 6e 20 74 68 65 | 20 62 6f 6f 6b 0a 2e 42 |d in the| book..B|
|000022d0| 0a 22 54 68 65 20 53 63 | 69 65 6e 63 65 20 6f 66 |."The Sc|ience of|
|000022e0| 20 46 72 61 63 74 61 6c | 20 49 6d 61 67 65 73 22 | Fractal| Images"|
|000022f0| 0a 70 75 62 6c 69 73 68 | 65 64 20 62 79 20 53 70 |.publish|ed by Sp|
|00002300| 72 69 6e 67 65 72 20 56 | 65 72 6c 61 67 2e 20 54 |ringer V|erlag. T|
|00002310| 68 69 73 20 61 6c 67 6f | 72 69 74 68 6d 20 69 73 |his algo|rithm is|
|00002320| 20 77 65 6c 6c 20 73 75 | 69 74 65 64 20 74 6f 20 | well su|ited to |
|00002330| 69 6e 74 65 72 61 63 74 | 69 76 65 0a 65 78 70 6c |interact|ive.expl|
|00002340| 6f 72 61 74 69 6f 6e 73 | 2c 20 70 72 6f 76 69 64 |orations|, provid|
|00002350| 69 6e 67 20 61 20 72 6f | 75 67 68 20 6f 75 74 6c |ing a ro|ugh outl|
|00002360| 69 6e 65 20 6f 66 20 74 | 68 65 20 4d 61 6e 64 65 |ine of t|he Mande|
|00002370| 6c 62 72 6f 74 20 73 65 | 74 20 76 65 72 79 20 71 |lbrot se|t very q|
|00002380| 75 69 63 6b 6c 79 2e 0a | 55 73 69 6e 67 20 74 68 |uickly..|Using th|
|00002390| 65 20 6d 6f 75 73 65 2c | 20 79 6f 75 20 63 61 6e |e mouse,| you can|
|000023a0| 20 74 68 65 6e 20 73 65 | 6c 65 63 74 20 61 6e 64 | then se|lect and|
|000023b0| 20 65 6e 6c 61 72 67 65 | 20 69 6e 74 65 72 65 73 | enlarge| interes|
|000023c0| 74 69 6e 67 20 72 65 67 | 69 6f 6e 73 2e 0a 2e 50 |ting reg|ions...P|
|000023d0| 50 0a 2e 42 20 43 6f 6e | 74 72 6f 6c 73 3a 0a 2e |P..B Con|trols:..|
|000023e0| 50 50 0a 54 68 65 72 65 | 20 61 72 65 20 74 68 72 |PP.There| are thr|
|000023f0| 65 65 20 73 6c 69 64 65 | 72 73 2e 20 54 68 65 69 |ee slide|rs. Thei|
|00002400| 72 20 66 75 6e 63 74 69 | 6f 6e 73 20 61 72 65 3a |r functi|ons are:|
|00002410| 0a 2e 49 50 20 52 65 63 | 75 72 0a 41 66 66 65 63 |..IP Rec|ur.Affec|
|00002420| 74 73 20 74 68 65 20 72 | 65 63 75 72 73 69 76 65 |ts the r|ecursive|
|00002430| 20 70 61 72 74 20 6f 66 | 20 74 68 65 20 61 6c 67 | part of| the alg|
|00002440| 6f 72 69 74 68 6d 2e 0a | 2e 49 20 52 65 63 75 72 |orithm..|.I Recur|
|00002450| 0a 69 73 20 74 68 65 20 | 6d 69 6e 69 6d 75 6d 20 |.is the |minimum |
|00002460| 64 69 73 74 61 6e 63 65 | 20 74 6f 20 74 68 65 20 |distance| to the |
|00002470| 4d 61 6e 64 65 6c 62 72 | 6f 74 20 73 65 74 20 61 |Mandelbr|ot set a|
|00002480| 74 20 77 68 69 63 68 20 | 74 68 65 20 72 65 63 75 |t which |the recu|
|00002490| 72 73 69 6f 6e 0a 73 68 | 6f 75 6c 64 20 73 74 6f |rsion.sh|ould sto|
|000024a0| 70 2e 20 49 2e 65 2e 20 | 69 66 0a 2e 49 20 52 65 |p. I.e. |if..I Re|
|000024b0| 63 75 72 0a 69 73 20 65 | 71 75 61 6c 20 74 6f 20 |cur.is e|qual to |
|000024c0| 31 30 20 74 68 65 6e 20 | 74 68 65 20 72 65 63 75 |10 then |the recu|
|000024d0| 72 73 69 76 65 20 70 61 | 72 74 20 6f 66 20 74 68 |rsive pa|rt of th|
|000024e0| 65 20 61 6c 67 6f 72 69 | 74 68 6d 20 77 69 6c 6c |e algori|thm will|
|000024f0| 20 6e 65 76 65 72 20 74 | 72 79 0a 74 6f 20 67 65 | never t|ry.to ge|
|00002500| 74 20 63 6c 6f 73 65 72 | 20 74 68 61 6e 20 31 30 |t closer| than 10|
|00002510| 20 70 69 78 65 6c 73 20 | 74 6f 20 74 68 65 20 73 | pixels |to the s|
|00002520| 65 74 2e 20 35 20 69 73 | 20 70 72 6f 62 61 62 6c |et. 5 is| probabl|
|00002530| 79 20 61 20 67 6f 6f 64 | 20 76 61 6c 75 65 0a 74 |y a good| value.t|
|00002540| 6f 20 73 74 61 72 74 20 | 77 69 74 68 2e 0a 2e 49 |o start |with...I|
|00002550| 50 20 49 6e 63 72 65 6d | 65 6e 74 0a 41 66 66 65 |P Increm|ent.Affe|
|00002560| 63 74 73 20 74 68 65 20 | 69 74 65 72 61 74 69 76 |cts the |iterativ|
|00002570| 65 20 70 61 72 74 20 6f | 66 20 74 68 65 20 61 6c |e part o|f the al|
|00002580| 67 6f 72 69 74 68 6d 2e | 20 54 68 65 20 61 6c 67 |gorithm.| The alg|
|00002590| 6f 72 69 74 68 6d 20 73 | 74 61 72 74 73 20 62 79 |orithm s|tarts by|
|000025a0| 20 73 63 61 6e 6e 69 6e | 67 0a 74 68 65 20 69 6d | scannin|g.the im|
|000025b0| 61 67 65 20 6c 69 6e 65 | 20 61 66 74 65 72 20 6c |age line| after l|
|000025c0| 69 6e 65 2c 20 70 69 78 | 65 6c 20 66 6f 72 20 70 |ine, pix|el for p|
|000025d0| 69 78 65 6c 2e 20 57 68 | 65 6e 20 69 74 20 68 69 |ixel. Wh|en it hi|
|000025e0| 74 73 20 61 20 70 69 78 | 65 6c 20 6e 6f 74 20 70 |ts a pix|el not p|
|000025f0| 61 72 74 0a 6f 66 20 74 | 68 65 20 73 65 74 2c 20 |art.of t|he set, |
|00002600| 69 74 20 69 6e 76 6f 6b | 65 73 20 74 68 65 20 72 |it invok|es the r|
|00002610| 65 63 75 72 73 69 76 65 | 20 61 6c 67 6f 72 69 74 |ecursive| algorit|
|00002620| 68 6d 2e 20 54 68 65 6e | 20 69 74 20 63 6f 6e 74 |hm. Then| it cont|
|00002630| 69 6e 75 65 73 20 73 63 | 61 6e 6e 69 6e 67 2e 0a |inues sc|anning..|
|00002640| 0a 49 66 0a 2e 49 20 49 | 6e 63 72 65 6d 65 6e 74 |.If..I I|ncrement|
|00002650| 0a 69 73 20 73 65 74 20 | 65 2e 67 2e 20 74 6f 20 |.is set |e.g. to |
|00002660| 35 2c 20 74 68 65 6e 20 | 6f 6e 6c 79 20 65 76 65 |5, then |only eve|
|00002670| 72 79 20 35 3a 74 68 20 | 6c 69 6e 65 20 61 6e 64 |ry 5:th |line and|
|00002680| 20 70 69 78 65 6c 20 77 | 69 6c 6c 20 62 65 20 73 | pixel w|ill be s|
|00002690| 63 61 6e 6e 65 64 2c 0a | 72 65 64 75 63 69 6e 67 |canned,.|reducing|
|000026a0| 20 74 68 65 20 74 69 6d | 65 20 32 35 2d 66 6f 6c | the tim|e 25-fol|
|000026b0| 64 2e 0a 2e 49 50 20 4d | 61 78 69 74 65 72 0a 54 |d...IP M|axiter.T|
|000026c0| 68 69 73 20 64 65 74 65 | 72 6d 69 6e 65 73 20 68 |his dete|rmines h|
|000026d0| 6f 77 20 6d 61 6e 79 20 | 69 74 65 72 61 74 69 6f |ow many |iteratio|
|000026e0| 6e 73 20 61 72 65 20 72 | 65 71 75 69 72 65 64 20 |ns are r|equired |
|000026f0| 62 65 66 6f 72 65 20 61 | 20 70 69 78 65 6c 20 69 |before a| pixel i|
|00002700| 73 20 63 6f 6e 73 69 64 | 65 72 65 64 0a 70 61 72 |s consid|ered.par|
|00002710| 74 20 6f 66 20 74 68 65 | 20 73 65 74 2e 20 4f 6e |t of the| set. On|
|00002720| 65 20 63 61 6e 20 76 69 | 65 77 20 74 68 69 73 20 |e can vi|ew this |
|00002730| 70 61 72 61 6d 65 74 65 | 72 20 61 73 20 74 68 65 |paramete|r as the|
|00002740| 20 22 66 6f 63 75 73 69 | 6e 67 22 2e 20 54 68 69 | "focusi|ng". Thi|
|00002750| 73 20 70 61 72 61 6d 65 | 74 65 72 0a 6e 65 65 64 |s parame|ter.need|
|00002760| 73 20 74 6f 20 62 65 20 | 69 6e 63 72 65 61 73 65 |s to be |increase|
|00002770| 64 20 61 73 20 74 68 65 | 20 6d 61 67 6e 69 66 69 |d as the| magnifi|
|00002780| 63 61 74 69 6f 6e 20 69 | 6e 63 72 65 61 73 65 73 |cation i|ncreases|
|00002790| 2e 20 49 66 20 69 74 20 | 69 73 20 73 65 74 20 74 |. If it |is set t|
|000027a0| 6f 6f 20 6c 6f 77 0a 79 | 6f 75 20 77 69 6c 6c 20 |oo low.y|ou will |
|000027b0| 6e 6f 74 20 67 65 74 20 | 61 6e 79 20 64 65 74 61 |not get |any deta|
|000027c0| 69 6c 73 20 69 6e 20 74 | 68 65 20 69 6d 61 67 65 |ils in t|he image|
|000027d0| 3b 20 74 6f 6f 20 6d 61 | 6e 79 20 70 69 78 65 6c |; too ma|ny pixel|
|000027e0| 73 20 77 69 6c 6c 20 65 | 72 72 6f 6e 65 6f 75 73 |s will e|rroneous|
|000027f0| 6c 79 0a 62 65 20 63 6f | 6e 73 69 64 65 72 65 64 |ly.be co|nsidered|
|00002800| 20 70 61 72 74 20 6f 66 | 20 74 68 65 20 73 65 74 | part of| the set|
|00002810| 2e 20 49 6e 63 72 65 61 | 73 69 6e 67 20 74 68 69 |. Increa|sing thi|
|00002820| 73 20 61 6c 73 6f 20 69 | 6e 63 72 65 61 73 65 73 |s also i|ncreases|
|00002830| 20 74 68 65 20 74 69 6d | 65 2e 0a 45 78 70 65 72 | the tim|e..Exper|
|00002840| 69 6d 65 6e 74 21 0a 2e | 50 50 0a 2e 42 20 42 75 |iment!..|PP..B Bu|
|00002850| 74 74 6f 6e 73 3a 0a 2e | 50 50 0a 54 68 65 72 65 |ttons:..|PP.There|
|00002860| 20 61 72 65 20 66 6f 75 | 72 20 62 75 74 74 6f 6e | are fou|r button|
|00002870| 73 3a 0a 2e 49 50 20 44 | 52 41 57 0a 44 72 61 77 |s:..IP D|RAW.Draw|
|00002880| 73 20 61 20 6e 65 77 20 | 69 6d 61 67 65 2e 20 49 |s a new |image. I|
|00002890| 66 20 79 6f 75 20 68 61 | 76 65 6e 27 74 20 73 65 |f you ha|ven't se|
|000028a0| 6c 65 63 74 65 64 20 6e | 65 77 20 63 6f 6f 72 64 |lected n|ew coord|
|000028b0| 69 6e 61 74 65 73 20 74 | 68 65 20 6f 6c 64 20 69 |inates t|he old i|
|000028c0| 6d 61 67 65 0a 69 73 20 | 72 65 64 72 61 77 6e 2c |mage.is |redrawn,|
|000028d0| 20 70 65 72 68 61 70 73 | 20 77 69 74 68 20 6e 65 | perhaps| with ne|
|000028e0| 77 20 70 61 72 61 6d 65 | 74 65 72 73 2e 0a 2e 49 |w parame|ters...I|
|000028f0| 50 20 55 50 0a 52 65 74 | 75 72 6e 73 20 79 6f 75 |P UP.Ret|urns you|
|00002900| 20 74 6f 20 79 6f 75 72 | 20 70 72 65 76 69 6f 75 | to your| previou|
|00002910| 73 20 69 6d 61 67 65 2c | 20 62 65 66 6f 72 65 20 |s image,| before |
|00002920| 74 68 65 20 6c 61 73 74 | 0a 2e 49 20 44 52 41 57 |the last|..I DRAW|
|00002930| 0a 77 69 74 68 20 6e 65 | 77 20 63 6f 6f 72 64 69 |.with ne|w coordi|
|00002940| 6e 61 74 65 73 2e 0a 2e | 49 50 20 53 54 4f 50 0a |nates...|IP STOP.|
|00002950| 45 6d 65 72 67 65 6e 63 | 79 20 73 74 6f 70 2e 20 |Emergenc|y stop. |
|00002960| 49 74 27 73 20 6f 6e 6c | 79 20 70 6f 73 73 69 62 |It's onl|y possib|
|00002970| 6c 65 20 74 6f 20 73 74 | 6f 70 20 74 68 65 20 69 |le to st|op the i|
|00002980| 74 65 72 61 74 69 76 65 | 20 72 65 66 69 6e 65 6d |terative| refinem|
|00002990| 65 6e 74 2e 20 54 68 65 | 0a 72 65 63 75 72 73 69 |ent. The|.recursi|
|000029a0| 76 65 20 72 65 66 69 6e | 65 6d 65 6e 74 20 69 73 |ve refin|ement is|
|000029b0| 20 75 73 75 61 6c 6c 79 | 20 66 61 73 74 20 61 6e | usually| fast an|
|000029c0| 79 77 61 79 2e 0a 2e 49 | 50 20 51 75 69 74 0a 51 |yway...I|P Quit.Q|
|000029d0| 75 69 74 73 20 74 68 65 | 20 70 72 6f 67 72 61 6d |uits the| program|
|000029e0| 20 28 77 69 74 68 6f 75 | 74 20 63 6f 6e 66 69 72 | (withou|t confir|
|000029f0| 6d 20 6f 6e 20 53 75 6e | 4f 53 20 6f 6c 64 65 72 |m on Sun|OS older|
|00002a00| 20 74 68 61 6e 20 34 2e | 30 29 2e 0a 2e 50 50 0a | than 4.|0)...PP.|
|00002a10| 2e 42 0a 4d 6f 75 73 65 | 20 75 73 61 67 65 3a 0a |.B.Mouse| usage:.|
|00002a20| 2e 50 50 0a 54 6f 20 6d | 61 72 6b 20 61 20 6e 65 |.PP.To m|ark a ne|
|00002a30| 77 20 61 72 65 61 20 66 | 6f 72 20 65 78 70 6c 6f |w area f|or explo|
|00002a40| 72 61 74 69 6f 6e 2c 20 | 70 72 65 73 73 20 74 68 |ration, |press th|
|00002a50| 65 0a 2e 49 20 6c 65 66 | 74 0a 6d 6f 75 73 65 20 |e..I lef|t.mouse |
|00002a60| 62 75 74 74 6f 6e 20 61 | 6e 64 20 6d 6f 76 65 20 |button a|nd move |
|00002a70| 74 68 65 20 6d 6f 75 73 | 65 2c 20 6b 65 65 70 69 |the mous|e, keepi|
|00002a80| 6e 67 20 74 68 65 20 62 | 75 74 74 6f 6e 20 64 6f |ng the b|utton do|
|00002a90| 77 6e 2e 20 57 68 65 6e | 20 79 6f 75 20 72 65 6c |wn. When| you rel|
|00002aa0| 65 61 73 65 0a 74 68 65 | 20 62 75 74 74 6f 6e 20 |ease.the| button |
|00002ab0| 61 20 6e 65 77 20 61 72 | 65 61 20 68 61 73 20 62 |a new ar|ea has b|
|00002ac0| 65 65 6e 20 6d 61 72 6b | 65 64 2e 20 4e 6f 77 20 |een mark|ed. Now |
|00002ad0| 79 6f 75 20 63 61 6e 20 | 73 65 6c 65 63 74 20 74 |you can |select t|
|00002ae0| 68 65 0a 2e 49 20 44 52 | 41 57 0a 62 75 74 74 6f |he..I DR|AW.butto|
|00002af0| 6e 20 74 6f 20 6d 61 67 | 6e 69 66 79 20 74 68 69 |n to mag|nify thi|
|00002b00| 73 20 61 72 65 61 2c 20 | 70 65 72 68 61 70 73 20 |s area, |perhaps |
|00002b10| 63 68 61 6e 67 69 6e 67 | 20 73 6f 6d 65 20 6f 66 |changing| some of|
|00002b20| 20 74 68 65 20 73 6c 69 | 64 65 72 73 20 66 69 72 | the sli|ders fir|
|00002b30| 73 74 2e 0a 0a 59 6f 75 | 20 77 69 6c 6c 20 73 65 |st...You| will se|
|00002b40| 65 20 74 68 65 20 63 6f | 6f 72 64 69 6e 61 74 65 |e the co|ordinate|
|00002b50| 73 20 69 6e 20 74 68 65 | 20 70 61 6e 65 6c 20 63 |s in the| panel c|
|00002b60| 68 61 6e 67 65 20 77 68 | 65 6e 20 79 6f 75 20 6d |hange wh|en you m|
|00002b70| 6f 76 65 20 74 68 65 20 | 6d 6f 75 73 65 2e 0a 0a |ove the |mouse...|
|00002b80| 49 66 20 79 6f 75 20 68 | 69 74 20 74 68 65 0a 2e |If you h|it the..|
|00002b90| 49 20 6d 69 64 64 6c 65 | 0a 62 75 74 74 6f 6e 2c |I middle|.button,|
|00002ba0| 20 79 6f 75 72 20 73 65 | 6c 65 63 74 65 64 20 61 | your se|lected a|
|00002bb0| 72 65 61 20 77 69 6c 6c | 20 62 65 20 63 61 6e 63 |rea will| be canc|
|00002bc0| 65 6c 6c 65 64 20 61 6e | 64 20 74 68 65 20 63 6f |elled an|d the co|
|00002bd0| 6f 72 64 69 6e 61 74 65 | 73 20 72 65 73 74 6f 72 |ordinate|s restor|
|00002be0| 65 64 2e 0a 2e 53 48 20 | 52 45 53 54 52 49 43 54 |ed...SH |RESTRICT|
|00002bf0| 49 4f 4e 53 0a 59 6f 75 | 20 63 61 6e 6e 6f 74 20 |IONS.You| cannot |
|00002c00| 73 61 76 65 20 74 68 65 | 20 69 6d 61 67 65 73 20 |save the| images |
|00002c10| 74 6f 20 66 69 6c 65 2e | 0a 2e 53 48 20 53 45 45 |to file.|..SH SEE|
|00002c20| 20 41 4c 53 4f 0a 73 75 | 6e 76 69 65 77 28 31 29 | ALSO.su|nview(1)|
|00002c30| 0a 2e 53 48 20 41 55 54 | 48 4f 52 53 0a 2e 50 50 |..SH AUT|HORS..PP|
|00002c40| 0a 50 2e 20 45 6d 61 6e | 75 65 6c 73 73 6f 6e 2c |.P. Eman|uelsson,|
|00002c50| 20 70 65 6c 6c 40 69 73 | 79 2e 6c 69 75 2e 73 65 | pell@is|y.liu.se|
|00002c60| 2e 0a 2e 62 72 0a 2e 49 | 0a 22 54 68 65 20 53 63 |...br..I|."The Sc|
|00002c70| 69 65 6e 63 65 20 6f 66 | 20 46 72 61 63 74 61 6c |ience of| Fractal|
|00002c80| 20 49 6d 61 67 65 73 22 | 0a 5c 28 65 6d 20 50 65 | Images"|.\(em Pe|
|00002c90| 69 74 67 65 6e 20 26 20 | 53 61 75 70 65 20 28 65 |itgen & |Saupe (e|
|00002ca0| 64 73 2e 29 0a 2e 0a 54 | 6f 20 67 65 74 20 67 6f |ds.)...T|o get go|
|00002cb0| 69 6e 67 2c 20 6a 75 73 | 74 20 68 69 74 20 74 68 |ing, jus|t hit th|
|00002cc0| 65 20 44 52 41 57 20 62 | 75 74 74 6f 6e 20 61 73 |e DRAW b|utton as|
|00002cd0| 20 73 6f 6f 6e 20 61 73 | 20 69 74 20 73 74 61 72 | soon as| it star|
|00002ce0| 74 73 2e 0a 0a 20 20 20 | 20 59 6f 75 20 77 69 6c |ts... | You wil|
|00002cf0| 6c 20 70 72 6f 62 61 62 | 6c 79 20 73 65 65 20 61 |l probab|ly see a|
|00002d00| 20 6c 6f 74 20 6f 66 20 | 69 6e 65 66 66 69 63 69 | lot of |ineffici|
|00002d10| 65 6e 74 20 63 6f 64 69 | 6e 67 2c 20 65 2e 67 2e |ent codi|ng, e.g.|
|00002d20| 20 75 73 69 6e 67 20 61 | 72 72 61 79 0a 73 75 62 | using a|rray.sub|
|00002d30| 73 63 72 69 70 74 69 6e | 67 20 69 6e 73 74 65 61 |scriptin|g instea|
|00002d40| 64 20 6f 66 20 70 6f 69 | 6e 74 65 72 73 20 65 74 |d of poi|nters et|
|00002d50| 63 2e 20 4c 65 74 20 6d | 65 20 6a 75 73 74 20 73 |c. Let m|e just s|
|00002d60| 61 79 20 74 68 61 74 20 | 70 72 6f 66 69 6c 69 6e |ay that |profilin|
|00002d70| 67 20 73 68 6f 77 73 0a | 74 68 61 74 20 77 69 74 |g shows.|that wit|
|00002d80| 68 6f 75 74 20 74 68 65 | 20 53 75 6e 2d 73 70 65 |hout the| Sun-spe|
|00002d90| 63 69 66 69 63 20 73 74 | 75 66 66 2c 20 69 74 20 |cific st|uff, it |
|00002da0| 63 61 6e 20 73 70 65 6e | 64 20 61 73 20 6d 75 63 |can spen|d as muc|
|00002db0| 68 20 61 73 20 39 38 25 | 20 6f 66 20 74 68 65 0a |h as 98%| of the.|
|00002dc0| 74 69 6d 65 20 69 6e 20 | 74 68 65 20 4d 53 65 74 |time in |the MSet|
|00002dd0| 44 69 73 74 20 72 6f 75 | 74 69 6e 65 20 28 6d 6f |Dist rou|tine (mo|
|00002de0| 73 74 20 6f 66 20 77 68 | 69 63 68 20 61 72 65 20 |st of wh|ich are |
|00002df0| 66 6c 6f 61 74 69 6e 67 | 2d 70 6f 69 6e 74 0a 63 |floating|-point.c|
|00002e00| 6d 61 6e 64 65 6c 62 72 | 6f 74 2f 46 61 73 74 4d |mandelbr|ot/FastM|
|00002e10| 74 6f 6f 6c 2e 63 00 00 | 00 00 00 00 00 00 00 00 |tool.c..|........|
|00002e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e60| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00002e70| 34 33 20 00 20 20 20 20 | 31 33 20 00 20 20 20 20 |43 . |13 . |
|00002e80| 20 20 33 35 32 37 33 20 | 20 34 34 30 35 35 33 33 | 35273 | 4405533|
|00002e90| 31 33 32 20 20 31 30 33 | 33 36 00 20 00 00 00 00 |132 103|36. ....|
|00002ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003000| 2f 2a 0a 20 2a 20 46 61 | 73 74 4d 74 6f 6f 6c 20 |/*. * Fa|stMtool |
|00003010| 2d 20 50 65 72 66 6f 72 | 6d 20 69 6e 74 65 72 61 |- Perfor|m intera|
|00003020| 63 74 69 76 65 20 65 78 | 70 6c 6f 72 69 6e 67 20 |ctive ex|ploring |
|00003030| 6f 66 20 74 68 65 20 4d | 61 6e 64 65 6c 62 72 6f |of the M|andelbro|
|00003040| 74 20 73 65 74 20 6f 6e | 0a 20 2a 20 53 75 6e 20 |t set on|. * Sun |
|00003050| 77 6f 72 6b 73 74 61 74 | 69 6f 6e 73 2e 0a 20 2a |workstat|ions.. *|
|00003060| 20 43 6f 70 79 72 69 67 | 68 74 20 28 63 29 20 31 | Copyrig|ht (c) 1|
|00003070| 39 38 39 20 50 7b 72 20 | 45 6d 61 6e 75 65 6c 73 |989 P{r |Emanuels|
|00003080| 73 6f 6e 2c 20 70 65 6c | 6c 40 69 73 79 2e 6c 69 |son, pel|l@isy.li|
|00003090| 75 2e 73 65 2e 20 41 6c | 6c 20 52 69 67 68 74 73 |u.se. Al|l Rights|
|000030a0| 20 52 65 73 65 72 76 65 | 64 2e 0a 20 2a 20 54 68 | Reserve|d.. * Th|
|000030b0| 69 73 20 70 72 6f 67 72 | 61 6d 20 69 73 20 66 72 |is progr|am is fr|
|000030c0| 65 65 20 73 6f 66 74 77 | 61 72 65 3b 20 79 6f 75 |ee softw|are; you|
|000030d0| 20 63 61 6e 20 72 65 64 | 69 73 74 72 69 62 75 74 | can red|istribut|
|000030e0| 65 20 69 74 20 61 6e 64 | 2f 6f 72 20 6d 6f 64 69 |e it and|/or modi|
|000030f0| 66 79 0a 20 2a 20 69 74 | 20 75 6e 64 65 72 20 74 |fy. * it| under t|
|00003100| 68 65 20 74 65 72 6d 73 | 20 6f 66 20 74 68 65 20 |he terms| of the |
|00003110| 47 4e 55 20 47 65 6e 65 | 72 61 6c 20 50 75 62 6c |GNU Gene|ral Publ|
|00003120| 69 63 20 4c 69 63 65 6e | 73 65 20 61 73 20 70 75 |ic Licen|se as pu|
|00003130| 62 6c 69 73 68 65 64 20 | 62 79 0a 20 2a 20 74 68 |blished |by. * th|
|00003140| 65 20 46 72 65 65 20 53 | 6f 66 74 77 61 72 65 20 |e Free S|oftware |
|00003150| 46 6f 75 6e 64 61 74 69 | 6f 6e 3b 20 65 69 74 68 |Foundati|on; eith|
|00003160| 65 72 20 76 65 72 73 69 | 6f 6e 20 31 2c 20 6f 72 |er versi|on 1, or|
|00003170| 20 61 6e 79 20 6c 61 74 | 65 72 20 76 65 72 73 69 | any lat|er versi|
|00003180| 6f 6e 2e 0a 20 2a 20 54 | 68 69 73 20 70 72 6f 67 |on.. * T|his prog|
|00003190| 72 61 6d 20 69 73 20 64 | 69 73 74 72 69 62 75 74 |ram is d|istribut|
|000031a0| 65 64 20 69 6e 20 74 68 | 65 20 68 6f 70 65 20 74 |ed in th|e hope t|
|000031b0| 68 61 74 20 69 74 20 77 | 69 6c 6c 20 62 65 20 75 |hat it w|ill be u|
|000031c0| 73 65 66 75 6c 2c 0a 20 | 2a 20 62 75 74 20 57 49 |seful,. |* but WI|
|000031d0| 54 48 4f 55 54 20 41 4e | 59 20 57 41 52 52 41 4e |THOUT AN|Y WARRAN|
|000031e0| 54 59 3b 20 77 69 74 68 | 6f 75 74 20 65 76 65 6e |TY; with|out even|
|000031f0| 20 74 68 65 20 69 6d 70 | 6c 69 65 64 20 77 61 72 | the imp|lied war|
|00003200| 72 61 6e 74 79 20 6f 66 | 0a 20 2a 20 4d 45 52 43 |ranty of|. * MERC|
|00003210| 48 41 4e 54 41 42 49 4c | 49 54 59 20 6f 72 20 46 |HANTABIL|ITY or F|
|00003220| 49 54 4e 45 53 53 20 46 | 4f 52 20 41 20 50 41 52 |ITNESS F|OR A PAR|
|00003230| 54 49 43 55 4c 41 52 20 | 50 55 52 50 4f 53 45 2e |TICULAR |PURPOSE.|
|00003240| 20 20 53 65 65 20 74 68 | 65 0a 20 2a 20 47 4e 55 | See th|e. * GNU|
|00003250| 20 47 65 6e 65 72 61 6c | 20 50 75 62 6c 69 63 20 | General| Public |
|00003260| 4c 69 63 65 6e 73 65 20 | 66 6f 72 20 6d 6f 72 65 |License |for more|
|00003270| 20 64 65 74 61 69 6c 73 | 2e 0a 20 2a 20 59 6f 75 | details|.. * You|
|00003280| 20 63 61 6e 20 72 65 63 | 65 69 76 65 20 61 20 63 | can rec|eive a c|
|00003290| 6f 70 79 20 6f 66 20 74 | 68 65 20 47 4e 55 20 47 |opy of t|he GNU G|
|000032a0| 65 6e 65 72 61 6c 20 50 | 75 62 6c 69 63 20 4c 69 |eneral P|ublic Li|
|000032b0| 63 65 6e 73 65 20 66 72 | 6f 6d 20 74 68 65 0a 20 |cense fr|om the. |
|000032c0| 2a 20 46 72 65 65 20 53 | 6f 66 74 77 61 72 65 20 |* Free S|oftware |
|000032d0| 46 6f 75 6e 64 61 74 69 | 6f 6e 2c 20 49 6e 63 2e |Foundati|on, Inc.|
|000032e0| 2c 20 36 37 35 20 4d 61 | 73 73 20 41 76 65 2c 20 |, 675 Ma|ss Ave, |
|000032f0| 43 61 6d 62 72 69 64 67 | 65 2c 20 4d 41 20 30 32 |Cambridg|e, MA 02|
|00003300| 31 33 39 2c 20 55 53 41 | 2e 0a 20 2a 20 53 65 65 |139, USA|.. * See|
|00003310| 20 74 68 65 20 52 45 41 | 44 4d 45 20 66 6f 72 20 | the REA|DME for |
|00003320| 6d 6f 72 65 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |more inf|ormation|
|00003330| 2e 0a 20 2a 2f 0a 0a 23 | 69 6e 63 6c 75 64 65 20 |.. */..#|include |
|00003340| 3c 73 75 6e 74 6f 6f 6c | 2f 73 75 6e 76 69 65 77 |<suntool|/sunview|
|00003350| 2e 68 3e 0a 23 69 6e 63 | 6c 75 64 65 20 3c 73 75 |.h>.#inc|lude <su|
|00003360| 6e 74 6f 6f 6c 2f 70 61 | 6e 65 6c 2e 68 3e 0a 23 |ntool/pa|nel.h>.#|
|00003370| 69 6e 63 6c 75 64 65 20 | 3c 73 75 6e 74 6f 6f 6c |include |<suntool|
|00003380| 2f 63 61 6e 76 61 73 2e | 68 3e 0a 0a 2f 2a 20 43 |/canvas.|h>../* C|
|00003390| 68 61 6e 67 65 20 65 76 | 65 6e 74 5f 61 63 74 69 |hange ev|ent_acti|
|000033a0| 6f 6e 20 74 6f 20 65 76 | 65 6e 74 5f 69 64 28 65 |on to ev|ent_id(e|
|000033b0| 76 65 6e 74 29 20 66 6f | 72 20 70 72 65 20 34 2e |vent) fo|r pre 4.|
|000033c0| 30 20 2a 2f 0a 23 69 66 | 6e 64 65 66 20 65 76 65 |0 */.#if|ndef eve|
|000033d0| 6e 74 5f 61 63 74 69 6f | 6e 0a 23 64 65 66 69 6e |nt_actio|n.#defin|
|000033e0| 65 20 65 76 65 6e 74 5f | 61 63 74 69 6f 6e 20 65 |e event_|action e|
|000033f0| 76 65 6e 74 5f 69 64 0a | 23 64 65 66 69 6e 65 20 |vent_id.|#define |
|00003400| 6f 6c 64 53 75 6e 4f 53 | 0a 23 65 6e 64 69 66 0a |oldSunOS|.#endif.|
|00003410| 0a 23 69 66 6e 64 65 66 | 20 6f 6c 64 53 75 6e 4f |.#ifndef| oldSunO|
|00003420| 53 0a 23 69 6e 63 6c 75 | 64 65 20 3c 73 75 6e 74 |S.#inclu|de <sunt|
|00003430| 6f 6f 6c 2f 61 6c 65 72 | 74 2e 68 3e 09 2f 2a 20 |ool/aler|t.h>./* |
|00003440| 4f 6e 6c 79 20 66 6f 72 | 20 53 75 6e 4f 53 20 34 |Only for| SunOS 4|
|00003450| 20 2a 2f 0a 23 69 6e 63 | 6c 75 64 65 20 3c 61 6c | */.#inc|lude <al|
|00003460| 6c 6f 63 61 2e 68 3e 09 | 09 2f 2a 20 43 61 6e 6e |loca.h>.|./* Cann|
|00003470| 6f 74 20 66 69 6e 64 20 | 74 68 69 73 20 6f 6e 20 |ot find |this on |
|00003480| 33 2e 35 20 2a 2f 0a 23 | 65 6e 64 69 66 0a 0a 23 |3.5 */.#|endif..#|
|00003490| 69 6e 63 6c 75 64 65 20 | 3c 6d 61 74 68 2e 68 3e |include |<math.h>|
|000034a0| 0a 0a 74 79 70 65 64 65 | 66 20 75 6e 73 69 67 6e |..typede|f unsign|
|000034b0| 65 64 20 63 68 61 72 20 | 42 6f 6f 6c 3b 0a 0a 23 |ed char |Bool;..#|
|000034c0| 64 65 66 69 6e 65 20 53 | 74 61 63 6b 73 69 7a 65 |define S|tacksize|
|000034d0| 20 31 30 30 09 09 2f 2a | 20 44 79 6e 61 6d 69 63 | 100../*| Dynamic|
|000034e0| 20 61 6c 6c 6f 63 61 74 | 69 6f 6e 20 77 6f 75 6c | allocat|ion woul|
|000034f0| 64 20 62 65 20 63 6c 65 | 61 6e 65 72 20 2a 2f 0a |d be cle|aner */.|
|00003500| 0a 73 74 72 75 63 74 20 | 73 74 61 63 6b 20 7b 0a |.struct |stack {.|
|00003510| 20 20 50 69 78 72 65 63 | 74 20 2a 70 72 3b 0a 20 | Pixrec|t *pr;. |
|00003520| 20 64 6f 75 62 6c 65 20 | 78 6d 69 6e 2c 20 78 6d | double |xmin, xm|
|00003530| 61 78 2c 20 79 6d 69 6e | 2c 20 79 6d 61 78 3b 0a |ax, ymin|, ymax;.|
|00003540| 7d 20 53 74 61 63 6b 20 | 5b 53 74 61 63 6b 73 69 |} Stack |[Stacksi|
|00003550| 7a 65 5d 3b 0a 0a 73 74 | 61 74 69 63 20 69 6e 74 |ze];..st|atic int|
|00003560| 20 73 70 20 3d 20 30 3b | 09 09 2f 2a 20 53 74 61 | sp = 0;|../* Sta|
|00003570| 63 6b 70 6f 69 6e 74 65 | 72 20 2a 2f 0a 0a 23 64 |ckpointe|r */..#d|
|00003580| 65 66 69 6e 65 20 4d 41 | 58 28 61 2c 62 29 20 28 |efine MA|X(a,b) (|
|00003590| 28 61 29 20 3e 20 28 62 | 29 20 3f 20 28 61 29 20 |(a) > (b|) ? (a) |
|000035a0| 3a 20 28 62 29 29 0a 23 | 64 65 66 69 6e 65 20 4d |: (b)).#|define M|
|000035b0| 49 4e 28 61 2c 62 29 20 | 28 28 61 29 20 3c 20 28 |IN(a,b) |((a) < (|
|000035c0| 62 29 20 3f 20 28 61 29 | 20 3a 20 28 62 29 29 0a |b) ? (a)| : (b)).|
|000035d0| 23 64 65 66 69 6e 65 20 | 73 67 6e 28 78 29 20 28 |#define |sgn(x) (|
|000035e0| 28 78 29 20 3e 3d 20 30 | 20 3f 20 31 20 3a 20 2d |(x) >= 0| ? 1 : -|
|000035f0| 31 29 0a 0a 23 64 65 66 | 69 6e 65 20 53 51 52 54 |1)..#def|ine SQRT|
|00003600| 5f 32 20 31 2e 34 31 34 | 32 31 33 35 36 32 33 37 |_2 1.414|21356237|
|00003610| 0a 23 64 65 66 69 6e 65 | 20 4e 6d 61 78 20 38 30 |.#define| Nmax 80|
|00003620| 30 09 09 2f 2a 20 4d 61 | 78 69 6d 75 6d 20 69 6d |0../* Ma|ximum im|
|00003630| 61 67 65 20 73 69 7a 65 | 20 2a 2f 0a 0a 73 74 61 |age size| */..sta|
|00003640| 74 69 63 20 42 6f 6f 6c | 20 4d 53 65 74 5b 4e 6d |tic Bool| MSet[Nm|
|00003650| 61 78 5d 5b 4e 6d 61 78 | 5d 3b 0a 73 74 61 74 69 |ax][Nmax|];.stati|
|00003660| 63 20 64 6f 75 62 6c 65 | 20 78 6d 69 6e 20 3d 20 |c double| xmin = |
|00003670| 2d 32 2e 30 2c 20 78 6d | 61 78 3d 30 2e 35 2c 20 |-2.0, xm|ax=0.5, |
|00003680| 79 6d 69 6e 20 3d 20 2d | 31 2e 32 35 2c 20 79 6d |ymin = -|1.25, ym|
|00003690| 61 78 3d 31 2e 32 35 2c | 0a 20 20 20 20 20 20 20 |ax=1.25,|. |
|000036a0| 20 20 20 20 20 20 20 73 | 69 64 65 3d 32 2e 35 2c | s|ide=2.5,|
|000036b0| 20 64 65 6c 74 61 2c 20 | 72 65 63 75 72 3b 0a 73 | delta, |recur;.s|
|000036c0| 74 61 74 69 63 20 69 6e | 74 20 6d 61 78 69 74 65 |tatic in|t maxite|
|000036d0| 72 3d 32 30 2c 20 69 6e | 63 72 3d 35 2c 20 72 65 |r=20, in|cr=5, re|
|000036e0| 63 3d 35 3b 0a 73 74 61 | 74 69 63 20 69 6e 74 20 |c=5;.sta|tic int |
|000036f0| 73 74 61 72 74 5f 78 2c | 20 73 74 61 72 74 5f 79 |start_x,| start_y|
|00003700| 2c 20 6e 65 77 5f 78 2c | 20 6e 65 77 5f 79 3b 20 |, new_x,| new_y; |
|00003710| 2f 2a 20 46 6f 72 20 72 | 65 67 69 6f 6e 20 73 65 |/* For r|egion se|
|00003720| 6c 65 63 74 20 2a 2f 0a | 73 74 61 74 69 63 20 42 |lect */.|static B|
|00003730| 6f 6f 6c 20 73 65 6c 65 | 63 74 65 64 20 3d 20 46 |ool sele|cted = F|
|00003740| 41 4c 53 45 2c 20 64 72 | 61 77 5f 6e 65 77 5f 69 |ALSE, dr|aw_new_i|
|00003750| 6d 61 67 65 3d 46 41 4c | 53 45 2c 20 61 62 6f 72 |mage=FAL|SE, abor|
|00003760| 74 3d 46 41 4c 53 45 3b | 0a 0a 23 64 65 66 69 6e |t=FALSE;|..#defin|
|00003770| 65 20 42 55 54 54 4f 4e | 46 4f 4e 54 20 22 2f 75 |e BUTTON|FONT "/u|
|00003780| 73 72 2f 6c 69 62 2f 66 | 6f 6e 74 73 2f 66 69 78 |sr/lib/f|onts/fix|
|00003790| 65 64 77 69 64 74 68 66 | 6f 6e 74 73 2f 67 61 6c |edwidthf|onts/gal|
|000037a0| 6c 61 6e 74 2e 72 2e 31 | 39 22 0a 73 74 61 74 69 |lant.r.1|9".stati|
|000037b0| 63 20 63 68 61 72 20 2a | 64 65 66 61 75 6c 74 5f |c char *|default_|
|000037c0| 66 6f 6e 74 20 3d 0a 20 | 20 22 44 45 46 41 55 4c |font =. | "DEFAUL|
|000037d0| 54 5f 46 4f 4e 54 3d 2f | 75 73 72 2f 6c 69 62 2f |T_FONT=/|usr/lib/|
|000037e0| 66 6f 6e 74 73 2f 66 69 | 78 65 64 77 69 64 74 68 |fonts/fi|xedwidth|
|000037f0| 66 6f 6e 74 73 2f 73 63 | 72 65 65 6e 2e 72 2e 31 |fonts/sc|reen.r.1|
|00003800| 33 22 3b 0a 0a 73 74 61 | 74 69 63 20 46 72 61 6d |3";..sta|tic Fram|
|00003810| 65 20 66 72 3b 0a 73 74 | 61 74 69 63 20 43 61 6e |e fr;.st|atic Can|
|00003820| 76 61 73 20 63 76 3b 0a | 73 74 61 74 69 63 20 50 |vas cv;.|static P|
|00003830| 69 78 77 69 6e 20 2a 70 | 77 3b 0a 73 74 61 74 69 |ixwin *p|w;.stati|
|00003840| 63 20 50 69 78 66 6f 6e | 74 20 2a 62 66 2c 20 2a |c Pixfon|t *bf, *|
|00003850| 70 66 3b 0a 73 74 61 74 | 69 63 20 50 61 6e 65 6c |pf;.stat|ic Panel|
|00003860| 20 70 6e 3b 0a 73 74 61 | 74 69 63 20 50 61 6e 65 | pn;.sta|tic Pane|
|00003870| 6c 5f 69 74 65 6d 20 72 | 65 63 75 72 5f 70 2c 20 |l_item r|ecur_p, |
|00003880| 69 6e 63 72 5f 70 2c 20 | 6d 61 78 69 74 65 72 5f |incr_p, |maxiter_|
|00003890| 70 2c 20 73 74 6f 70 5f | 70 3b 0a 0a 23 69 66 64 |p, stop_|p;..#ifd|
|000038a0| 65 66 20 6e 6f 74 64 65 | 66 09 09 09 2f 2a 20 46 |ef notde|f.../* F|
|000038b0| 75 74 75 72 65 20 65 6e | 68 61 6e 63 65 6d 65 6e |uture en|hancemen|
|000038c0| 74 20 2a 2f 0a 73 74 61 | 74 69 63 20 69 6e 74 20 |t */.sta|tic int |
|000038d0| 4e 3d 35 31 32 3b 09 09 | 2f 2a 20 43 75 72 72 65 |N=512;..|/* Curre|
|000038e0| 6e 74 20 69 6d 61 67 65 | 20 73 69 7a 65 20 2a 2f |nt image| size */|
|000038f0| 0a 23 65 6c 73 65 0a 23 | 64 65 66 69 6e 65 20 4e |.#else.#|define N|
|00003900| 20 35 31 32 0a 23 65 6e | 64 69 66 0a 0a 73 74 61 | 512.#en|dif..sta|
|00003910| 74 69 63 20 63 68 61 72 | 20 4e 6d 61 78 5f 73 74 |tic char| Nmax_st|
|00003920| 72 5b 31 30 5d 3b 0a 0a | 65 78 74 65 72 6e 20 69 |r[10];..|extern i|
|00003930| 6e 74 20 70 61 6e 65 6c | 5f 70 77 5f 74 65 78 74 |nt panel|_pw_text|
|00003940| 28 29 2c 20 70 61 6e 65 | 6c 5f 66 6f 6e 74 68 6f |(), pane|l_fontho|
|00003950| 6d 65 28 29 3b 20 2f 2a | 20 55 6e 64 6f 63 75 6d |me(); /*| Undocum|
|00003960| 65 6e 74 65 64 2c 20 62 | 75 74 20 6e 69 63 65 20 |ented, b|ut nice |
|00003970| 2a 2f 0a 0a 64 6f 75 62 | 6c 65 20 4d 53 65 74 44 |*/..doub|le MSetD|
|00003980| 69 73 74 28 29 3b 0a 76 | 6f 69 64 20 71 75 69 74 |ist();.v|oid quit|
|00003990| 28 29 2c 20 73 74 6f 70 | 28 29 2c 20 75 70 28 29 |(), stop|(), up()|
|000039a0| 2c 20 64 72 61 77 28 29 | 2c 20 73 65 6c 5f 72 65 |, draw()|, sel_re|
|000039b0| 67 69 6f 6e 28 29 3b 0a | 0a 76 6f 69 64 20 6d 61 |gion();.|.void ma|
|000039c0| 69 6e 28 29 0a 7b 0a 20 | 20 28 76 6f 69 64 29 20 |in().{. | (void) |
|000039d0| 70 75 74 65 6e 76 28 64 | 65 66 61 75 6c 74 5f 66 |putenv(d|efault_f|
|000039e0| 6f 6e 74 29 3b 0a 20 20 | 62 66 20 3d 20 70 66 5f |ont);. |bf = pf_|
|000039f0| 6f 70 65 6e 28 42 55 54 | 54 4f 4e 46 4f 4e 54 29 |open(BUT|TONFONT)|
|00003a00| 3b 0a 20 20 70 66 20 3d | 20 70 66 5f 64 65 66 61 |;. pf =| pf_defa|
|00003a10| 75 6c 74 28 29 3b 0a 0a | 2f 2a 20 54 68 69 73 20 |ult();..|/* This |
|00003a20| 63 6f 64 65 20 69 73 20 | 66 75 6c 6c 20 6f 66 20 |code is |full of |
|00003a30| 73 74 72 61 6e 67 65 20 | 6d 61 67 69 63 20 6e 75 |strange |magic nu|
|00003a40| 6d 62 65 72 73 2e 20 49 | 20 61 70 6f 6c 6f 67 69 |mbers. I| apologi|
|00003a50| 7a 65 20 66 6f 72 20 74 | 68 61 74 21 21 21 20 2a |ze for t|hat!!! *|
|00003a60| 2f 0a 0a 20 20 66 72 20 | 3d 20 77 69 6e 64 6f 77 |/.. fr |= window|
|00003a70| 5f 63 72 65 61 74 65 28 | 30 2c 20 46 52 41 4d 45 |_create(|0, FRAME|
|00003a80| 2c 0a 09 09 20 20 20 20 | 20 57 49 4e 5f 58 2c 20 |,... | WIN_X, |
|00003a90| 34 30 30 2c 0a 09 09 20 | 20 20 20 20 57 49 4e 5f |400,... | WIN_|
|00003aa0| 59 2c 20 31 35 30 2c 0a | 09 09 20 20 20 20 20 57 |Y, 150,.|.. W|
|00003ab0| 49 4e 5f 53 48 4f 57 2c | 20 54 52 55 45 2c 0a 09 |IN_SHOW,| TRUE,..|
|00003ac0| 09 20 20 20 20 20 46 52 | 41 4d 45 5f 4c 41 42 45 |. FR|AME_LABE|
|00003ad0| 4c 2c 20 22 46 61 73 74 | 4d 74 6f 6f 6c 20 2d 20 |L, "Fast|Mtool - |
|00003ae0| 4d 61 6e 64 65 6c 62 72 | 6f 74 20 65 78 70 6c 6f |Mandelbr|ot explo|
|00003af0| 72 69 6e 67 22 2c 0a 09 | 09 20 20 20 20 20 30 29 |ring",..|. 0)|
|00003b00| 3b 0a 20 20 70 6e 20 3d | 20 77 69 6e 64 6f 77 5f |;. pn =| window_|
|00003b10| 63 72 65 61 74 65 28 66 | 72 2c 20 50 41 4e 45 4c |create(f|r, PANEL|
|00003b20| 2c 20 30 29 3b 0a 0a 2f | 2a 20 54 68 65 20 62 72 |, 0);../|* The br|
|00003b30| 61 69 6e 2d 64 61 6d 61 | 67 65 64 20 53 75 6e 56 |ain-dama|ged SunV|
|00003b40| 69 65 77 20 75 73 65 73 | 20 74 68 65 20 50 41 4e |iew uses| the PAN|
|00003b50| 45 4c 5f 4d 41 58 5f 56 | 41 4c 55 45 20 74 6f 20 |EL_MAX_V|ALUE to |
|00003b60| 64 65 74 65 72 6d 69 6e | 65 20 74 68 65 0a 20 20 |determin|e the. |
|00003b70| 20 70 6f 73 69 74 69 6f | 6e 20 6f 66 20 74 68 65 | positio|n of the|
|00003b80| 20 73 6c 69 64 65 72 2c | 20 69 6e 73 74 65 61 64 | slider,| instead|
|00003b90| 20 6f 66 20 65 2e 67 2e | 20 61 6c 77 61 79 73 20 | of e.g.| always |
|00003ba0| 61 6c 6c 6f 63 61 74 65 | 20 31 30 20 70 6f 73 69 |allocate| 10 posi|
|00003bb0| 74 69 6f 6e 73 0a 20 20 | 20 66 6f 72 20 74 68 69 |tions. | for thi|
|00003bc0| 73 20 61 6e 64 20 72 69 | 67 68 74 2d 6a 75 73 74 |s and ri|ght-just|
|00003bd0| 69 66 79 20 6f 72 20 73 | 6f 6d 65 74 68 69 6e 67 |ify or s|omething|
|00003be0| 2e 20 54 68 69 73 20 6d | 65 61 6e 73 20 74 68 61 |. This m|eans tha|
|00003bf0| 74 20 49 20 68 61 76 65 | 20 74 6f 0a 20 20 20 75 |t I have| to. u|
|00003c00| 73 65 20 64 65 6c 69 63 | 61 74 65 20 28 75 67 6c |se delic|ate (ugl|
|00003c10| 79 29 20 70 69 78 65 6c | 2d 70 6f 73 69 74 69 6f |y) pixel|-positio|
|00003c20| 6e 69 6e 67 20 74 6f 20 | 67 65 74 20 74 68 65 20 |ning to |get the |
|00003c30| 73 6c 69 64 65 72 73 20 | 74 6f 20 6c 69 6e 65 20 |sliders |to line |
|00003c40| 75 70 2e 20 2a 2f 0a 0a | 20 20 72 65 63 75 72 5f |up. */..| recur_|
|00003c50| 70 20 3d 20 70 61 6e 65 | 6c 5f 63 72 65 61 74 65 |p = pane|l_create|
|00003c60| 5f 69 74 65 6d 28 70 6e | 2c 20 50 41 4e 45 4c 5f |_item(pn|, PANEL_|
|00003c70| 53 4c 49 44 45 52 2c 0a | 09 09 09 20 20 20 20 20 |SLIDER,.|... |
|00003c80| 20 50 41 4e 45 4c 5f 4c | 41 42 45 4c 5f 58 2c 20 | PANEL_L|ABEL_X, |
|00003c90| 35 2c 0a 09 09 09 20 20 | 20 20 20 20 50 41 4e 45 |5,.... | PANE|
|00003ca0| 4c 5f 4c 41 42 45 4c 5f | 59 2c 20 35 2c 0a 09 09 |L_LABEL_|Y, 5,...|
|00003cb0| 09 20 20 20 20 20 20 50 | 41 4e 45 4c 5f 56 41 4c |. P|ANEL_VAL|
|00003cc0| 55 45 5f 58 2c 20 31 31 | 30 2c 0a 09 09 09 20 20 |UE_X, 11|0,.... |
|00003cd0| 20 20 20 20 50 41 4e 45 | 4c 5f 56 41 4c 55 45 5f | PANE|L_VALUE_|
|00003ce0| 59 2c 20 35 2c 0a 09 09 | 09 20 20 20 20 20 20 50 |Y, 5,...|. P|
|00003cf0| 41 4e 45 4c 5f 4c 41 42 | 45 4c 5f 53 54 52 49 4e |ANEL_LAB|EL_STRIN|
|00003d00| 47 2c 20 22 52 65 63 75 | 72 3a 22 2c 0a 09 09 09 |G, "Recu|r:",....|
|00003d10| 20 20 20 20 20 20 50 41 | 4e 45 4c 5f 56 41 4c 55 | PA|NEL_VALU|
|00003d20| 45 2c 20 72 65 63 2c 0a | 09 09 09 20 20 20 20 20 |E, rec,.|... |
|00003d30| 20 50 41 4e 45 4c 5f 4d | 49 4e 5f 56 41 4c 55 45 | PANEL_M|IN_VALUE|
|00003d40| 2c 20 31 2c 0a 09 09 09 | 20 20 20 20 20 20 50 41 |, 1,....| PA|
|00003d50| 4e 45 4c 5f 4d 41 58 5f | 56 41 4c 55 45 2c 20 35 |NEL_MAX_|VALUE, 5|
|00003d60| 30 2c 0a 09 09 09 20 20 | 20 20 20 20 30 29 3b 0a |0,.... | 0);.|
|00003d70| 20 20 69 6e 63 72 5f 70 | 20 3d 20 70 61 6e 65 6c | incr_p| = panel|
|00003d80| 5f 63 72 65 61 74 65 5f | 69 74 65 6d 28 70 6e 2c |_create_|item(pn,|
|00003d90| 20 50 41 4e 45 4c 5f 53 | 4c 49 44 45 52 2c 0a 09 | PANEL_S|LIDER,..|
|00003da0| 09 09 20 20 20 20 20 50 | 41 4e 45 4c 5f 4c 41 42 |.. P|ANEL_LAB|
|00003db0| 45 4c 5f 58 2c 20 35 2c | 0a 09 09 09 20 20 20 20 |EL_X, 5,|.... |
|00003dc0| 20 50 41 4e 45 4c 5f 4c | 41 42 45 4c 5f 59 2c 20 | PANEL_L|ABEL_Y, |
|00003dd0| 32 35 2c 0a 09 09 09 20 | 20 20 20 20 50 41 4e 45 |25,.... | PANE|
|00003de0| 4c 5f 56 41 4c 55 45 5f | 58 2c 20 31 31 30 2c 0a |L_VALUE_|X, 110,.|
|00003df0| 09 09 09 20 20 20 20 20 | 50 41 4e 45 4c 5f 56 41 |... |PANEL_VA|
|00003e00| 4c 55 45 5f 59 2c 20 32 | 35 2c 0a 09 09 09 20 20 |LUE_Y, 2|5,.... |
|00003e10| 20 20 20 50 41 4e 45 4c | 5f 4c 41 42 45 4c 5f 53 | PANEL|_LABEL_S|
|00003e20| 54 52 49 4e 47 2c 20 22 | 49 6e 63 72 65 6d 65 6e |TRING, "|Incremen|
|00003e30| 74 3a 22 2c 0a 09 09 09 | 20 20 20 20 20 50 41 4e |t:",....| PAN|
|00003e40| 45 4c 5f 56 41 4c 55 45 | 2c 20 69 6e 63 72 2c 0a |EL_VALUE|, incr,.|
|00003e50| 09 09 09 20 20 20 20 20 | 50 41 4e 45 4c 5f 4d 49 |... |PANEL_MI|
|00003e60| 4e 5f 56 41 4c 55 45 2c | 20 31 2c 0a 09 09 09 20 |N_VALUE,| 1,.... |
|00003e70| 20 20 20 20 50 41 4e 45 | 4c 5f 4d 41 58 5f 56 41 | PANE|L_MAX_VA|
|00003e80| 4c 55 45 2c 20 31 30 2c | 0a 09 09 09 20 20 20 20 |LUE, 10,|.... |
|00003e90| 20 30 29 3b 0a 20 20 6d | 61 78 69 74 65 72 5f 70 | 0);. m|axiter_p|
|00003ea0| 20 3d 20 70 61 6e 65 6c | 5f 63 72 65 61 74 65 5f | = panel|_create_|
|00003eb0| 69 74 65 6d 28 70 6e 2c | 20 50 41 4e 45 4c 5f 53 |item(pn,| PANEL_S|
|00003ec0| 4c 49 44 45 52 2c 0a 09 | 09 09 09 50 41 4e 45 4c |LIDER,..|...PANEL|
|00003ed0| 5f 4c 41 42 45 4c 5f 58 | 2c 20 35 2c 0a 09 09 09 |_LABEL_X|, 5,....|
|00003ee0| 09 50 41 4e 45 4c 5f 4c | 41 42 45 4c 5f 59 2c 20 |.PANEL_L|ABEL_Y, |
|00003ef0| 34 35 2c 0a 09 09 09 09 | 50 41 4e 45 4c 5f 56 41 |45,.....|PANEL_VA|
|00003f00| 4c 55 45 5f 58 2c 20 37 | 38 2c 0a 09 09 09 09 50 |LUE_X, 7|8,.....P|
|00003f10| 41 4e 45 4c 5f 56 41 4c | 55 45 5f 59 2c 20 34 35 |ANEL_VAL|UE_Y, 45|
|00003f20| 2c 0a 09 09 09 09 50 41 | 4e 45 4c 5f 4c 41 42 45 |,.....PA|NEL_LABE|
|00003f30| 4c 5f 53 54 52 49 4e 47 | 2c 20 22 4d 61 78 69 74 |L_STRING|, "Maxit|
|00003f40| 65 72 3a 22 2c 0a 09 09 | 09 09 50 41 4e 45 4c 5f |er:",...|..PANEL_|
|00003f50| 56 41 4c 55 45 2c 20 6d | 61 78 69 74 65 72 2c 0a |VALUE, m|axiter,.|
|00003f60| 09 09 09 09 50 41 4e 45 | 4c 5f 4d 49 4e 5f 56 41 |....PANE|L_MIN_VA|
|00003f70| 4c 55 45 2c 20 31 30 2c | 0a 09 09 09 09 50 41 4e |LUE, 10,|.....PAN|
|00003f80| 45 4c 5f 4d 41 58 5f 56 | 41 4c 55 45 2c 20 31 30 |EL_MAX_V|ALUE, 10|
|00003f90| 30 30 2c 0a 09 09 09 09 | 30 29 3b 0a 20 20 70 61 |00,.....|0);. pa|
|00003fa0| 6e 65 6c 5f 63 72 65 61 | 74 65 5f 69 74 65 6d 28 |nel_crea|te_item(|
|00003fb0| 70 6e 2c 20 50 41 4e 45 | 4c 5f 4d 45 53 53 41 47 |pn, PANE|L_MESSAG|
|00003fc0| 45 2c 0a 09 09 20 20 20 | 20 50 41 4e 45 4c 5f 49 |E,... | PANEL_I|
|00003fd0| 54 45 4d 5f 58 2c 20 35 | 2c 0a 09 09 20 20 20 20 |TEM_X, 5|,... |
|00003fe0| 50 41 4e 45 4c 5f 49 54 | 45 4d 5f 59 2c 20 31 30 |PANEL_IT|EM_Y, 10|
|00003ff0| 30 2c 0a 09 09 20 20 20 | 20 50 41 4e 45 4c 5f 4c |0,... | PANEL_L|
|00004000| 41 42 45 4c 5f 53 54 52 | 49 4e 47 2c 20 22 58 6d |ABEL_STR|ING, "Xm|
|00004010| 69 6e 3a 22 2c 0a 09 09 | 20 20 20 20 50 41 4e 45 |in:",...| PANE|
|00004020| 4c 5f 4c 41 42 45 4c 5f | 42 4f 4c 44 2c 20 54 52 |L_LABEL_|BOLD, TR|
|00004030| 55 45 2c 0a 09 09 20 20 | 20 20 30 29 3b 0a 20 20 |UE,... | 0);. |
|00004040| 70 61 6e 65 6c 5f 63 72 | 65 61 74 65 5f 69 74 65 |panel_cr|eate_ite|
|00004050| 6d 28 70 6e 2c 20 50 41 | 4e 45 4c 5f 4d 45 53 53 |m(pn, PA|NEL_MESS|
|00004060| 41 47 45 2c 0a 09 09 20 | 20 20 20 50 41 4e 45 4c |AGE,... | PANEL|
|00004070| 5f 49 54 45 4d 5f 58 2c | 20 32 30 30 2c 0a 09 09 |_ITEM_X,| 200,...|
|00004080| 20 20 20 20 50 41 4e 45 | 4c 5f 49 54 45 4d 5f 59 | PANE|L_ITEM_Y|
|00004090| 2c 20 31 30 30 2c 0a 09 | 09 20 20 20 20 50 41 4e |, 100,..|. PAN|
|000040a0| 45 4c 5f 4c 41 42 45 4c | 5f 53 54 52 49 4e 47 2c |EL_LABEL|_STRING,|
|000040b0| 20 22 58 6d 61 78 3a 22 | 2c 0a 09 09 20 20 20 20 | "Xmax:"|,... |
|000040c0| 50 41 4e 45 4c 5f 4c 41 | 42 45 4c 5f 42 4f 4c 44 |PANEL_LA|BEL_BOLD|
|000040d0| 2c 20 54 52 55 45 2c 0a | 09 09 20 20 20 20 30 29 |, TRUE,.|.. 0)|
|000040e0| 3b 0a 20 20 70 61 6e 65 | 6c 5f 63 72 65 61 74 65 |;. pane|l_create|
|000040f0| 5f 69 74 65 6d 28 70 6e | 2c 20 50 41 4e 45 4c 5f |_item(pn|, PANEL_|
|00004100| 4d 45 53 53 41 47 45 2c | 0a 09 09 20 20 20 20 50 |MESSAGE,|... P|
|00004110| 41 4e 45 4c 5f 49 54 45 | 4d 5f 58 2c 20 35 2c 0a |ANEL_ITE|M_X, 5,.|
|00004120| 09 09 20 20 20 20 50 41 | 4e 45 4c 5f 49 54 45 4d |.. PA|NEL_ITEM|
|00004130| 5f 59 2c 20 31 32 30 2c | 0a 09 09 20 20 20 20 50 |_Y, 120,|... P|
|00004140| 41 4e 45 4c 5f 4c 41 42 | 45 4c 5f 53 54 52 49 4e |ANEL_LAB|EL_STRIN|
|00004150| 47 2c 20 22 59 6d 69 6e | 3a 22 2c 0a 09 09 20 20 |G, "Ymin|:",... |
|00004160| 20 20 50 41 4e 45 4c 5f | 4c 41 42 45 4c 5f 42 4f | PANEL_|LABEL_BO|
|00004170| 4c 44 2c 20 54 52 55 45 | 2c 0a 09 09 20 20 20 20 |LD, TRUE|,... |
|00004180| 30 29 3b 0a 20 20 70 61 | 6e 65 6c 5f 63 72 65 61 |0);. pa|nel_crea|
|00004190| 74 65 5f 69 74 65 6d 28 | 70 6e 2c 20 50 41 4e 45 |te_item(|pn, PANE|
|000041a0| 4c 5f 4d 45 53 53 41 47 | 45 2c 0a 09 09 20 20 20 |L_MESSAG|E,... |
|000041b0| 20 50 41 4e 45 4c 5f 49 | 54 45 4d 5f 58 2c 20 32 | PANEL_I|TEM_X, 2|
|000041c0| 30 30 2c 0a 09 09 20 20 | 20 20 50 41 4e 45 4c 5f |00,... | PANEL_|
|000041d0| 49 54 45 4d 5f 59 2c 20 | 31 32 30 2c 0a 09 09 20 |ITEM_Y, |120,... |
|000041e0| 20 20 20 50 41 4e 45 4c | 5f 4c 41 42 45 4c 5f 53 | PANEL|_LABEL_S|
|000041f0| 54 52 49 4e 47 2c 20 22 | 59 6d 61 78 3a 22 2c 0a |TRING, "|Ymax:",.|
|00004200| 09 09 20 20 20 20 50 41 | 4e 45 4c 5f 4c 41 42 45 |.. PA|NEL_LABE|
|00004210| 4c 5f 42 4f 4c 44 2c 20 | 54 52 55 45 2c 0a 09 09 |L_BOLD, |TRUE,...|
|00004220| 20 20 20 20 30 29 3b 0a | 0a 23 69 66 64 65 66 20 | 0);.|.#ifdef |
|00004230| 6e 6f 74 64 65 66 09 09 | 09 2f 2a 20 50 6f 73 73 |notdef..|./* Poss|
|00004240| 69 62 6c 65 20 66 75 74 | 75 72 65 20 65 6e 68 61 |ible fut|ure enha|
|00004250| 6e 63 65 6d 65 6e 74 2e | 2e 2e 20 2a 2f 0a 20 20 |ncement.|.. */. |
|00004260| 73 70 72 69 6e 74 66 28 | 4e 6d 61 78 5f 73 74 72 |sprintf(|Nmax_str|
|00004270| 2c 20 22 25 64 22 2c 20 | 4e 6d 61 78 29 3b 0a 20 |, "%d", |Nmax);. |
|00004280| 20 70 61 6e 65 6c 5f 63 | 72 65 61 74 65 5f 69 74 | panel_c|reate_it|
|00004290| 65 6d 28 70 6e 2c 20 50 | 41 4e 45 4c 5f 43 59 43 |em(pn, P|ANEL_CYC|
|000042a0| 4c 45 2c 0a 09 09 20 20 | 20 20 50 41 4e 45 4c 5f |LE,... | PANEL_|
|000042b0| 49 54 45 4d 5f 58 2c 20 | 33 35 30 2c 0a 09 09 20 |ITEM_X, |350,... |
|000042c0| 20 20 20 50 41 4e 45 4c | 5f 49 54 45 4d 5f 59 2c | PANEL|_ITEM_Y,|
|000042d0| 20 35 2c 0a 09 09 20 20 | 20 20 50 41 4e 45 4c 5f | 5,... | PANEL_|
|000042e0| 4c 41 42 45 4c 5f 53 54 | 52 49 4e 47 2c 20 22 49 |LABEL_ST|RING, "I|
|000042f0| 6d 61 67 65 20 73 69 7a | 65 3a 22 2c 0a 09 09 20 |mage siz|e:",... |
|00004300| 20 20 20 50 41 4e 45 4c | 5f 4c 41 42 45 4c 5f 42 | PANEL|_LABEL_B|
|00004310| 4f 4c 44 2c 20 54 52 55 | 45 2c 0a 09 09 20 20 20 |OLD, TRU|E,... |
|00004320| 20 50 41 4e 45 4c 5f 43 | 48 4f 49 43 45 5f 53 54 | PANEL_C|HOICE_ST|
|00004330| 52 49 4e 47 53 2c 20 4e | 6d 61 78 5f 73 74 72 2c |RINGS, N|max_str,|
|00004340| 20 22 35 31 32 22 2c 20 | 22 32 35 36 22 2c 20 30 | "512", |"256", 0|
|00004350| 2c 0a 09 09 20 20 20 20 | 50 41 4e 45 4c 5f 56 41 |,... |PANEL_VA|
|00004360| 4c 55 45 2c 20 31 2c 0a | 09 09 20 20 20 20 30 29 |LUE, 1,.|.. 0)|
|00004370| 3b 0a 23 65 6e 64 69 66 | 0a 0a 20 20 70 61 6e 65 |;.#endif|.. pane|
|00004380| 6c 5f 63 72 65 61 74 65 | 5f 69 74 65 6d 28 70 6e |l_create|_item(pn|
|00004390| 2c 20 50 41 4e 45 4c 5f | 42 55 54 54 4f 4e 2c 0a |, PANEL_|BUTTON,.|
|000043a0| 09 09 20 20 20 20 50 41 | 4e 45 4c 5f 49 54 45 4d |.. PA|NEL_ITEM|
|000043b0| 5f 58 2c 20 33 36 30 2c | 0a 09 09 20 20 20 20 50 |_X, 360,|... P|
|000043c0| 41 4e 45 4c 5f 49 54 45 | 4d 5f 59 2c 20 33 30 2c |ANEL_ITE|M_Y, 30,|
|000043d0| 0a 09 09 20 20 20 20 50 | 41 4e 45 4c 5f 4c 41 42 |... P|ANEL_LAB|
|000043e0| 45 4c 5f 49 4d 41 47 45 | 2c 20 70 61 6e 65 6c 5f |EL_IMAGE|, panel_|
|000043f0| 62 75 74 74 6f 6e 5f 69 | 6d 61 67 65 28 70 6e 2c |button_i|mage(pn,|
|00004400| 20 22 44 52 41 57 22 2c | 20 30 2c 20 62 66 29 2c | "DRAW",| 0, bf),|
|00004410| 0a 09 09 20 20 20 20 50 | 41 4e 45 4c 5f 4e 4f 54 |... P|ANEL_NOT|
|00004420| 49 46 59 5f 50 52 4f 43 | 2c 20 64 72 61 77 2c 0a |IFY_PROC|, draw,.|
|00004430| 09 09 20 20 20 20 30 29 | 3b 0a 20 20 70 61 6e 65 |.. 0)|;. pane|
|00004440| 6c 5f 63 72 65 61 74 65 | 5f 69 74 65 6d 28 70 6e |l_create|_item(pn|
|00004450| 2c 20 50 41 4e 45 4c 5f | 42 55 54 54 4f 4e 2c 0a |, PANEL_|BUTTON,.|
|00004460| 09 09 20 20 20 20 50 41 | 4e 45 4c 5f 49 54 45 4d |.. PA|NEL_ITEM|
|00004470| 5f 58 2c 20 33 36 30 2c | 0a 09 09 20 20 20 20 50 |_X, 360,|... P|
|00004480| 41 4e 45 4c 5f 49 54 45 | 4d 5f 59 2c 20 37 30 2c |ANEL_ITE|M_Y, 70,|
|00004490| 0a 09 09 20 20 20 20 50 | 41 4e 45 4c 5f 4c 41 42 |... P|ANEL_LAB|
|000044a0| 45 4c 5f 49 4d 41 47 45 | 2c 20 70 61 6e 65 6c 5f |EL_IMAGE|, panel_|
|000044b0| 62 75 74 74 6f 6e 5f 69 | 6d 61 67 65 28 70 6e 2c |button_i|mage(pn,|
|000044c0| 20 22 20 55 50 20 22 2c | 20 30 2c 20 62 66 29 2c | " UP ",| 0, bf),|
|000044d0| 0a 09 09 20 20 20 20 50 | 41 4e 45 4c 5f 4e 4f 54 |... P|ANEL_NOT|
|000044e0| 49 46 59 5f 50 52 4f 43 | 2c 20 75 70 2c 0a 09 09 |IFY_PROC|, up,...|
|000044f0| 20 20 20 20 30 29 3b 0a | 20 20 70 61 6e 65 6c 5f | 0);.| panel_|
|00004500| 63 72 65 61 74 65 5f 69 | 74 65 6d 28 70 6e 2c 20 |create_i|tem(pn, |
|00004510| 50 41 4e 45 4c 5f 42 55 | 54 54 4f 4e 2c 0a 09 09 |PANEL_BU|TTON,...|
|00004520| 20 20 20 20 50 41 4e 45 | 4c 5f 49 54 45 4d 5f 58 | PANE|L_ITEM_X|
|00004530| 2c 20 33 36 30 2c 0a 09 | 09 20 20 20 20 50 41 4e |, 360,..|. PAN|
|00004540| 45 4c 5f 49 54 45 4d 5f | 59 2c 20 31 31 30 2c 0a |EL_ITEM_|Y, 110,.|
|00004550| 09 09 20 20 20 20 50 41 | 4e 45 4c 5f 4c 41 42 45 |.. PA|NEL_LABE|
|00004560| 4c 5f 49 4d 41 47 45 2c | 20 70 61 6e 65 6c 5f 62 |L_IMAGE,| panel_b|
|00004570| 75 74 74 6f 6e 5f 69 6d | 61 67 65 28 70 6e 2c 20 |utton_im|age(pn, |
|00004580| 22 53 54 4f 50 22 2c 20 | 30 2c 20 62 66 29 2c 0a |"STOP", |0, bf),.|
|00004590| 09 09 20 20 20 20 50 41 | 4e 45 4c 5f 4e 4f 54 49 |.. PA|NEL_NOTI|
|000045a0| 46 59 5f 50 52 4f 43 2c | 20 73 74 6f 70 2c 0a 09 |FY_PROC,| stop,..|
|000045b0| 09 20 20 20 20 30 29 3b | 0a 20 20 70 61 6e 65 6c |. 0);|. panel|
|000045c0| 5f 63 72 65 61 74 65 5f | 69 74 65 6d 28 70 6e 2c |_create_|item(pn,|
|000045d0| 20 50 41 4e 45 4c 5f 42 | 55 54 54 4f 4e 2c 0a 09 | PANEL_B|UTTON,..|
|000045e0| 09 20 20 20 20 50 41 4e | 45 4c 5f 49 54 45 4d 5f |. PAN|EL_ITEM_|
|000045f0| 58 2c 20 34 35 30 2c 0a | 09 09 20 20 20 20 50 41 |X, 450,.|.. PA|
|00004600| 4e 45 4c 5f 49 54 45 4d | 5f 59 2c 20 37 32 2c 0a |NEL_ITEM|_Y, 72,.|
|00004610| 09 09 20 20 20 20 50 41 | 4e 45 4c 5f 4c 41 42 45 |.. PA|NEL_LABE|
|00004620| 4c 5f 49 4d 41 47 45 2c | 20 70 61 6e 65 6c 5f 62 |L_IMAGE,| panel_b|
|00004630| 75 74 74 6f 6e 5f 69 6d | 61 67 65 28 70 6e 2c 20 |utton_im|age(pn, |
|00004640| 22 51 75 69 74 22 2c 20 | 30 2c 20 70 66 29 2c 0a |"Quit", |0, pf),.|
|00004650| 09 09 20 20 20 20 50 41 | 4e 45 4c 5f 4e 4f 54 49 |.. PA|NEL_NOTI|
|00004660| 46 59 5f 50 52 4f 43 2c | 20 71 75 69 74 2c 0a 09 |FY_PROC,| quit,..|
|00004670| 09 20 20 20 20 30 29 3b | 0a 20 20 77 69 6e 64 6f |. 0);|. windo|
|00004680| 77 5f 66 69 74 5f 68 65 | 69 67 68 74 28 70 6e 29 |w_fit_he|ight(pn)|
|00004690| 3b 0a 20 20 63 76 20 3d | 20 77 69 6e 64 6f 77 5f |;. cv =| window_|
|000046a0| 63 72 65 61 74 65 28 66 | 72 2c 20 43 41 4e 56 41 |create(f|r, CANVA|
|000046b0| 53 2c 0a 09 09 20 20 20 | 20 20 57 49 4e 5f 57 49 |S,... | WIN_WI|
|000046c0| 44 54 48 2c 20 4e 2c 0a | 09 09 20 20 20 20 20 57 |DTH, N,.|.. W|
|000046d0| 49 4e 5f 48 45 49 47 48 | 54 2c 20 4e 2c 0a 09 09 |IN_HEIGH|T, N,...|
|000046e0| 20 20 20 20 20 57 49 4e | 5f 43 4f 4e 53 55 4d 45 | WIN|_CONSUME|
|000046f0| 5f 50 49 43 4b 5f 45 56 | 45 4e 54 2c 20 4c 4f 43 |_PICK_EV|ENT, LOC|
|00004700| 5f 44 52 41 47 2c 0a 09 | 09 20 20 20 20 20 57 49 |_DRAG,..|. WI|
|00004710| 4e 5f 45 56 45 4e 54 5f | 50 52 4f 43 2c 20 73 65 |N_EVENT_|PROC, se|
|00004720| 6c 5f 72 65 67 69 6f 6e | 2c 0a 09 09 20 20 20 20 |l_region|,... |
|00004730| 20 30 29 3b 0a 0a 20 20 | 77 69 6e 64 6f 77 5f 66 | 0);.. |window_f|
|00004740| 69 74 28 66 72 29 3b 0a | 20 20 6e 6f 74 69 66 79 |it(fr);.| notify|
|00004750| 5f 69 6e 74 65 72 70 6f | 73 65 5f 64 65 73 74 72 |_interpo|se_destr|
|00004760| 6f 79 5f 66 75 6e 63 28 | 66 72 2c 20 71 75 69 74 |oy_func(|fr, quit|
|00004770| 29 3b 0a 0a 20 20 70 77 | 20 3d 20 63 61 6e 76 61 |);.. pw| = canva|
|00004780| 73 5f 70 69 78 77 69 6e | 28 63 76 29 3b 0a 20 20 |s_pixwin|(cv);. |
|00004790| 6e 6f 74 69 66 79 5f 64 | 69 73 70 61 74 63 68 28 |notify_d|ispatch(|
|000047a0| 29 3b 09 09 2f 2a 20 54 | 6f 20 6d 61 6b 65 20 74 |);../* T|o make t|
|000047b0| 68 65 20 6e 65 78 74 20 | 70 75 74 5f 63 6f 6f 72 |he next |put_coor|
|000047c0| 64 73 20 77 6f 72 6b 20 | 2a 2f 0a 20 20 70 75 74 |ds work |*/. put|
|000047d0| 5f 63 6f 6f 72 64 73 28 | 30 2c 20 4e 2d 31 2c 20 |_coords(|0, N-1, |
|000047e0| 4e 2d 31 2c 20 30 29 3b | 0a 0a 20 20 62 7a 65 72 |N-1, 0);|.. bzer|
|000047f0| 6f 28 28 63 68 61 72 20 | 2a 29 20 4d 53 65 74 2c |o((char |*) MSet,|
|00004800| 20 73 69 7a 65 6f 66 28 | 4d 53 65 74 29 29 3b 0a | sizeof(|MSet));.|
|00004810| 20 20 70 77 5f 77 72 69 | 74 65 62 61 63 6b 67 72 | pw_wri|tebackgr|
|00004820| 6f 75 6e 64 28 70 77 2c | 20 30 2c 20 30 2c 20 4e |ound(pw,| 0, 0, N|
|00004830| 2c 20 4e 2c 20 50 49 58 | 5f 53 52 43 20 7c 20 50 |, N, PIX|_SRC | P|
|00004840| 49 58 5f 43 4f 4c 4f 52 | 28 31 29 29 3b 0a 0a 20 |IX_COLOR|(1));.. |
|00004850| 20 2f 2a 20 43 61 6e 6e | 6f 74 20 75 73 65 20 77 | /* Cann|ot use w|
|00004860| 69 6e 64 6f 77 5f 6d 61 | 69 6e 5f 6c 6f 6f 70 28 |indow_ma|in_loop(|
|00004870| 29 20 62 65 63 61 75 73 | 65 20 74 68 65 20 6e 6f |) becaus|e the no|
|00004880| 74 69 66 69 65 72 20 63 | 61 6e 27 74 20 64 69 73 |tifier c|an't dis|
|00004890| 70 61 74 63 68 0a 20 20 | 20 20 20 65 76 65 6e 74 |patch. | event|
|000048a0| 73 20 69 6e 73 69 64 65 | 20 61 20 50 41 4e 45 4c |s inside| a PANEL|
|000048b0| 5f 4e 4f 54 49 46 59 5f | 50 52 4f 43 2e 20 2a 2f |_NOTIFY_|PROC. */|
|000048c0| 0a 0a 20 20 77 68 69 6c | 65 20 28 31 29 20 7b 0a |.. whil|e (1) {.|
|000048d0| 20 20 20 20 6e 6f 74 69 | 66 79 5f 64 69 73 70 61 | noti|fy_dispa|
|000048e0| 74 63 68 28 29 3b 0a 20 | 20 20 20 69 66 20 28 64 |tch();. | if (d|
|000048f0| 72 61 77 5f 6e 65 77 5f | 69 6d 61 67 65 29 20 7b |raw_new_|image) {|
|00004900| 0a 20 20 20 20 20 20 70 | 61 6e 65 6c 5f 70 77 5f |. p|anel_pw_|
|00004910| 74 65 78 74 28 70 6e 2c | 20 33 34 37 2c 20 35 20 |text(pn,| 347, 5 |
|00004920| 2b 20 70 61 6e 65 6c 5f | 66 6f 6e 74 68 6f 6d 65 |+ panel_|fonthome|
|00004930| 28 62 66 29 2c 20 50 49 | 58 5f 53 52 43 2c 20 62 |(bf), PI|X_SRC, b|
|00004940| 66 2c 20 22 44 72 61 77 | 69 6e 67 21 22 29 3b 0a |f, "Draw|ing!");.|
|00004950| 20 20 20 20 20 20 63 6f | 6d 70 75 74 65 28 29 3b | co|mpute();|
|00004960| 0a 20 20 20 20 20 20 70 | 61 6e 65 6c 5f 70 77 5f |. p|anel_pw_|
|00004970| 74 65 78 74 28 70 6e 2c | 20 33 34 37 2c 20 35 20 |text(pn,| 347, 5 |
|00004980| 2b 20 70 61 6e 65 6c 5f | 66 6f 6e 74 68 6f 6d 65 |+ panel_|fonthome|
|00004990| 28 62 66 29 2c 20 50 49 | 58 5f 53 52 43 2c 20 62 |(bf), PI|X_SRC, b|
|000049a0| 66 2c 20 22 20 20 20 20 | 20 20 20 20 22 29 3b 0a |f, " | ");.|
|000049b0| 20 20 20 20 20 20 64 72 | 61 77 5f 6e 65 77 5f 69 | dr|aw_new_i|
|000049c0| 6d 61 67 65 20 3d 20 46 | 41 4c 53 45 3b 0a 20 20 |mage = F|ALSE;. |
|000049d0| 20 20 7d 0a 20 20 20 20 | 75 73 6c 65 65 70 28 35 | }. |usleep(5|
|000049e0| 30 30 30 30 29 3b 0a 20 | 20 7d 0a 7d 0a 0a 70 75 |0000);. | }.}..pu|
|000049f0| 74 5f 63 6f 6f 72 64 73 | 28 69 78 6d 69 6e 2c 20 |t_coords|(ixmin, |
|00004a00| 69 78 6d 61 78 2c 20 69 | 79 6d 69 6e 2c 20 69 79 |ixmax, i|ymin, iy|
|00004a10| 6d 61 78 29 0a 20 20 20 | 20 20 69 6e 74 20 69 78 |max). | int ix|
|00004a20| 6d 69 6e 2c 20 69 78 6d | 61 78 2c 20 69 79 6d 69 |min, ixm|ax, iymi|
|00004a30| 6e 2c 20 69 79 6d 61 78 | 3b 0a 7b 0a 20 20 63 68 |n, iymax|;.{. ch|
|00004a40| 61 72 20 73 74 72 5b 32 | 30 5d 3b 0a 0a 20 20 73 |ar str[2|0];.. s|
|00004a50| 70 72 69 6e 74 66 28 73 | 74 72 2c 20 22 25 31 30 |printf(s|tr, "%10|
|00004a60| 2e 37 6c 66 22 2c 20 78 | 6d 69 6e 20 2b 20 73 69 |.7lf", x|min + si|
|00004a70| 64 65 20 2a 20 69 78 6d | 69 6e 2f 28 4e 2d 31 29 |de * ixm|in/(N-1)|
|00004a80| 29 3b 0a 20 20 70 61 6e | 65 6c 5f 70 77 5f 74 65 |);. pan|el_pw_te|
|00004a90| 78 74 28 70 6e 2c 20 35 | 30 2c 20 31 30 30 20 2b |xt(pn, 5|0, 100 +|
|00004aa0| 20 70 61 6e 65 6c 5f 66 | 6f 6e 74 68 6f 6d 65 28 | panel_f|onthome(|
|00004ab0| 70 66 29 2c 20 50 49 58 | 5f 53 52 43 2c 20 70 66 |pf), PIX|_SRC, pf|
|00004ac0| 2c 20 73 74 72 29 3b 0a | 20 20 73 70 72 69 6e 74 |, str);.| sprint|
|00004ad0| 66 28 73 74 72 2c 20 22 | 25 31 30 2e 37 6c 66 22 |f(str, "|%10.7lf"|
|00004ae0| 2c 20 78 6d 69 6e 20 2b | 20 73 69 64 65 20 2a 20 |, xmin +| side * |
|00004af0| 69 78 6d 61 78 2f 28 4e | 2d 31 29 29 3b 0a 20 20 |ixmax/(N|-1));. |
|00004b00| 70 61 6e 65 6c 5f 70 77 | 5f 74 65 78 74 28 70 6e |panel_pw|_text(pn|
|00004b10| 2c 20 32 34 35 2c 20 31 | 30 30 20 2b 20 70 61 6e |, 245, 1|00 + pan|
|00004b20| 65 6c 5f 66 6f 6e 74 68 | 6f 6d 65 28 70 66 29 2c |el_fonth|ome(pf),|
|00004b30| 20 50 49 58 5f 53 52 43 | 2c 20 70 66 2c 20 73 74 | PIX_SRC|, pf, st|
|00004b40| 72 29 3b 0a 20 20 73 70 | 72 69 6e 74 66 28 73 74 |r);. sp|rintf(st|
|00004b50| 72 2c 20 22 25 31 30 2e | 37 6c 66 22 2c 20 79 6d |r, "%10.|7lf", ym|
|00004b60| 69 6e 20 2b 20 73 69 64 | 65 20 2a 20 28 4e 2d 31 |in + sid|e * (N-1|
|00004b70| 2d 69 79 6d 69 6e 29 2f | 28 4e 2d 31 29 29 3b 0a |-iymin)/|(N-1));.|
|00004b80| 20 20 70 61 6e 65 6c 5f | 70 77 5f 74 65 78 74 28 | panel_|pw_text(|
|00004b90| 70 6e 2c 20 35 30 2c 20 | 31 32 30 20 2b 20 70 61 |pn, 50, |120 + pa|
|00004ba0| 6e 65 6c 5f 66 6f 6e 74 | 68 6f 6d 65 28 70 66 29 |nel_font|home(pf)|
|00004bb0| 2c 20 50 49 58 5f 53 52 | 43 2c 20 70 66 2c 20 73 |, PIX_SR|C, pf, s|
|00004bc0| 74 72 29 3b 0a 20 20 73 | 70 72 69 6e 74 66 28 73 |tr);. s|printf(s|
|00004bd0| 74 72 2c 20 22 25 31 30 | 2e 37 6c 66 22 2c 20 79 |tr, "%10|.7lf", y|
|00004be0| 6d 69 6e 20 2b 20 73 69 | 64 65 20 2a 20 28 4e 2d |min + si|de * (N-|
|00004bf0| 31 2d 69 79 6d 61 78 29 | 2f 28 4e 2d 31 29 29 3b |1-iymax)|/(N-1));|
|00004c00| 0a 20 20 70 61 6e 65 6c | 5f 70 77 5f 74 65 78 74 |. panel|_pw_text|
|00004c10| 28 70 6e 2c 20 32 34 35 | 2c 20 31 32 30 20 2b 20 |(pn, 245|, 120 + |
|00004c20| 70 61 6e 65 6c 5f 66 6f | 6e 74 68 6f 6d 65 28 70 |panel_fo|nthome(p|
|00004c30| 66 29 2c 20 50 49 58 5f | 53 52 43 2c 20 70 66 2c |f), PIX_|SRC, pf,|
|00004c40| 20 73 74 72 29 3b 0a 7d | 0a 0a 76 6f 69 64 20 73 | str);.}|..void s|
|00004c50| 65 6c 5f 72 65 67 69 6f | 6e 28 63 61 6e 76 61 73 |el_regio|n(canvas|
|00004c60| 2c 20 65 76 65 6e 74 2c | 20 61 72 67 29 0a 20 20 |, event,| arg). |
|00004c70| 20 20 20 43 61 6e 76 61 | 73 20 63 61 6e 76 61 73 | Canva|s canvas|
|00004c80| 3b 0a 20 20 20 20 20 45 | 76 65 6e 74 20 2a 65 76 |;. E|vent *ev|
|00004c90| 65 6e 74 3b 0a 20 20 20 | 20 20 63 68 61 72 20 2a |ent;. | char *|
|00004ca0| 61 72 67 3b 0a 7b 0a 20 | 20 73 74 61 74 69 63 20 |arg;.{. | static |
|00004cb0| 42 6f 6f 6c 20 6d 6f 75 | 73 65 69 6e 67 20 3d 20 |Bool mou|seing = |
|00004cc0| 46 41 4c 53 45 3b 0a 20 | 20 72 65 67 69 73 74 65 |FALSE;. | registe|
|00004cd0| 72 20 69 6e 74 20 6d 61 | 78 64 69 73 74 2c 20 74 |r int ma|xdist, t|
|00004ce0| 6d 70 78 2c 20 74 6d 70 | 79 3b 0a 0a 23 64 65 66 |mpx, tmp|y;..#def|
|00004cf0| 69 6e 65 20 6d 6b 62 6f | 78 28 61 2c 62 2c 63 2c |ine mkbo|x(a,b,c,|
|00004d00| 64 29 20 5c 0a 20 20 70 | 77 5f 76 65 63 74 6f 72 |d) \. p|w_vector|
|00004d10| 28 70 77 2c 20 61 2c 20 | 62 2c 20 63 2c 20 62 2c |(pw, a, |b, c, b,|
|00004d20| 20 50 49 58 5f 53 52 43 | 5e 50 49 58 5f 44 53 54 | PIX_SRC|^PIX_DST|
|00004d30| 2c 20 31 29 3b 5c 0a 20 | 20 70 77 5f 76 65 63 74 |, 1);\. | pw_vect|
|00004d40| 6f 72 28 70 77 2c 20 61 | 2c 20 62 2c 20 61 2c 20 |or(pw, a|, b, a, |
|00004d50| 64 2c 20 50 49 58 5f 53 | 52 43 5e 50 49 58 5f 44 |d, PIX_S|RC^PIX_D|
|00004d60| 53 54 2c 20 31 29 3b 5c | 0a 20 20 70 77 5f 76 65 |ST, 1);\|. pw_ve|
|00004d70| 63 74 6f 72 28 70 77 2c | 20 63 2c 20 62 2c 20 63 |ctor(pw,| c, b, c|
|00004d80| 2c 20 64 2c 20 50 49 58 | 5f 53 52 43 5e 50 49 58 |, d, PIX|_SRC^PIX|
|00004d90| 5f 44 53 54 2c 20 31 29 | 3b 5c 0a 20 20 70 77 5f |_DST, 1)|;\. pw_|
|00004da0| 76 65 63 74 6f 72 28 70 | 77 2c 20 61 2c 20 64 2c |vector(p|w, a, d,|
|00004db0| 20 63 2c 20 64 2c 20 50 | 49 58 5f 53 52 43 5e 50 | c, d, P|IX_SRC^P|
|00004dc0| 49 58 5f 44 53 54 2c 20 | 31 29 0a 0a 20 20 73 77 |IX_DST, |1).. sw|
|00004dd0| 69 74 63 68 20 28 65 76 | 65 6e 74 5f 61 63 74 69 |itch (ev|ent_acti|
|00004de0| 6f 6e 28 65 76 65 6e 74 | 29 29 20 7b 0a 20 20 20 |on(event|)) {. |
|00004df0| 20 63 61 73 65 20 4d 53 | 5f 4c 45 46 54 3a 0a 20 | case MS|_LEFT:. |
|00004e00| 20 20 20 20 20 69 66 20 | 28 65 76 65 6e 74 5f 69 | if |(event_i|
|00004e10| 73 5f 64 6f 77 6e 28 65 | 76 65 6e 74 29 29 20 7b |s_down(e|vent)) {|
|00004e20| 0a 09 69 66 20 28 73 65 | 6c 65 63 74 65 64 29 20 |..if (se|lected) |
|00004e30| 7b 09 09 2f 2a 20 52 65 | 6d 6f 76 65 20 6f 6c 64 |{../* Re|move old|
|00004e40| 20 62 6f 78 20 66 69 72 | 73 74 20 2a 2f 0a 09 20 | box fir|st */.. |
|00004e50| 20 6d 6b 62 6f 78 28 73 | 74 61 72 74 5f 78 2c 20 | mkbox(s|tart_x, |
|00004e60| 73 74 61 72 74 5f 79 2c | 20 6e 65 77 5f 78 2c 20 |start_y,| new_x, |
|00004e70| 6e 65 77 5f 79 29 3b 0a | 09 7d 0a 09 73 74 61 72 |new_y);.|.}..star|
|00004e80| 74 5f 78 20 3d 20 6e 65 | 77 5f 78 20 3d 20 65 76 |t_x = ne|w_x = ev|
|00004e90| 65 6e 74 5f 78 28 65 76 | 65 6e 74 29 3b 0a 09 73 |ent_x(ev|ent);..s|
|00004ea0| 74 61 72 74 5f 79 20 3d | 20 6e 65 77 5f 79 20 3d |tart_y =| new_y =|
|00004eb0| 20 65 76 65 6e 74 5f 79 | 28 65 76 65 6e 74 29 3b | event_y|(event);|
|00004ec0| 0a 09 70 75 74 5f 63 6f | 6f 72 64 73 28 6e 65 77 |..put_co|ords(new|
|00004ed0| 5f 78 2c 20 6e 65 77 5f | 78 2c 20 6e 65 77 5f 79 |_x, new_|x, new_y|
|00004ee0| 2c 20 6e 65 77 5f 79 29 | 3b 0a 09 6d 6f 75 73 65 |, new_y)|;..mouse|
|00004ef0| 69 6e 67 20 3d 20 54 52 | 55 45 3b 0a 20 20 20 20 |ing = TR|UE;. |
|00004f00| 20 20 7d 20 65 6c 73 65 | 20 7b 0a 09 6d 6f 75 73 | } else| {..mous|
|00004f10| 65 69 6e 67 20 3d 20 46 | 41 4c 53 45 3b 0a 09 73 |eing = F|ALSE;..s|
|00004f20| 65 6c 65 63 74 65 64 20 | 3d 20 54 52 55 45 3b 0a |elected |= TRUE;.|
|00004f30| 20 20 20 20 20 20 7d 0a | 20 20 20 20 20 20 62 72 | }.| br|
|00004f40| 65 61 6b 3b 0a 20 20 20 | 20 63 61 73 65 20 4c 4f |eak;. | case LO|
|00004f50| 43 5f 44 52 41 47 3a 0a | 20 20 20 20 20 20 69 66 |C_DRAG:.| if|
|00004f60| 20 28 6d 6f 75 73 65 69 | 6e 67 29 20 7b 0a 09 6d | (mousei|ng) {..m|
|00004f70| 6b 62 6f 78 28 73 74 61 | 72 74 5f 78 2c 20 73 74 |kbox(sta|rt_x, st|
|00004f80| 61 72 74 5f 79 2c 20 6e | 65 77 5f 78 2c 20 6e 65 |art_y, n|ew_x, ne|
|00004f90| 77 5f 79 29 3b 20 2f 2a | 20 52 65 6d 6f 76 65 20 |w_y); /*| Remove |
|00004fa0| 6f 6c 64 20 62 6f 78 20 | 2a 2f 0a 0a 09 2f 2a 20 |old box |*/.../* |
|00004fb0| 57 65 20 77 61 6e 74 20 | 74 6f 20 72 65 73 74 72 |We want |to restr|
|00004fc0| 69 63 74 20 74 68 65 20 | 73 69 7a 65 20 74 6f 20 |ict the |size to |
|00004fd0| 62 65 20 73 71 75 61 72 | 65 20 2a 2f 0a 09 74 6d |be squar|e */..tm|
|00004fe0| 70 78 20 3d 20 65 76 65 | 6e 74 5f 78 28 65 76 65 |px = eve|nt_x(eve|
|00004ff0| 6e 74 29 20 2d 20 73 74 | 61 72 74 5f 78 3b 0a 09 |nt) - st|art_x;..|
|00005000| 74 6d 70 79 20 3d 20 73 | 74 61 72 74 5f 79 20 2d |tmpy = s|tart_y -|
|00005010| 20 65 76 65 6e 74 5f 79 | 28 65 76 65 6e 74 29 3b | event_y|(event);|
|00005020| 0a 09 6d 61 78 64 69 73 | 74 20 3d 20 4d 49 4e 28 |..maxdis|t = MIN(|
|00005030| 74 6d 70 78 20 2a 20 73 | 67 6e 28 74 6d 70 78 29 |tmpx * s|gn(tmpx)|
|00005040| 2c 20 74 6d 70 79 20 2a | 20 73 67 6e 28 74 6d 70 |, tmpy *| sgn(tmp|
|00005050| 79 29 29 3b 0a 09 6e 65 | 77 5f 78 20 3d 20 73 74 |y));..ne|w_x = st|
|00005060| 61 72 74 5f 78 20 2b 20 | 6d 61 78 64 69 73 74 20 |art_x + |maxdist |
|00005070| 2a 20 73 67 6e 28 74 6d | 70 78 29 3b 0a 09 6e 65 |* sgn(tm|px);..ne|
|00005080| 77 5f 79 20 3d 20 73 74 | 61 72 74 5f 79 20 2d 20 |w_y = st|art_y - |
|00005090| 6d 61 78 64 69 73 74 20 | 2a 20 73 67 6e 28 74 6d |maxdist |* sgn(tm|
|000050a0| 70 79 29 3b 0a 0a 09 6d | 6b 62 6f 78 28 73 74 61 |py);...m|kbox(sta|
|000050b0| 72 74 5f 78 2c 20 73 74 | 61 72 74 5f 79 2c 20 6e |rt_x, st|art_y, n|
|000050c0| 65 77 5f 78 2c 20 6e 65 | 77 5f 79 29 3b 20 2f 2a |ew_x, ne|w_y); /*|
|000050d0| 20 44 72 61 77 20 6e 65 | 77 20 62 6f 78 20 2a 2f | Draw ne|w box */|
|000050e0| 0a 09 70 75 74 5f 63 6f | 6f 72 64 73 28 4d 49 4e |..put_co|ords(MIN|
|000050f0| 28 73 74 61 72 74 5f 78 | 2c 20 6e 65 77 5f 78 29 |(start_x|, new_x)|
|00005100| 2c 20 4d 41 58 28 73 74 | 61 72 74 5f 78 2c 20 6e |, MAX(st|art_x, n|
|00005110| 65 77 5f 78 29 2c 0a 09 | 09 20 20 20 4d 41 58 28 |ew_x),..|. MAX(|
|00005120| 73 74 61 72 74 5f 79 2c | 20 6e 65 77 5f 79 29 2c |start_y,| new_y),|
|00005130| 20 4d 49 4e 28 73 74 61 | 72 74 5f 79 2c 20 6e 65 | MIN(sta|rt_y, ne|
|00005140| 77 5f 79 29 29 3b 0a 20 | 20 20 20 20 20 7d 0a 20 |w_y));. | }. |
|00005150| 20 20 20 20 20 62 72 65 | 61 6b 3b 0a 20 20 20 20 | bre|ak;. |
|00005160| 63 61 73 65 20 4d 53 5f | 4d 49 44 44 4c 45 3a 0a |case MS_|MIDDLE:.|
|00005170| 20 20 20 20 20 20 69 66 | 20 28 73 65 6c 65 63 74 | if| (select|
|00005180| 65 64 29 20 7b 0a 09 6d | 6b 62 6f 78 28 73 74 61 |ed) {..m|kbox(sta|
|00005190| 72 74 5f 78 2c 20 73 74 | 61 72 74 5f 79 2c 20 6e |rt_x, st|art_y, n|
|000051a0| 65 77 5f 78 2c 20 6e 65 | 77 5f 79 29 3b 0a 09 73 |ew_x, ne|w_y);..s|
|000051b0| 65 6c 65 63 74 65 64 20 | 3d 20 46 41 4c 53 45 3b |elected |= FALSE;|
|000051c0| 0a 20 20 20 20 20 20 7d | 0a 20 20 20 20 7d 0a 7d |. }|. }.}|
|000051d0| 0a 0a 76 6f 69 64 20 73 | 74 6f 70 28 29 0a 7b 0a |..void s|top().{.|
|000051e0| 20 20 61 62 6f 72 74 20 | 3d 20 54 52 55 45 3b 0a | abort |= TRUE;.|
|000051f0| 7d 0a 0a 76 6f 69 64 20 | 75 70 28 29 0a 7b 0a 20 |}..void |up().{. |
|00005200| 20 69 66 20 28 73 70 20 | 3e 20 30 29 20 7b 0a 20 | if (sp |> 0) {. |
|00005210| 20 20 20 50 69 78 72 65 | 63 74 20 2a 6f 6c 64 3b | Pixre|ct *old;|
|00005220| 0a 20 20 20 20 72 65 67 | 69 73 74 65 72 20 69 6e |. reg|ister in|
|00005230| 74 20 69 2c 20 6a 2c 20 | 6b 3b 0a 20 20 20 20 42 |t i, j, |k;. B|
|00005240| 6f 6f 6c 20 2a 6d 65 6d | 3b 0a 0a 20 20 20 20 73 |ool *mem|;.. s|
|00005250| 65 6c 65 63 74 65 64 20 | 3d 20 46 41 4c 53 45 3b |elected |= FALSE;|
|00005260| 0a 20 20 20 20 73 70 2d | 2d 3b 0a 20 20 20 20 78 |. sp-|-;. x|
|00005270| 6d 69 6e 20 3d 20 53 74 | 61 63 6b 5b 73 70 5d 2e |min = St|ack[sp].|
|00005280| 78 6d 69 6e 3b 0a 20 20 | 20 20 78 6d 61 78 20 3d |xmin;. | xmax =|
|00005290| 20 53 74 61 63 6b 5b 73 | 70 5d 2e 78 6d 61 78 3b | Stack[s|p].xmax;|
|000052a0| 0a 20 20 20 20 79 6d 69 | 6e 20 3d 20 53 74 61 63 |. ymi|n = Stac|
|000052b0| 6b 5b 73 70 5d 2e 79 6d | 69 6e 3b 0a 20 20 20 20 |k[sp].ym|in;. |
|000052c0| 79 6d 61 78 20 3d 20 53 | 74 61 63 6b 5b 73 70 5d |ymax = S|tack[sp]|
|000052d0| 2e 79 6d 61 78 3b 0a 20 | 20 20 20 73 69 64 65 20 |.ymax;. | side |
|000052e0| 3d 20 78 6d 61 78 20 2d | 20 78 6d 69 6e 3b 0a 20 |= xmax -| xmin;. |
|000052f0| 20 20 20 70 75 74 5f 63 | 6f 6f 72 64 73 28 30 2c | put_c|oords(0,|
|00005300| 20 4e 2d 31 2c 20 4e 2d | 31 2c 20 30 29 3b 0a 20 | N-1, N-|1, 0);. |
|00005310| 20 20 20 6f 6c 64 20 3d | 20 53 74 61 63 6b 5b 73 | old =| Stack[s|
|00005320| 70 5d 2e 70 72 3b 0a 20 | 20 20 20 70 77 5f 77 72 |p].pr;. | pw_wr|
|00005330| 69 74 65 28 70 77 2c 20 | 30 2c 20 30 2c 20 4e 2c |ite(pw, |0, 0, N,|
|00005340| 20 4e 2c 20 50 49 58 5f | 53 52 43 2c 20 6f 6c 64 | N, PIX_|SRC, old|
|00005350| 2c 20 30 2c 20 30 29 3b | 0a 0a 20 20 20 20 2f 2a |, 0, 0);|.. /*|
|00005360| 20 52 65 73 74 6f 72 65 | 20 4d 53 65 74 20 2a 2f | Restore| MSet */|
|00005370| 0a 20 20 20 20 2f 2a 20 | 54 68 69 73 20 69 73 20 |. /* |This is |
|00005380| 75 67 6c 79 20 2d 20 49 | 27 6d 20 61 73 73 75 6d |ugly - I|'m assum|
|00005390| 69 6e 67 20 74 68 61 74 | 20 73 69 7a 65 6f 66 28 |ing that| sizeof(|
|000053a0| 42 6f 6f 6c 29 20 3d 3d | 20 31 2e 20 53 68 61 6d |Bool) ==| 1. Sham|
|000053b0| 65 20 6f 6e 20 6d 65 21 | 20 2a 2f 0a 20 20 20 20 |e on me!| */. |
|000053c0| 6d 65 6d 20 3d 20 28 42 | 6f 6f 6c 20 2a 29 20 6d |mem = (B|ool *) m|
|000053d0| 70 72 5f 64 28 6f 6c 64 | 29 2d 3e 6d 64 5f 69 6d |pr_d(old|)->md_im|
|000053e0| 61 67 65 3b 0a 20 20 20 | 20 66 6f 72 20 28 69 3d |age;. | for (i=|
|000053f0| 30 3b 20 69 3c 4e 3b 20 | 69 2b 2b 29 20 7b 0a 20 |0; i<N; |i++) {. |
|00005400| 20 20 20 20 20 66 6f 72 | 20 28 6a 3d 30 3b 20 6a | for| (j=0; j|
|00005410| 3c 4e 3b 20 6a 2b 3d 38 | 29 20 7b 0a 09 66 6f 72 |<N; j+=8|) {..for|
|00005420| 20 28 6b 3d 30 3b 20 6b | 3c 38 3b 20 6b 2b 2b 29 | (k=0; k|<8; k++)|
|00005430| 0a 09 20 20 4d 53 65 74 | 5b 6a 2b 6b 5d 5b 4e 2d |.. MSet|[j+k][N-|
|00005440| 31 2d 69 5d 20 3d 20 28 | 28 2a 6d 65 6d 20 26 20 |1-i] = (|(*mem & |
|00005450| 28 31 3c 3c 28 37 2d 6b | 29 29 29 20 3e 3e 20 28 |(1<<(7-k|))) >> (|
|00005460| 37 2d 6b 29 29 20 3d 3d | 20 30 20 3f 20 31 20 3a |7-k)) ==| 0 ? 1 :|
|00005470| 20 30 3b 0a 09 6d 65 6d | 2b 2b 3b 0a 20 20 20 20 | 0;..mem|++;. |
|00005480| 20 20 7d 0a 20 20 20 20 | 7d 0a 20 20 20 20 70 72 | }. |}. pr|
|00005490| 5f 64 65 73 74 72 6f 79 | 28 6f 6c 64 29 3b 0a 20 |_destroy|(old);. |
|000054a0| 20 7d 0a 7d 0a 20 20 20 | 20 0a 76 6f 69 64 20 64 | }.}. | .void d|
|000054b0| 72 61 77 28 29 0a 7b 0a | 20 20 64 72 61 77 5f 6e |raw().{.| draw_n|
|000054c0| 65 77 5f 69 6d 61 67 65 | 20 3d 20 54 52 55 45 3b |ew_image| = TRUE;|
|000054d0| 0a 7d 0a 0a 76 6f 69 64 | 20 71 75 69 74 28 29 0a |.}..void| quit().|
|000054e0| 7b 0a 23 69 66 64 65 66 | 20 6f 6c 64 53 75 6e 4f |{.#ifdef| oldSunO|
|000054f0| 53 0a 20 20 65 78 69 74 | 28 30 29 3b 09 09 09 2f |S. exit|(0);.../|
|00005500| 2a 20 59 6f 75 20 77 6f | 6e 27 74 20 6d 69 73 73 |* You wo|n't miss|
|00005510| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 66 | the fol|lowing f|
|00005520| 61 6e 63 79 20 73 74 75 | 66 66 2e 2e 20 2a 2f 0a |ancy stu|ff.. */.|
|00005530| 23 65 6c 73 65 0a 20 20 | 69 66 20 28 61 6c 65 72 |#else. |if (aler|
|00005540| 74 5f 70 72 6f 6d 70 74 | 28 66 72 2c 20 28 45 76 |t_prompt|(fr, (Ev|
|00005550| 65 6e 74 20 2a 29 30 2c | 0a 09 09 20 20 20 41 4c |ent *)0,|... AL|
|00005560| 45 52 54 5f 4d 45 53 53 | 41 47 45 5f 53 54 52 49 |ERT_MESS|AGE_STRI|
|00005570| 4e 47 53 2c 0a 09 09 20 | 20 20 20 20 22 50 6c 65 |NGS,... | "Ple|
|00005580| 61 73 65 20 63 6f 6e 66 | 69 72 6d 3a 22 2c 0a 09 |ase conf|irm:",..|
|00005590| 09 20 20 20 20 20 22 44 | 6f 20 79 6f 75 20 6b 6e |. "D|o you kn|
|000055a0| 6f 77 20 77 68 61 74 20 | 79 6f 75 27 72 65 20 64 |ow what |you're d|
|000055b0| 6f 69 6e 67 3f 3f 22 2c | 0a 09 09 20 20 20 20 20 |oing??",|... |
|000055c0| 30 2c 0a 09 09 20 20 20 | 41 4c 45 52 54 5f 42 55 |0,... |ALERT_BU|
|000055d0| 54 54 4f 4e 5f 59 45 53 | 2c 20 22 4f 66 20 63 6f |TTON_YES|, "Of co|
|000055e0| 75 72 73 65 2c 20 71 75 | 69 74 20 62 75 67 67 69 |urse, qu|it buggi|
|000055f0| 6e 67 20 6d 65 21 22 2c | 0a 09 09 20 20 20 41 4c |ng me!",|... AL|
|00005600| 45 52 54 5f 42 55 54 54 | 4f 4e 5f 4e 4f 2c 20 22 |ERT_BUTT|ON_NO, "|
|00005610| 53 6f 72 72 79 2c 20 49 | 20 68 69 74 20 74 68 65 |Sorry, I| hit the|
|00005620| 20 77 72 6f 6e 67 20 62 | 75 74 74 6f 6e 2e 2e 2e | wrong b|utton...|
|00005630| 22 2c 0a 09 09 20 20 20 | 41 4c 45 52 54 5f 4d 45 |",... |ALERT_ME|
|00005640| 53 53 41 47 45 5f 46 4f | 4e 54 2c 20 62 66 2c 0a |SSAGE_FO|NT, bf,.|
|00005650| 09 09 20 20 20 41 4c 45 | 52 54 5f 42 55 54 54 4f |.. ALE|RT_BUTTO|
|00005660| 4e 5f 46 4f 4e 54 2c 20 | 70 66 2c 0a 09 09 20 20 |N_FONT, |pf,... |
|00005670| 20 30 29 0a 20 20 20 20 | 20 20 3d 3d 20 41 4c 45 | 0). | == ALE|
|00005680| 52 54 5f 59 45 53 29 20 | 7b 0a 20 20 20 20 65 78 |RT_YES) |{. ex|
|00005690| 69 74 28 30 29 3b 0a 20 | 20 7d 20 65 6c 73 65 0a |it(0);. | } else.|
|000056a0| 20 20 20 20 6e 6f 74 69 | 66 79 5f 76 65 74 6f 5f | noti|fy_veto_|
|000056b0| 64 65 73 74 72 6f 79 28 | 66 72 29 3b 0a 23 65 6e |destroy(|fr);.#en|
|000056c0| 64 69 66 0a 7d 0a 0a 63 | 6f 6d 70 75 74 65 28 29 |dif.}..c|ompute()|
|000056d0| 0a 7b 0a 20 20 72 65 67 | 69 73 74 65 72 20 69 6e |.{. reg|ister in|
|000056e0| 74 20 69 78 2c 20 69 79 | 3b 0a 0a 20 20 69 66 20 |t ix, iy|;.. if |
|000056f0| 28 73 65 6c 65 63 74 65 | 64 20 26 26 20 73 74 61 |(selecte|d && sta|
|00005700| 72 74 5f 78 20 21 3d 20 | 6e 65 77 5f 78 29 20 7b |rt_x != |new_x) {|
|00005710| 20 2f 2a 20 4e 65 77 20 | 72 65 67 69 6f 6e 20 73 | /* New |region s|
|00005720| 65 6c 65 63 74 65 64 20 | 2a 2f 0a 20 20 20 20 50 |elected |*/. P|
|00005730| 69 78 72 65 63 74 20 2a | 73 61 76 65 20 3d 20 6d |ixrect *|save = m|
|00005740| 65 6d 5f 63 72 65 61 74 | 65 28 4e 2c 20 4e 2c 20 |em_creat|e(N, N, |
|00005750| 31 29 3b 0a 20 20 20 20 | 6d 6b 62 6f 78 28 73 74 |1);. |mkbox(st|
|00005760| 61 72 74 5f 78 2c 20 73 | 74 61 72 74 5f 79 2c 20 |art_x, s|tart_y, |
|00005770| 6e 65 77 5f 78 2c 20 6e | 65 77 5f 79 29 3b 20 2f |new_x, n|ew_y); /|
|00005780| 2a 20 52 65 6d 6f 76 65 | 20 74 68 65 20 62 6f 78 |* Remove| the box|
|00005790| 20 66 69 72 73 74 20 2a | 2f 0a 20 20 20 20 70 77 | first *|/. pw|
|000057a0| 5f 72 65 61 64 28 73 61 | 76 65 2c 20 30 2c 20 30 |_read(sa|ve, 0, 0|
|000057b0| 2c 20 4e 2c 20 4e 2c 20 | 50 49 58 5f 53 52 43 2c |, N, N, |PIX_SRC,|
|000057c0| 20 70 77 2c 20 30 2c 20 | 30 29 3b 0a 20 20 20 20 | pw, 0, |0);. |
|000057d0| 53 74 61 63 6b 5b 73 70 | 5d 2e 70 72 20 3d 20 73 |Stack[sp|].pr = s|
|000057e0| 61 76 65 3b 0a 20 20 20 | 20 53 74 61 63 6b 5b 73 |ave;. | Stack[s|
|000057f0| 70 5d 2e 78 6d 69 6e 20 | 3d 20 78 6d 69 6e 3b 0a |p].xmin |= xmin;.|
|00005800| 20 20 20 20 53 74 61 63 | 6b 5b 73 70 5d 2e 78 6d | Stac|k[sp].xm|
|00005810| 61 78 20 3d 20 78 6d 61 | 78 3b 0a 20 20 20 20 53 |ax = xma|x;. S|
|00005820| 74 61 63 6b 5b 73 70 5d | 2e 79 6d 69 6e 20 3d 20 |tack[sp]|.ymin = |
|00005830| 79 6d 69 6e 3b 0a 20 20 | 20 20 53 74 61 63 6b 5b |ymin;. | Stack[|
|00005840| 73 70 5d 2e 79 6d 61 78 | 20 3d 20 79 6d 61 78 3b |sp].ymax| = ymax;|
|00005850| 0a 20 20 20 20 69 66 20 | 28 73 70 20 3c 20 53 74 |. if |(sp < St|
|00005860| 61 63 6b 73 69 7a 65 29 | 20 73 70 2b 2b 3b 09 2f |acksize)| sp++;./|
|00005870| 2a 20 48 61 72 64 20 74 | 6f 20 69 6d 61 67 69 6e |* Hard t|o imagin|
|00005880| 65 20 74 68 69 73 20 68 | 61 70 70 65 6e 2c 20 62 |e this h|appen, b|
|00005890| 75 74 2e 2e 2e 20 2a 2f | 0a 20 20 20 20 62 7a 65 |ut... */|. bze|
|000058a0| 72 6f 28 28 63 68 61 72 | 20 2a 29 20 4d 53 65 74 |ro((char| *) MSet|
|000058b0| 2c 20 73 69 7a 65 6f 66 | 28 4d 53 65 74 29 29 3b |, sizeof|(MSet));|
|000058c0| 0a 20 20 20 20 70 77 5f | 77 72 69 74 65 62 61 63 |. pw_|writebac|
|000058d0| 6b 67 72 6f 75 6e 64 28 | 70 77 2c 20 30 2c 20 30 |kground(|pw, 0, 0|
|000058e0| 2c 20 4e 2c 20 4e 2c 20 | 50 49 58 5f 53 52 43 20 |, N, N, |PIX_SRC |
|000058f0| 7c 20 50 49 58 5f 43 4f | 4c 4f 52 28 31 29 29 3b || PIX_CO|LOR(1));|
|00005900| 0a 0a 20 20 20 20 78 6d | 61 78 20 3d 20 78 6d 69 |.. xm|ax = xmi|
|00005910| 6e 20 2b 20 73 69 64 65 | 20 2a 20 4d 41 58 28 73 |n + side| * MAX(s|
|00005920| 74 61 72 74 5f 78 2c 20 | 6e 65 77 5f 78 29 20 2f |tart_x, |new_x) /|
|00005930| 28 4e 2d 31 29 3b 0a 20 | 20 20 20 78 6d 69 6e 20 |(N-1);. | xmin |
|00005940| 2b 3d 20 73 69 64 65 20 | 2a 20 4d 49 4e 28 73 74 |+= side |* MIN(st|
|00005950| 61 72 74 5f 78 2c 20 6e | 65 77 5f 78 29 20 2f 28 |art_x, n|ew_x) /(|
|00005960| 4e 2d 31 29 3b 0a 20 20 | 20 20 79 6d 61 78 20 3d |N-1);. | ymax =|
|00005970| 20 79 6d 69 6e 20 2b 20 | 73 69 64 65 20 2a 20 28 | ymin + |side * (|
|00005980| 4e 2d 31 2d 4d 49 4e 28 | 73 74 61 72 74 5f 79 2c |N-1-MIN(|start_y,|
|00005990| 20 6e 65 77 5f 79 29 29 | 20 2f 28 4e 2d 31 29 3b | new_y))| /(N-1);|
|000059a0| 0a 20 20 20 20 79 6d 69 | 6e 20 2b 3d 20 73 69 64 |. ymi|n += sid|
|000059b0| 65 20 2a 20 28 4e 2d 31 | 2d 4d 41 58 28 73 74 61 |e * (N-1|-MAX(sta|
|000059c0| 72 74 5f 79 2c 20 6e 65 | 77 5f 79 29 29 20 2f 28 |rt_y, ne|w_y)) /(|
|000059d0| 4e 2d 31 29 3b 0a 20 20 | 20 20 73 65 6c 65 63 74 |N-1);. | select|
|000059e0| 65 64 20 3d 20 46 41 4c | 53 45 3b 0a 20 20 7d 20 |ed = FAL|SE;. } |
|000059f0| 65 6c 73 65 20 7b 0a 20 | 20 20 20 2f 2a 20 4e 6f |else {. | /* No|
|00005a00| 20 72 65 67 69 6f 6e 20 | 73 65 6c 65 63 74 65 64 | region |selected|
|00005a10| 2c 20 6a 75 73 74 20 72 | 65 64 72 61 77 2e 20 50 |, just r|edraw. P|
|00005a20| 65 72 68 61 70 73 20 75 | 73 69 6e 67 20 6e 65 77 |erhaps u|sing new|
|00005a30| 20 70 61 72 61 6d 65 74 | 65 72 73 2e 20 2a 2f 0a | paramet|ers. */.|
|00005a40| 20 20 20 20 70 75 74 5f | 63 6f 6f 72 64 73 28 30 | put_|coords(0|
|00005a50| 2c 20 4e 2d 31 2c 20 4e | 2d 31 2c 20 30 29 3b 0a |, N-1, N|-1, 0);.|
|00005a60| 20 20 7d 0a 0a 20 20 72 | 65 63 20 3d 20 28 69 6e | }.. r|ec = (in|
|00005a70| 74 29 20 70 61 6e 65 6c | 5f 67 65 74 5f 76 61 6c |t) panel|_get_val|
|00005a80| 75 65 28 72 65 63 75 72 | 5f 70 29 3b 0a 20 20 69 |ue(recur|_p);. i|
|00005a90| 6e 63 72 20 3d 20 28 69 | 6e 74 29 20 70 61 6e 65 |ncr = (i|nt) pane|
|00005aa0| 6c 5f 67 65 74 5f 76 61 | 6c 75 65 28 69 6e 63 72 |l_get_va|lue(incr|
|00005ab0| 5f 70 29 3b 0a 20 20 6d | 61 78 69 74 65 72 20 3d |_p);. m|axiter =|
|00005ac0| 20 28 69 6e 74 29 20 70 | 61 6e 65 6c 5f 67 65 74 | (int) p|anel_get|
|00005ad0| 5f 76 61 6c 75 65 28 6d | 61 78 69 74 65 72 5f 70 |_value(m|axiter_p|
|00005ae0| 29 3b 0a 0a 20 20 73 69 | 64 65 20 3d 20 78 6d 61 |);.. si|de = xma|
|00005af0| 78 20 2d 20 78 6d 69 6e | 3b 0a 20 20 64 65 6c 74 |x - xmin|;. delt|
|00005b00| 61 20 3d 20 30 2e 32 35 | 20 2a 20 73 69 64 65 20 |a = 0.25| * side |
|00005b10| 2f 20 28 4e 2d 31 29 3b | 09 2f 2a 20 30 2e 32 35 |/ (N-1);|./* 0.25|
|00005b20| 20 73 65 65 6d 73 20 4f | 4b 20 2a 2f 0a 20 20 72 | seems O|K */. r|
|00005b30| 65 63 75 72 20 3d 20 72 | 65 63 20 2a 20 64 65 6c |ecur = r|ec * del|
|00005b40| 74 61 3b 0a 0a 20 20 61 | 62 6f 72 74 20 3d 20 46 |ta;.. a|bort = F|
|00005b50| 41 4c 53 45 3b 0a 0a 2f | 2a 2a 2a 2a 2a 2a 2a 2a |ALSE;../|********|
|00005b60| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005b70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005b80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005b90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005ba0| 2a 2f 0a 2f 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |*/./****|********|
|00005bb0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005bc0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005bd0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005be0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2f 0a 0a |********|*****/..|
|00005bf0| 2f 2a 20 46 72 6f 6d 20 | 6e 6f 77 20 6f 6e 2c 20 |/* From |now on, |
|00005c00| 79 6f 75 20 77 69 6c 6c | 20 66 69 6e 64 20 74 68 |you will| find th|
|00005c10| 65 20 6e 65 77 20 4d 61 | 6e 64 65 6c 62 72 6f 74 |e new Ma|ndelbrot|
|00005c20| 20 61 6c 67 6f 72 69 74 | 68 6d 2e 20 4e 6f 20 53 | algorit|hm. No S|
|00005c30| 75 6e 20 73 70 65 63 69 | 66 69 63 0a 20 20 20 73 |un speci|fic. s|
|00005c40| 74 75 66 66 2c 20 65 78 | 63 65 70 74 20 74 68 65 |tuff, ex|cept the|
|00005c50| 20 6e 6f 74 69 66 79 5f | 64 69 73 70 61 74 63 68 | notify_|dispatch|
|00005c60| 28 29 20 61 6e 64 20 73 | 6f 6d 65 20 70 77 5f 70 |() and s|ome pw_p|
|00005c70| 75 74 28 29 20 61 6e 64 | 20 70 77 5f 6c 69 6e 65 |ut() and| pw_line|
|00005c80| 28 29 2e 20 2a 2f 0a 0a | 20 20 66 6f 72 20 28 69 |(). */..| for (i|
|00005c90| 79 20 3d 20 30 3b 20 69 | 79 20 3c 20 4e 3b 20 69 |y = 0; i|y < N; i|
|00005ca0| 79 20 2b 3d 20 69 6e 63 | 72 29 20 7b 0a 20 20 20 |y += inc|r) {. |
|00005cb0| 20 6e 6f 74 69 66 79 5f | 64 69 73 70 61 74 63 68 | notify_|dispatch|
|00005cc0| 28 29 3b 09 09 2f 2a 20 | 41 6c 6c 6f 77 20 75 73 |();../* |Allow us|
|00005cd0| 65 72 20 74 6f 20 68 69 | 74 20 74 68 65 20 53 54 |er to hi|t the ST|
|00005ce0| 4f 50 20 62 75 74 74 6f | 6e 20 2a 2f 0a 20 20 20 |OP butto|n */. |
|00005cf0| 20 69 66 20 28 61 62 6f | 72 74 29 20 62 72 65 61 | if (abo|rt) brea|
|00005d00| 6b 3b 0a 20 20 20 20 66 | 6f 72 20 28 69 78 20 3d |k;. f|or (ix =|
|00005d10| 20 30 3b 20 69 78 20 3c | 20 4e 3b 20 69 78 20 2b | 0; ix <| N; ix +|
|00005d20| 3d 20 69 6e 63 72 29 0a | 20 20 20 20 20 20 69 66 |= incr).| if|
|00005d30| 20 28 21 4d 53 65 74 5b | 69 78 5d 5b 69 79 5d 29 | (!MSet[|ix][iy])|
|00005d40| 0a 09 4d 44 69 73 6b 28 | 69 78 2c 69 79 29 3b 0a |..MDisk(|ix,iy);.|
|00005d50| 20 20 7d 0a 7d 0a 0a 4d | 44 69 73 6b 28 69 78 2c | }.}..M|Disk(ix,|
|00005d60| 20 69 79 29 0a 20 20 20 | 20 20 72 65 67 69 73 74 | iy). | regist|
|00005d70| 65 72 20 69 6e 74 20 69 | 78 2c 20 69 79 3b 0a 7b |er int i|x, iy;.{|
|00005d80| 0a 20 20 72 65 67 69 73 | 74 65 72 20 64 6f 75 62 |. regis|ter doub|
|00005d90| 6c 65 20 63 78 2c 20 63 | 79 2c 20 64 69 73 74 3b |le cx, c|y, dist;|
|00005da0| 0a 20 20 72 65 67 69 73 | 74 65 72 20 69 6e 74 20 |. regis|ter int |
|00005db0| 69 72 61 64 3b 0a 0a 20 | 20 69 66 20 28 69 78 3c |irad;.. | if (ix<|
|00005dc0| 30 20 7c 7c 20 69 78 3e | 3d 4e 20 7c 7c 20 69 79 |0 || ix>|=N || iy|
|00005dd0| 3c 30 20 7c 7c 20 69 79 | 3e 3d 4e 20 7c 7c 20 4d |<0 || iy|>=N || M|
|00005de0| 53 65 74 5b 69 78 5d 5b | 69 79 5d 29 20 72 65 74 |Set[ix][|iy]) ret|
|00005df0| 75 72 6e 3b 0a 0a 20 20 | 63 78 20 3d 20 78 6d 69 |urn;.. |cx = xmi|
|00005e00| 6e 20 2b 20 28 73 69 64 | 65 20 2a 20 69 78 29 20 |n + (sid|e * ix) |
|00005e10| 2f 20 28 4e 2d 31 29 3b | 0a 20 20 63 79 20 3d 20 |/ (N-1);|. cy = |
|00005e20| 79 6d 69 6e 20 2b 20 28 | 73 69 64 65 20 2a 20 69 |ymin + (|side * i|
|00005e30| 79 29 20 2f 20 28 4e 2d | 31 29 3b 0a 20 20 64 69 |y) / (N-|1);. di|
|00005e40| 73 74 20 3d 20 30 2e 32 | 35 20 2a 20 4d 53 65 74 |st = 0.2|5 * MSet|
|00005e50| 44 69 73 74 28 63 78 2c | 20 63 79 2c 20 6d 61 78 |Dist(cx,| cy, max|
|00005e60| 69 74 65 72 29 3b 0a 20 | 20 69 72 61 64 20 3d 20 |iter);. | irad = |
|00005e70| 64 69 73 74 20 2f 20 73 | 69 64 65 20 2a 20 28 4e |dist / s|ide * (N|
|00005e80| 2d 31 29 3b 09 2f 2a 20 | 42 75 67 20 69 6e 20 74 |-1);./* |Bug in t|
|00005e90| 68 65 20 6f 72 69 67 69 | 6e 61 6c 20 61 6c 67 6f |he origi|nal algo|
|00005ea0| 72 69 74 68 6d 20 2a 2f | 0a 0a 20 20 69 66 20 28 |rithm */|.. if (|
|00005eb0| 69 72 61 64 20 3d 3d 20 | 31 29 20 7b 0a 20 20 20 |irad == |1) {. |
|00005ec0| 20 4d 53 65 74 5b 69 78 | 5d 5b 69 79 5d 20 3d 20 | MSet[ix|][iy] = |
|00005ed0| 31 3b 0a 20 20 20 20 70 | 77 5f 70 75 74 28 70 77 |1;. p|w_put(pw|
|00005ee0| 2c 20 69 78 2c 20 4e 2d | 31 2d 69 79 2c 20 30 29 |, ix, N-|1-iy, 0)|
|00005ef0| 3b 09 2f 2a 20 53 75 6e | 20 73 70 65 63 69 66 69 |;./* Sun| specifi|
|00005f00| 63 20 2a 2f 0a 20 20 7d | 20 65 6c 73 65 20 69 66 |c */. }| else if|
|00005f10| 20 28 69 72 61 64 20 3e | 20 31 29 0a 20 20 20 20 | (irad >| 1). |
|00005f20| 46 49 4c 4c 44 49 53 4b | 28 69 78 2c 20 69 79 2c |FILLDISK|(ix, iy,|
|00005f30| 20 69 72 61 64 29 3b 0a | 20 20 65 6c 73 65 20 69 | irad);.| else i|
|00005f40| 66 20 28 64 69 73 74 20 | 3e 20 64 65 6c 74 61 29 |f (dist |> delta)|
|00005f50| 20 7b 0a 20 20 20 20 4d | 53 65 74 5b 69 78 5d 5b | {. M|Set[ix][|
|00005f60| 69 79 5d 20 3d 20 31 3b | 0a 20 20 20 20 70 77 5f |iy] = 1;|. pw_|
|00005f70| 70 75 74 28 70 77 2c 20 | 69 78 2c 20 4e 2d 31 2d |put(pw, |ix, N-1-|
|00005f80| 69 79 2c 20 30 29 3b 09 | 2f 2a 20 53 75 6e 20 73 |iy, 0);.|/* Sun s|
|00005f90| 70 65 63 69 66 69 63 20 | 2a 2f 0a 20 20 7d 0a 0a |pecific |*/. }..|
|00005fa0| 20 20 69 66 20 28 64 69 | 73 74 20 3e 20 72 65 63 | if (di|st > rec|
|00005fb0| 75 72 29 20 7b 0a 20 20 | 20 20 69 66 20 28 69 72 |ur) {. | if (ir|
|00005fc0| 61 64 20 3e 20 31 29 20 | 69 72 61 64 2b 2b 3b 0a |ad > 1) |irad++;.|
|00005fd0| 20 20 20 20 4d 44 69 73 | 6b 28 69 78 2c 20 69 79 | MDis|k(ix, iy|
|00005fe0| 20 2b 20 69 72 61 64 29 | 3b 0a 20 20 20 20 4d 44 | + irad)|;. MD|
|00005ff0| 69 73 6b 28 69 78 2c 20 | 69 79 20 2d 20 69 72 61 |isk(ix, |iy - ira|
|00006000| 64 29 3b 0a 20 20 20 20 | 4d 44 69 73 6b 28 69 78 |d);. |MDisk(ix|
|00006010| 20 2b 20 69 72 61 64 2c | 20 69 79 29 3b 0a 20 20 | + irad,| iy);. |
|00006020| 20 20 4d 44 69 73 6b 28 | 69 78 20 2d 20 69 72 61 | MDisk(|ix - ira|
|00006030| 64 2c 20 69 79 29 3b 0a | 0a 2f 2a 20 49 74 20 77 |d, iy);.|./* It w|
|00006040| 69 6c 6c 20 62 65 20 73 | 6c 69 67 68 74 6c 79 20 |ill be s|lightly |
|00006050| 66 61 73 74 65 72 20 69 | 66 20 49 20 6c 65 61 76 |faster i|f I leav|
|00006060| 65 20 6f 75 74 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |e out th|e follow|
|00006070| 69 6e 67 20 22 34 35 2d | 64 65 67 72 65 65 22 0a |ing "45-|degree".|
|00006080| 20 20 20 72 65 63 75 72 | 73 69 6f 6e 73 2e 20 54 | recur|sions. T|
|00006090| 68 65 20 72 65 61 73 6f | 6e 20 69 73 20 74 68 61 |he reaso|n is tha|
|000060a0| 74 20 6d 6f 73 74 20 6f | 66 20 74 68 65 73 65 20 |t most o|f these |
|000060b0| 70 6f 69 6e 74 73 20 77 | 69 6c 6c 20 70 72 6f 62 |points w|ill prob|
|000060c0| 61 62 6c 79 0a 20 20 20 | 62 65 20 66 69 6c 6c 65 |ably. |be fille|
|000060d0| 64 20 61 6c 72 65 61 64 | 79 20 61 6e 64 20 4d 44 |d alread|y and MD|
|000060e0| 69 73 6b 20 77 69 6c 6c | 20 72 65 74 75 72 6e 20 |isk will| return |
|000060f0| 69 6d 6d 65 64 69 61 74 | 65 6c 79 2e 20 42 75 74 |immediat|ely. But|
|00006100| 20 73 69 6e 63 65 0a 20 | 20 20 74 68 65 79 20 61 | since. | they a|
|00006110| 72 65 20 69 6e 20 74 68 | 65 20 6f 72 69 67 69 6e |re in th|e origin|
|00006120| 61 6c 20 61 6c 67 6f 72 | 69 74 68 6d 20 61 6e 64 |al algor|ithm and|
|00006130| 20 74 68 65 20 69 6d 70 | 72 6f 76 65 6d 65 6e 74 | the imp|rovement|
|00006140| 20 69 73 20 6f 6e 6c 79 | 20 6d 61 72 67 69 6e 61 | is only| margina|
|00006150| 6c 0a 20 20 20 49 20 77 | 69 6c 6c 20 6c 65 61 76 |l. I w|ill leav|
|00006160| 65 20 74 68 65 6d 20 68 | 65 72 65 2e 20 2a 2f 0a |e them h|ere. */.|
|00006170| 0a 20 20 20 20 69 72 61 | 64 20 3d 20 30 2e 35 20 |. ira|d = 0.5 |
|00006180| 2b 20 69 72 61 64 20 2f | 20 53 51 52 54 5f 32 3b |+ irad /| SQRT_2;|
|00006190| 0a 20 20 20 20 4d 44 69 | 73 6b 28 69 78 20 2b 20 |. MDi|sk(ix + |
|000061a0| 69 72 61 64 2c 20 69 79 | 20 2b 20 69 72 61 64 29 |irad, iy| + irad)|
|000061b0| 3b 0a 20 20 20 20 4d 44 | 69 73 6b 28 69 78 20 2d |;. MD|isk(ix -|
|000061c0| 20 69 72 61 64 2c 20 69 | 79 20 2d 20 69 72 61 64 | irad, i|y - irad|
|000061d0| 29 3b 0a 20 20 20 20 4d | 44 69 73 6b 28 69 78 20 |);. M|Disk(ix |
|000061e0| 2d 20 69 72 61 64 2c 20 | 69 79 20 2b 20 69 72 61 |- irad, |iy + ira|
|000061f0| 64 29 3b 0a 20 20 20 20 | 4d 44 69 73 6b 28 69 78 |d);. |MDisk(ix|
|00006200| 20 2b 20 69 72 61 64 2c | 20 69 79 20 2d 20 69 72 | + irad,| iy - ir|
|00006210| 61 64 29 3b 0a 20 20 7d | 0a 7d 0a 0a 64 6f 75 62 |ad);. }|.}..doub|
|00006220| 6c 65 20 4d 53 65 74 44 | 69 73 74 28 63 78 2c 20 |le MSetD|ist(cx, |
|00006230| 63 79 2c 20 6d 61 78 69 | 74 65 72 29 0a 20 20 20 |cy, maxi|ter). |
|00006240| 20 20 72 65 67 69 73 74 | 65 72 20 64 6f 75 62 6c | regist|er doubl|
|00006250| 65 20 63 78 2c 20 63 79 | 3b 0a 20 20 20 20 20 72 |e cx, cy|;. r|
|00006260| 65 67 69 73 74 65 72 20 | 69 6e 74 20 6d 61 78 69 |egister |int maxi|
|00006270| 74 65 72 3b 0a 7b 0a 23 | 20 64 65 66 69 6e 65 20 |ter;.{.#| define |
|00006280| 6f 76 65 72 66 6c 6f 77 | 20 31 30 65 31 30 09 09 |overflow| 10e10..|
|00006290| 2f 2a 20 44 6f 6e 27 74 | 20 6b 6e 6f 77 20 69 66 |/* Don't| know if|
|000062a0| 20 74 68 69 73 20 69 73 | 20 66 6f 6f 6c 70 72 6f | this is| foolpro|
|000062b0| 6f 66 20 2a 2f 0a 0a 20 | 20 72 65 67 69 73 74 65 |of */.. | registe|
|000062c0| 72 20 69 6e 74 20 69 74 | 65 72 3d 30 3b 0a 20 20 |r int it|er=0;. |
|000062d0| 72 65 67 69 73 74 65 72 | 20 64 6f 75 62 6c 65 20 |register| double |
|000062e0| 7a 78 2c 20 7a 79 2c 20 | 7a 78 32 2c 20 7a 79 32 |zx, zy, |zx2, zy2|
|000062f0| 3b 0a 20 20 72 65 67 69 | 73 74 65 72 20 64 6f 75 |;. regi|ster dou|
|00006300| 62 6c 65 20 2a 78 6f 72 | 62 69 74 2c 20 2a 79 6f |ble *xor|bit, *yo|
|00006310| 72 62 69 74 3b 0a 0a 20 | 20 2f 2a 20 43 6f 75 6c |rbit;.. | /* Coul|
|00006320| 64 20 75 73 65 20 61 20 | 73 74 61 74 69 63 20 61 |d use a |static a|
|00006330| 72 72 61 79 20 66 6f 72 | 20 74 68 69 73 2c 20 69 |rray for| this, i|
|00006340| 66 20 79 6f 75 20 64 6f | 6e 27 74 20 68 61 76 65 |f you do|n't have|
|00006350| 20 61 6c 6c 6f 63 61 20 | 2a 2f 0a 20 20 78 6f 72 | alloca |*/. xor|
|00006360| 62 69 74 20 3d 20 28 64 | 6f 75 62 6c 65 20 2a 29 |bit = (d|ouble *)|
|00006370| 20 61 6c 6c 6f 63 61 28 | 6d 61 78 69 74 65 72 20 | alloca(|maxiter |
|00006380| 2a 20 73 69 7a 65 6f 66 | 28 64 6f 75 62 6c 65 29 |* sizeof|(double)|
|00006390| 29 3b 0a 20 20 79 6f 72 | 62 69 74 20 3d 20 28 64 |);. yor|bit = (d|
|000063a0| 6f 75 62 6c 65 20 2a 29 | 20 61 6c 6c 6f 63 61 28 |ouble *)| alloca(|
|000063b0| 6d 61 78 69 74 65 72 20 | 2a 20 73 69 7a 65 6f 66 |maxiter |* sizeof|
|000063c0| 28 64 6f 75 62 6c 65 29 | 29 3b 0a 0a 20 20 2f 2a |(double)|);.. /*|
|000063d0| 20 54 68 69 73 20 69 73 | 20 74 68 65 20 73 74 61 | This is| the sta|
|000063e0| 6e 64 61 72 64 20 4d 61 | 6e 64 65 6c 62 72 6f 74 |ndard Ma|ndelbrot|
|000063f0| 20 69 74 65 72 61 74 69 | 6f 6e 20 2a 2f 0a 20 20 | iterati|on */. |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.