home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / graphics / gdi / mandel / readme.txt < prev    next >
Text File  |  1996-01-17  |  6KB  |  146 lines

  1. Demonstrating GDI and USER Functions in Fractals
  2.  
  3.  
  4. SUMMARY
  5. =======
  6.  
  7. The MANDEL sample demonstrates GDI and USER functions by working with 
  8. fractals. The Mandelbrot Dream provides the following features:
  9.  
  10.   - Drawing the Mandelbrot set and the corresponding Julia set.
  11.   - Zooming into any of the sets.
  12.   - MDI fractal drawing windows.
  13.   - Floating point math and fixed point math.
  14.   - Shifting color table entries.
  15.   - Changing palette entries and animating palette (color cycling).
  16.   - Loading and saving bitmaps created with special effects.
  17.   - Changing bitmap colors with flood fill.
  18.   - Boundary tracing and creating a clip region for special effects.
  19.   - Enumerating printers.
  20.   - Loading RLE (or converting .bmp files to RLE) for playing in viewer.
  21.   - Saving the RLE in memory to disk.
  22.  
  23. Note: The sample makes use of 64-bit integers for its fixed point math.
  24.  
  25. MORE INFORMATION
  26. ================
  27.  
  28. Drawing the Mandelbrot Set and the Corresponding Julia Set
  29.  
  30.   - Choose the Mandelbrot Set menu item from the Create menu to create an 
  31.     MDI child window to draw the set in, if one has not already been 
  32.     created.
  33.  
  34.   - Choose either "use Fix Point math" or "use Floating Point math" from the 
  35.     Draw menu to decide if floating point or fixed point math is to be used.
  36.     Fixed point is faster, however, you lose resolution sooner as you zoom 
  37.     in.
  38.  
  39.   - Choose the number of iterations from the Iteration menu item and choose 
  40.     Step from the Draw menu. The higher the number of iterations, the more 
  41.     detail in the picture, but the more time it takes to generate the 
  42.     picture. The step determines whether every scan line is drawn. The more 
  43.     scan lines, the better the picture, but the longer it takes to generate 
  44.     the picture.
  45.  
  46.   - Choose Draw Set from the Draw menu.
  47.  
  48.   - Use the right mouse button to select a point in the Mandelbrot set (the 
  49.     drawing surface of the Mandlebrot window). A new Julia MDI window is 
  50.     created. Choose Draw Set from the Draw menu to start drawing.
  51.  
  52.   - The point selected with the right mouse button determines the complex 
  53.     constant to use for the Julia Set.
  54.  
  55. Zooming Into Any of the Sets
  56.  
  57.   - Click, drag and release with the left mouse button to describe the zoom 
  58.     in the region. A new MDI child of the same type as the parent 
  59.     (Mandelbrot window or Julia window) is created.
  60.  
  61.   - Choose Draw Set from the Draw menu to start drawing.
  62.  
  63. MDI Fractal Drawing Windows
  64.  
  65.   - Choose either Mandelbrot Set or Julia Set from the Create menu to create 
  66.     a new MDI window for drawing.
  67.  
  68.   - Or, use the left mouse button to describe a zoom-in region in either a 
  69.     Mandelbrot or Julia MDI window to create a new MDI window for drawing.
  70.  
  71.   - Or, click on the Mandelbrot window with the right mouse button to create 
  72.     a Julia MDI window corresponding to the mouse click position in the 
  73.     Mandelbrot window.
  74.  
  75. Floating Point Math and Fixed Point Math
  76.  
  77. Choose the appropriate menu item ("Floating Point math" or "Fix Point math") 
  78. from the Draw menu. The Fix Point math uses 20.11 fixed point integer 
  79. arithmetic for calculations.
  80.  
  81. Shifting Color Table Entries
  82.  
  83. Choose Shift from the Color menu or hit F10 to shift the color table entry. 
  84. The picture of the active MDI window is updated.
  85.  
  86. Changing Palette Entries and Animating Palette (Color Cycling)
  87.  
  88. Choose Cycle from the Color menu or hit F11 to start color cycling the 
  89. picture. The menu item is grayed if the display device does not support 
  90. palette management.
  91.  
  92. Loading and Saving Bitmaps Created With Special Effects
  93.  
  94. Choose Load Bitmap from the Bitmap menu to load a bitmap into the active 
  95. child window. Or, choose Save Bitmap As to save the picture in the active 
  96. MDI child window.
  97.  
  98. Changing Bitmap Colors With Flood Fill
  99.  
  100. Choose Custom from the Color menu to select a color. The cursor is changed 
  101. to a paint can over the active child window. Click with the left mouse 
  102. button on the picture; the old color under the cursor is changed to the new 
  103. color.
  104.  
  105. Boundary Tracing and Creating a Clip Region For Special Effects
  106.  
  107. From any active Mandelbrot window, choose Set Mandelbrot Clip region from 
  108. the Region menu. The boundary of the escape region is traced. The region is 
  109. then selected as a clip region. Thus, if you load a bitmap for display, the 
  110. bitmap only shows through the clip region. The new picture can then be 
  111. saved. To remove the clip region, choose Remove Clip Region from the Region 
  112. menu.
  113.  
  114. Note:  The boundary tracing algorithm may trace out a small island of only 
  115. several pixels and stop. If that happens, change the size of the window or
  116. create another zoom window and trace again. 
  117.  
  118. Enumerating Printers
  119.  
  120. On start up, the Mandelbrot Dream enumerates the printers and inserts the 
  121. printers into the Print menu. Selecting the printer on the Print menu prints
  122. the picture in the active MDI window.
  123.  
  124. Loading RLE (or convert .bmp files to RLE) for Playing in Viewer
  125.  
  126.   - Choose the Viewer item from the Create menu to create a viewer window or 
  127.     bring any existing viewer window to the top.
  128.  
  129.   - Select Load Bitmap(s) from the File menu for loading RLE or .bmp files 
  130.     into the memory from disk.
  131.  
  132.   - Select Play or Play Continuously from the Options menu for viewing.
  133.  
  134.   - For a demonstration, load the .\rsc\julia.rle file and select Play 
  135.     Continuously. The Julia.rle is a collection of the various julia sets 
  136.     along the boundary of escaping and non-escaping points of the Mandelbrot 
  137.     Set.
  138.  
  139. Saving the RLE in Memory to Disk
  140.  
  141.   - Choose the Viewer item from the Create menu to create a viewer window or 
  142.     bring any existing viewer window to the top.
  143.   
  144.   - Select Save Bitmap(s) from the File menu for saving the RLE(s) from 
  145.     memory to disk.
  146.