Skip to main content
Home Documents Read Me & Reference Diatom Readme
Diatom Readme

Diatom Readme

FilenameDiatom_Readme.pdf
Size0.06 MB
Subsection Diatom
Downloads0
Enjoying MacTrove? Anonymous downloads are free and unlimited. Create a free account to track favorites, contribute metadata corrections, and join the community chat.
Reader
Diatom Readme
/
Loading…
OCR / Text contents
Introduction Diatom is a drawing program based on the Fourier Transform using an algorithm by Brian McGhie. It draws a wide variety of figures based on parameters supplied by the user or generated at random by the program. Drawings can be output to either an ImageWriter, a LaserWriter, or to an HP plotter. A 'Script' file may be created to 'play back' a series of drawings. Diatom was written in Mac C 4.0 from Consulair Corp. (Portions are Copyright 1984 Consulair Corp.) I wrote the program mostly for fun, and mainly to learn how to make the Mac do all the wonderful things it does. It is being distributed as 'freeware'. Please feel free to give a copy of it to anyone. If you like the program please donate a few dollars so that I can justify the many hours I spent writing it to my wife. (That way, she might even let me develop another program of interest.) To find out how the program works (including some of the quirks of using C with the ToolBox), send me $15.00 and I will send you a hardcopy annotated listing of the program (1000+ lines of C source and 350+ lines of resources). I have provided a pre-addressed envelope at the end of this manual. Just fold it up, put a check inside, a stamp on the outside, seal it, and drop it in the mail. The name Diatom was chosen because many of the drawings that the program produces reflect the shapes and patterns of the microscopic algae of that name. Index The Math ........................ 2 The Screen .................... 3 The Menus ..................... 4 The Script File ........... 9 The Envelope ............... 10 The Math This section describes some of the mathematical basis for Diatom. Fourier transforms have many applications in science, mathematics and engineering. Discrete Fourier Transforms (DFTs) are fundamental to signal processing, speech recognition, digital imaging, acoustics, forms of digital audio, harmonic analysis, and many other areas of the technological explosion. The basic idea behind a DFT is to transform a function from one space into another space. In this new transformed space the original information may yield itself to better understanding or manipulation. The general equation for a DFT may seem a bit forbidding at first, but it simply takes n complex points and transforms them into n complex points. Given an input Z of n points, we then can calculate W, the output of n points. The general form of the DFT is: n-1 Wj = (1/n) _ Zk[cos((-2_kj)/n) + sin(-2_kj)/n)i] k=0 where i is the square root of minus one. But we can modify this since we know something about the data that is input. So our formula looks like: Wj = (1/n){Za[cos((-2_aj)/n) + sin(-2_aj)/n)i] + Zb[cos((-2_bj)/n) + sin(-2_bj)/n)i] }. Diatom actually calculates a sine and cosine table for the number of points (or complexity) and then calculates the DFT by indexing into these tables. One way to look at the output of the DFT is to graph it. In Diatom we plot the results from the DFT by drawing …

Showing first 3,000 characters of 7,663 total. Open the full document →

mp.ls