About: NMG93.SDK and OMG86.SDK Distribution by: Charles T. turley From Author: Dr. Hank Levinson Surface Mail: P.O. Box 83 Paramus, N.J. 07653 Email: hlevinsn@andromeda.rutgers.edu Status: Copyrighted - freeware (may not be distributed in any manner for profit - must be distributed only for FREE) NMG93.SDK and OMG86.SDK are both Shrinkit DOS 3.3 archives, which will unshrink to a 5.25 Apple II - DOS 3.3 disk. The Documentation files for the above programs follow. DOCUMENTATION FOR THE NEW MATHEMATICAL GRAPHICS PROGRAMS A - GRAPH.Y=F(X): This is almost exactly like the former program except for two additional features. Discontinuities will automatically not be graphed and will not disrrupt computation, and the user will be offered the choice of specifying a coordinate grid. B - POLAR.PLOT.R=F(A): This polar plotting program plots R = F(A). After entering F(A) and the domain interval for A, the user is asked how many points should be plotted. Usually 360 will do; if there are rapid changes in R, more points may be specified. Discontinuities in F(A) will be ignored (the program will not plot and simply skip over them) and it will automatically calculate the range of F(A). The user may select to plot a polar coordinate grid after the function is plotted. C - POLAR.PLOT.R=F(A).ARB.R: Here the user may select minimum and maximum values of the radius R. In B, everything was plotted from the origin to the maximum value of R. This program plots whatever sector of an annulus is specified. Again there is provision for automatically skipping over discontinuities, and for plotting coordinate grids. D - PARAMETRIC.PLOT.X(T).Y(T): Automatic range calculation, discontinuity skipping and coordinate-grid plotting are additional features of this version of the previous parametric plotting program. E - GRAPH.Z=F(X&Y): This program plots a function of 2 independant variables, X and Y, in 3-D. It uses only parallel perspective and has no provision for hidden point removal. It does have an automatic range feature, but that runs very slowly. There is no skipping over discontinuities; the program simply crashes at a discontinuity. F - GRAPH.Z=F(X&Y).HDN.PNT: This program is like the previous one, but it does have a hidden point removal option which works as follows. A line is drawn from a point to be plotted orthogonally to the viewer. If this line passes through the surface being plotted, then the point being tested is "hidden" and is not plotted. To test whether the line from the point passes through the surface, the program computes values of Z both on the line and on the surface. These values are spaced along the viewing line. If the spacing is too wide, a passage through the surface may remain undetected. However the closer the spacing, the slower the program runs. A good example to see the use of this program is to graph the equation X*X - Y*Y Z = X * Y * --------- . X*X + Y*Y Enter X*Y*(X*X-Y*Y)/(X*X+Y*Y+.0001) for F(X,Y). The .0001 is to avoid a 0 denominator. Let X and Y each be confined to [-2,2] intervals, and Z to [-1.25,1.25]. Choose -30 for VA and 25 for VB. Select the hidden point option, use a "T-interval" of .2 to search along lines from points towards the viewing plane, and 15 intervals in X and Y directions with 250 points per line. The program plots very slowly. To see the surface from "the other side", enter -.2 for the T-interval. G - GRAPHICAL.ANALYSIS: This is a classical tool to study the dynamics of functions of a single real variable, finding attracting points and repelling fixed points with respect to iterating the function. The user is allowed to enter any function and a domain and range. The program will plot the function and the line Y = X. Then the user will be prompted for the X-coordinate of a point to be tested. The result is a diagram showing the point lifted vertically to the curve, then horizontaly to Y = X, then vertically to the curve, etc. until the point either escapes from the domain-range rectangle, or is trapped by some attracting point. For a clear elementary treatment of this and the rest of the dynamical analysis programs, the reader is referred to "Chaos, Fractals and Dynamics" by Robert L. Devaney, Addison-Wesley Pub. (1990). H - ORBIT.DIAGRAM.VAR.DOMAIN: Here the dynamical properties of the function X*X + C, where C is a constant, is analysed for various values of C. A domain for C is chosen (somewhere between -2 and 0.25) and the orbit diagram is graphed. It is possible to carefully select domains which show various periodicity windows in which attracting orbits bifurcate. One may also see a fundamental fractal behavior in which, under magnification, the same structures appear (although somewhat distorted) in the small as in the large. The user is again referred to Devaney's book. I - JULIA.ARB.FCT: The Julia set of a function is the boundary between the set of points which escape under iteration of the function, and those which have finite orbits under the iteration. (It is named after the French mathematician Gaston Julia, who lived at the end of the 19th century, defined the concept, but never saw the realization of his idea graphically; the technology simply was not available then.) The functions considered are of a complex variable Z = X + iY. The real and imaginary parts of the function to be explored are entered, together with the center point of a square region in the complex plane. A magnification factor is also entered, and the program iterates the function at points on a fine grid in the specfied square. If the point being examined escapes, it is plotted in "black". Otherwise it is plotted in "white". The Julia set consists of the boundary between these two regions. The fractal nature of Julia sets may be explored with different centers and magnifications. The user should be warned that this proghram runs very slowly and for some functions, centers and magnifications, it may take days to produce a Julia set. J - JULIA.Z*Z+C: This explores the classical function Z^2 + C. The user simply enters the real and imaginary parts of the complex constant C, a center point and a magnification. Then the Julia set of Z^2 + C is generated in the region chosen, s l o w l y... K - JULIA.BACK.ORBITS: The Julia set of a function may be constructed by a faster but less accurate method using "back-orbits".. For an explanation of this method, see Devaney's book. L - JULIA.Z*Z+C.BDRY.SCAN: The Julia set may be indicated more directly by trying to plot only those points on the boundary between those which escape and those which don't. The method is essentially the same as the one used in program I. M - MANDELBROT: The Mandelbrot set is similar in principle to the Julia set. (Benoit Mandelbrot would have a stroke reading the preceeding sentence.) The function examined is F(Z) + C, but instead of finding the boundary between escaping and non-escaping Z, F(Z) + C is iterated for various values of C, starting with Z = 0. The Mandelbrot set is the boundary between those C which cause F(Z) + C to escape when iterated from Z = 0, and those values of C which result in finite orbits. The classic Mandelbrot set results from Z*Z + C, using center 0.75 and magnification 1.7 in this program. The whole set is between C = -2 and C = 0.25. Details of the Mandelbrot set may be explored by choosing other centers and higher magnifications. The magnification possible by any computer program which constructs Julia or Mandelbrot sets depends on the number of places to which the machine may accurately do arithmetic. With a normal Apple II, this is about 10 places, so magnifications of up to about 10E9 are possible. Beyond this, images tend to be too blocky and inaccurate. This program also runs very slowly, sometimes taking days to complete pictures. N - MANDELBROT.BDRY.SCAN: Here the same boundary scanning technique is used as in program L. The result is a depiction of just the boundary between C which cause escape, annd C which result in finite orbits. This program runs slightly slower than the previous one. O - SIERPINSKI: This is a famous fractal set constructed by dividing a triangle into four sub-triangles by connecting the midpoints of its sides, and removing the middle triangle. Divide each reamining triangle into four and again remove the middle one. Repeating this process endlessly results in the Sierpinski triangle. The Sierpinski triangle is generated in this program using a back-orbit process similar to that in program K. The process is relatively fast but innaccurate. The user is prompted for the coordinates of the vertices of the starting triangle. Try the screen vertices (140,0), (0,159), and (279,159). P - SQUARE.MINUS.CROSS: This program is similar to the Sierpinski triangle. Use the points (0,0), (279,0), (0,159), and (279,159). This divides squares into 9 equal sub-squares and removes the middle ones including the center one (hence a cross). Q - PENTAGON.MINUS.5-SPOKE: Again, this is like the prevoius two programs. Use (140,0), (0,50), (279,50), (95,159), and (185,159). R - SIERPINSKI.SQUARE: Start with the same points as in program P. Unlike program P, the middle square is left. This, and the preceding three programs construct fractal sets of different Poincare dimensions. (Again, see Devaney's book for an explanation of Poincare dimension.) S - ROTATING.4-CUBE: Several years ago, a mathematician at Brown University in Providence, R.I. made a film of a rotating 4-dimensional cube. Many pictures were taken of computer generated images of the 4-cube, each rotated a small amount from the previous image. When viewed together at a rate of 24 frames per second, the result was the rotating 4-cube. Here the computer draws a 4-cube projected on a 2-dimensional viewing plane very rapidly. The user may vary the attitude of the viewing plane and see the 4-cube from other attitudes. The rotation controls are the A, B, C, D, and E keys. To move back, use the lower case key corresponding to one of the previous upper case keys. Due to a problem in an "orthonormalization" routine which uses an absolute value to ensure a quantity beneath a radical is always positive, there are some rotation steps which cause the cube to suddenly reflect about a plane in 4-space. This glitch has not been thoroughly investigated yet. But have fun playing with with a 4-dimensional cube! T - GRAPH.Y-F(X).LO-RES.QUICK: is program is the low resolution counterpart of some of the previous programs. It is VERY rapid, but only has a resolution of 40 pixels hoizontally, and 40 vertically. It does have an automatic range-finding option. U - FOUR-D.HDN.PT.REMOVAL: "Vision" in 4-dimensional space is not as simple a matter as in 3-space. It is clear in 3-space what is meant by "in front of" or behind" because a "line" of sight may be dividedf in two parts (front and back) by a point. In 3-dimensions, the space at right angles (orthogonal) to a viewing plane is a (1-dimensional) line. However, in 4-dimensional space, the subspace orthogonal to a plane is some other 2-dimensional plane! It takes more than a single point to divide a plane into two pieces. If you have tried to graph even fairly simple functions in 4 dimensions, you have seen the extremely confusing plethora of super-imposed curves generated. In order to clean-up such pictures, a hiddenn point removal algorithm has been developed which searches a quarter plane to see if it passes through the object being graphed. If it does, the point at which the quarter-plane starts (at the object itself) is not graphed (hidden). Otherwise the point on the object is plotted. To search the quarter plane, points on a grid within that quarter-plane are tested, much the same as points along a half-line were tested in the 3-D hidden point removal algorithm used previously. Two search intervals are entered by the user instead of the one in the previous hidden-point removal algorithm 3-D graphing program. Much more time is taken to search the whole part of a quarter-plane within the domain-range region instead of just the previous piece of a half-line. This is done for each point being graphed (or hidden), so time really mounts up! This program is still experimental, so the choice of the quarter-plane remains in doubt. To try all 4 quarter-planes, you may use the four combinations of positive and negative search intervals: ++, +-, --, and -+. You may try to view the 4-dimensional paraboloid U = X*X + Y*Y + Z*Z. limit X, Y and Z to the unit intervals from -1 to 1, and use a range from 0 to 3. Search intervals of .2 each may be used, in each of the 4 possible sign assignments but remember, this program takes a very long time to run. V - RIEMANN.SURFACE.HDN.PT.REMOVAL: This program attempts to do for Riemann surfaces what the previous program attempts for generalized 3-dimensional hyper-surfaces in 4-dimensional space. -END OF DOCUMENTATION FILE-