home *** CD-ROM | disk | FTP | other *** search
- Diffract - Version 1.3 - for Windows 95 only - 7/7/96
-
- David Bleecker
- 1440 Kapiolani Blvd #108-138
- Honolulu, HI 96814
-
-
- email: bleecker@math.hawaii.edu
-
-
- The idea behind Diffract:
-
- This program generates color-enhanced pictures of diffraction patterns, which
- I will call diffractals. One might guess that a diffractal is some kind of fractal,
- but this is not quite correct. If you have ever looked through a toy microscope
- on high power, you must have noticed the wild colorful speckled patterns and rings
- which resist any attempt to focus. Have you noticed the strange patterns of a street
- lights through the finely rippled glass of a bathroom window? These too are diffraction
- patterns. They are caused not only by cheap lenses, rippled glass or poor eyesight, but
- also by the inherent wave-like nature of light.
-
- A more complete explanation of the physics:
-
- When light waves flow around an object or through lenses, they bend and interfere
- with one another. The extent of bending depends on the color or wave-length of the
- light. Expensive achromatic lenses compensate for this by focusing different colors
- by different amounts, to produce a nearly naturally colored image. However there is a
- fundamental limit to the power of even the most perfect optical microscope. Essentially,
- one cannot resolve objects which are not much bigger than the wavelengths of visible
- light. Instead, as power is increased, one observes more pronounced diffraction
- patterns resulting from the disturbance of the waves by small objects. Quantum theory
- tells us that all particles (e.g., electrons, protons, etc.) have wavelike attributes.
- Electron waves have a much shorter wavelength than light and hence electron microscopes
- can resolve much smaller objects, but again there is a limit. On a sufficiently small
- microscopic level, one is tempted to say that the universe is a menagerie of interacting
- waves and diffraction patterns. Actually, things are more complicated than that. Indeed,
- there is another perspective in which particles are essentially point-like (or
- string-like), but their positions are statistically governed by a probability cloud
- which resembles a (possibly evolving) diffraction pattern. However, now we are
- approaching the limit of what can be understood in a mundane way, without mathematics.
- Let it suffice to say that the natural appearance of diffractals is due to the
- fact that they are built into the fabric of the universe.
-
-
- The Diffract Program:
-
- Each pixel is colored according to a complex algorithm (and some parameters
- that you enter) with one of up to 16,777,216 colors depending on your video card
- (i.e., the output is true-color if you have it, and the best possible, if you don't).
- Thus, the output is generally of much higher quality than you find with popular
- fractal programs which are usually limitted to 256 colors per pixel. Also,
- diffraction patterns are not fractals. Generally, they are more lifelike, natural
- and flowing, and it is relatively easy to choose parameters which generate
- prettier results than your average fractal. However, you will probably agree
- that this is an understatement.
-
- Installation and Starting:
-
- Besides this file, there is only one crucial file - diffract.exe, and some sample
- data files (*.dff) are included. Include this file (unaltered) as well, if you
- want to distribute or upload the program.
-
- No installation is necessary. Just run the program from within
- Windows 95, say by double-clicking in Explorer, even if the program
- resides on a floppy. Of course, one may wish to copy the files to an
- empty folder on the hard drive. Simply delete the folder and its contents
- to uninstall without a trace left behind.
-
-
- Legalities:
-
- Version 1.3 of Diffract is copyrighted freeware. Attempts to sell or distribute
- the program for commercial gain must be approved me. If you find the program of value,
- and you want to support my efforts to improve it, donations (however small) will be
- appreciated. With a donation of $20 or more (check to David Bleecker or cash) sent to
-
- David Bleecker
- 1440 Kapiolani Blvd #108-138
- Honolulu, HI 96814
-
- I will try my best to implement a feature that you want added, or cure a behavior
- that irks you. I will attach the resulting improved latest version to an email to you,
- or explain why I've failed and send you the latest version anyway. Please give me a
- few weeks. In case you have trouble receiving email with zipped attachments, I can
- send the zip file on a disk. Please report any problems you are having. As far as I know,
- there is no damage that the program can possibly do. However, if you use the program, you
- must agree to hold me blameless for any mishap. Diffract was developed using Microsoft
- Visual C++, Version 4.0.
-
-
- Basic instructions suggestions and comments:
-
- 1. The window should be sized small for fast generation. After resizing the
- window, left-click the mouse inside the window to redraw the image to the
- new window size. Subsequent left-clicks zoom the window by 200% centered about
- the point which was clicked (see item 3 below). Right clicks always zoom out (50%).
- Also, increasing the scattering factor in the Settings/Misc dialog box will
- increase speed but may adversely affect the image. Features can change shape if
- zoomed when the scattering is set high.
-
- 2. Experiment with different color settings in the Settings/Frequency
- dialog box. Make sure the color radio button is on, unless you want
- gray-scale. Also, try different types in the Settings/Pattern dialog box.
- Before creating your own masterpiece from scratch, try loading some of
- the included dff files from the File/Open dialog box. You may wish
- to use these files as a starting point when you change the settings.
-
- 3. Zoom in on an object with a left mouse click on the object. You will
- have to uncheck the center horizontal and vertical boxes in the Settings/Misc
- dialog box to zoom in on an off-center object. When checked, these boxes
- constrain movement to a vertical or horizontal line through the center of the
- default pattern for the given type. Zoom out (50%) with a right mouse click.
- To pan out of the window, zoom in near an edge and immediately zoom out. Then
- you've panned by half a window.
-
- 4. When you've got a winner, enlarge the window to the desired size and
- left-click in the window to begin generation of the image to fit the window.
- One can minimize the window, while the image is being computed in the background,
- and you can work on other applications. When an image is complete, it is a good
- idea to immediately copy it to the Windows clipboard (via Edit/Copy or Ctrl + C).
- Start a paint program such as Paint Shop Pro (if one is not already running) and
- paste the image from the clipboard into the paint program. You can then process
- the image and save it in the format of your choice. The resolution of images produced
- by Diffract are the highest possible for your display. If you want to stretch a
- small image (thereby introducing blockiness and jaggies), you may resize it in a
- suitable paint program. However, unless you are short on time, memory or disk space,
- just generate a larger image by resizing the Diffract window and left-clicking
- in the window.
-
-
- 5. When you find something nice, you will want to save the settings in a
- *.dff file for future use.
-
-
- Advanced comments:
-
- 1. Higher frequencies make for more delicate details. Since zooming makes
- details larger, you may wish to raise the frequencies after zooming many times.
-
- 2. If the RGB color frequencies are set equal, a much more focused image
- results. One can then get different colors by making the RGB contours and/or
- edges different. Also, if the RGB color frequencies are set equal, image
- generation is about three times faster than if they are all different. Even
- if only two RGB color frequencies are equal, image generation is 50% faster.
-
- 3. Contours produce bands of smoothly changing colors. The higher the contours,
- the more bands are obtained. Edges (if set greater than 1) produce abruptly
- changing colors and intensities. You may find it challenging to produce colors
- that you want. Generally, one can suppress a color by setting its contour
- to a value less than 1, but often it is easier to paste the image in a paint
- program and change the colors and introduce other effects using the filters
- of your paint program.
-
- 4. Polarization values (in the Settings/Misc dialog box) further from zero
- tend to produce a wider variety of shapes.
-
- 5. Experience may eventually lead you to produce desired effects, but more
- often you must simply appreciate that what you get is typically stranger
- (and perhaps better) than what you imagined. Often you can find some pattern you
- like by panning and zooming in on some intriguing detail. Changing the texture
- dilation in the Settings/Misc will shift the colors somewhat, without changing
- the shapes too much. If you've got something you like, you probably don't want
- to make any big changes in any of the settings. When you happen to get colors
- and/or patterns you like, save to a dff file with a descriptive name to recall
- the settings for later use.
-
- Enjoy!
-
-