MU_01.C
Robert P. Munafo, 1994 Jan 27
/* MU_01.C This is the Universal Mandelbrot Browser, by Robert P. Munafo This version is version 01, dated 19940113. Contents 1. Background: who, what, why 2. Configuration; which files you'll need 3. Pseudocode 4. The source code 1. Background: who, what, why This program is used as a central example by Mu-Ency, the Mandelbrot Set Glossary and Encyclopedia, which is accessible through electronic mail relay at mu-ency@mrob.UUCP , or mu-ency%mrob@uunet.uu.net . If you haven't used Mu-Ency yet, you should send a message containing the word "intro" to receive an introduction to Mu-Ency, and instructions on how to access its extensive resources. This program was designed to teach several important algorithms that relate to exploring the Mandelbrot Set. To make the code easy to read, it was written most of the "instructional" algorithms were written in a special pseudocode developed specifically for use in Mu-Ency. This pseudocode is translated into C by the preprocessor when you compile the program. In addition to the pseudocode, there is a large amount of specific interface code that enables the system to run on many specific real environments, including: DOS (Borland C 4.0, Symantec C 6.0, Microsoft C) Microsoft Windows 3.0/3.1 (Borland, Symantec, Microsoft) Macintosh (Think C 5.0 & 6.0, MPW, CodeWarrior) X Windows Xlib X11R4 or X11R5 (with ANSI C compiler) Generic ASCII console interface (with ANSI C compiler) Depending on which environment you have, the program will operate in different ways. For example, selecting a subview is done with a mouse on the graphical systems, with arrow keys in the DOS version, and with a multiple-choice menu in the generic ASCII console version. %%%interrupt with control-D in console version? fork() a process to do computing in background? 2. Configuration; which files you'll need After this instruction section you will find the configuration section. There are four questions that you need to answer; each is a multiple-choice. You answer the questions by removing one or more "/*"s as instructed in the configuration section. Your answers determine which of the other files are used in the compile. Here are the questions with the currently supported answers: Calculation Method - use this to indicate whether you have an FPU Integer Floating-point Display Method - selects specific output routine for your display ASCII - Uses UIASC.C Mac - Uses UIMAC.C X - Uses UIX.C CGA - Uses UICGA.C VGA - Uses UIVGA.C File System - selects type of filename and format of logfile generic ANSI C - Uses FSC.C Mac - Uses FSMAC.C UNIX - Uses FSUNX.C DOS - Uses FSDOS.C Compiler - allows the use of optimized assembly-language routines Think C 5.0 or 6.0 on a Mac - Uses OPM1.C Borland C on a 386, 486, or Pentium - Uses OPB1.C generic - Answer this way if your compiler is none of the above. 3. Pseudocode After the configiration section is the beginning of the main pseudocode. There are many routines, each of which is preceded by a description. Many of these have their own entries in Mu-Ency. */ /* Display methods. The following define selects one of the possible methods of displaying a Mandelbrot image to you. Remove the "/*" from the beginning of one of the following lines to indicate the type of display system you will use. (If you remove none of them, the ASCII Graphics method will be used. See CONFIG.DOC section 4.2) */ /* #define DM_MAC1 /* Macintosh monochrome QuickDraw (see CONFIG.DOC section 4.2.1) */ /* #define DM_MAC2 /* Macintosh color QuickDraw (see CONFIG.DOC section 4.2.2) */ /* #define DM_CGA1 /* DOS CGA, 320x200 4 colors (see CONFIG.DOC section 4.2.3) */ /* #define DM_VGA1 /* DOS VGA, 640x480 16 colors (see CONFIG.DOC section 4.2.4) */ /* #define DM_VGA2 /* DOS VGA, 640x480 256 colors (see CONFIG.DOC section 4.2.4) */ /* #define DM_VGA3 /* DOS VGA, 800x600 256 colors (see CONFIG.DOC section 4.2.5) */ /* #define DM_SV1 /* SunView 5.3 (see CONFIG.DOC section 4.2.6) */ /* #define DM_XW113 /* X Windows V11R3 (see CONFIG.DOC section 4.2.7) */ /* #define DM_XW115 /* X Windows V11R4 or R5 (see CONFIG.DOC section 4.2.8) */ /* #define DM_TTY1 /* Generic ANSI C text-mode I/O (see CONFIG.DOC section 4.2.9) */ /* This is the header. It defines all the pseudocode macros. */ #include
From the Mandelbrot Set Glossary and Encyclopedia, by Robert Munafo, (c) 1987-2012. Mu-ency index
Robert Munafo's home pages on HostMDS © 1996-2012 Robert P. Munafo. about contact
Google+
mrob27
@mrob_27
This work is licensed under a Creative Commons
Attribution-NonCommercial 2.5 License. Details here
s.13