XEROX MANDELBROT 2 4 1 MANDELBROT 1 4 By: Kelly Roach (Roach@Sumex-aim.arpa) This document last edited on 15-Feb-86. This module displays the Mandelbrot curve as described in a 1985 Scientific American. The module will work in black and white, but the best results will appear on color displays. Comment: This module is VERY SLOW because many floating point arithmetic operations must take place just to calculate the value that should be displayed for a single pixel--and there are a lot of pixels for which this must be done. Speed seems fastest on an 1109 which has floating point hardware. However, the results are very pleasing and can be stored on file, rather than be recomputed, to serve as user backgrounds on the color display. (MANDELBROT REGION WINDOW) [Function] displays the part of Mandelbrot set lying within REGION of the complex plane in WINDOW. REGION should be a region record with FLOATP BOTTOM, LEFT, WIDTH, and HEIGHT to indicate which region of the complex plane you wish to view. To get started, a REGION like '(-1.5 -1.0 2.0 2.0) will work well. A BUTTONEVENTFN will be added to WINDOW that allows the user to zoom in on successively smaller regions of the Mandelbrot set almost as if the user were changing to higher power lenses on a microscope. Simply button WINDOW and select the region inside WINDOW you wish to look more closely at. The region of the Mandelbrot set that is being viewed at any given time is stored as the TITLE WINDOWPROP property of WINDOW. The Mandelbrot set itself is black and points "escaping" from the Mandelbrot set are in color. The proper way to view the Mandelbrot set is to select successively smaller regions of the Mandelbrot set at the boundary between the black of the Mandelbrot set and the color of the "escaping" points (boundary between black and white on a black and white display). MANDELBROT.LIMIT [Variable] This variable controls how well the Mandelbrot set is resolved. Initially MANDELBROT.LIMIT=32. As the user views smaller regions of the complex plane, the user will have to set MANDELBROT.LIMIT to higher values. Generally, the user can tell that MANDELBROT.LIMIT should be set higher whenever the edge of the Mandelbrot set begins to appear smooth rather than contorted with twists, turns, bays, and jettys. The Mandelbrot module gets slower when MANDELBROT.LIMIT is set higher because more computation is needed. There doesn't seem to be any good heuristic for the module to set MANDELBROT.LIMIT automatically, so setting MANDELBROT.LIMIT is left to the user. .È È(È (È(ŠŠ8(ŠŠ8DÈÈ PAGEHEADING RUNNINGHEADMODERN MODERNLOGOMODERN MODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN ((q  1™N²šnš 5zº