GRAPH3D.85G draws 3-D graphs; group contains Graph3D.85P, ProjG3D.85P These programs were written by Greg Ferrar. Graph3D is a program for the TI-85 graphing calculator that creates graphs of three-dimensional surfaces. It has many features, including hidden line removal, error checking, and the ability to customize the appearance of the graph completely. REQUIREMENTS The program itself takes up approximately 9000 bytes of storage, and it requires an additional 8000 bytes for its variables. So you need to have 17000 bytes free to run Graph3D. The Graph3D program is in two parts, one called "Graph3D" and another called "ProjG3D". Download both of these parts to your TI-85 to run Graph3D. RUNNING GRAPH3D Once you have downloaded both parts of the program, store a 0 (zero) in the variable RunBfore, by typing 0>RunBfore (Note case-sensitivity) where the > in the above line is the TI-85 Store character, which can be entered by pressing the STO> button. Storing a 0 in RunBfore tells Graph3D that this is the first time you have run Graph3D on that calculator. This causes Graph3D to perform some initializations, and to reset the defaults. If you later want to reset the defaults at a later time, you can do so by storing 0 into RunBfore before running Graph3D. To run the program, select Graph3D from the PRGM/NAME menu. HOW GRAPH3D GRAPHS To use Graph3D effectively, you need to understand how it creates its graphs, and what the various parameters mean. The most important variable is y1, the function. Graph3D creates a graph of the function z = y1(x,y) y1 can be any function of x and y. The name y1 is used because in the TI-85, y1 can easily be edited in the y(x)= editor. It is also possible to enter y1 from within the Graph3D program using the Eq option on the Main menu. If you have not defined y1 in the y(x) editor, Graph3D uses the default: 15e^(-.04(x^2+y^2))cos (.15(x^2+y^2)) The function y1 is plotted by evaluating it at a number of points, and then connecting those points in a grid. The points plotted are a rectangular lattice ranging from xMin3D to xMax3D in the x direction, and from yMin3D to yMax3D in the y direction. The number of points between xMin3D and xMax3D is determined by the value of xCuts3D, and the number of points between yMin3D and yMax3D is determined by the value of yCuts3D. xCuts3D and yCuts3D, like xMin3D, xMax3D, and all other variables mentioned here, can be easily viewed or edited from within Graph3D (see the menu commands descriptions below for more information). For instance, if xMin3D = -10, xMax3D = 10, yMin3D = -10, yMax3D = 10, zMin3D = -10, zMax3D = 10, xCuts3D = 10, and yCuts3D = 10, then the lattice would be composed of all points (x,y) where -10y, then the function plotted has value 4 when x<=y, and -4 when x>y. Note that AltFl can (and usually will) contain Boolean expressions like "x>y" or "not ((x>y) and (2y>4))". Graph3D has several options that affect the appearance of the graph. One is the hidden line removal option. When hidden line removal is on, any part of the surface that would be "behind" the rest of the surface (when viewed from the specified vantage point) will not be drawn. This makes MUCH better looking graphs. However, due to the additional computation necessary to determine which lines are hidden, a graph drawn with hidden lines removed takes several times longer to draw. Another option is the aspect ratio type. If you choose "true" aspect ratio, a graph will be drawn with all proportions correct; in other words, a sphere will always look spherical. If you choose "cubic" aspect ratio, the viewing area (defined by xMin3D, xMax3D, yMin3D, yMax3D, zMin3D, and zMax3D) will be stretched or shrunk to appear cubic. This allows you to see aspects of a surface that are visible only when one direction is stretched considerably while the other is maintained. Finally, Graph3D allows you to choose whether to display the axes and the viewing "cube." If you choose to display axes, the x, y, and z axes will be drawn before the graph is. They will extend a little beyond the boundaries of the viewing "cube." If you choose to display the viewing "cube," then a wire frame rectangular structure will be drawn, enclosing the viewing "cube." Note that neither the axes nor the viewing "cube" honor the hidden line removal option--portions that would be obscured by the surface will still be drawn. For this reason, it is probably best not to make the axes or the viewing cube visible when hidden line removal is turned on. THE MENUS Graph3D has many menus, organized to give easy access to all Graph3D variables and options. Below are the menus, their commands, and what each one does. The Main Menu The main menu appears after the title screen. Graph: graphs the surface. Eq: brings up the equation menu; allows you to change the function to be graphed, and also to change the alternate function and the alternate function condition. Range: allows you to view or change the viewing "cube" (xMin3D, xMax3D, yMin3D, yMax3D, zMin3D, zMax3D) and the number of x cuts and y cuts. Parms: brings up the parameters menu; allows you to change the vantage point, the magnification, and the preferences (hidden line removal, aspect ratio, axis visibility, viewing cube visibility). Quit: exits the Graph3D program. The Eq (Equation) Menu The equation menu lets you change the equation, the alternate equation, or the alternate equation condition. y1=: allows you to change the main function (y1). y2=: allows you to change the alternate function (y2). Cond: allows you to change the alternate function condition (wherever the alternate function condition is TRUE, y2 is used instead of y1). Back: returns to the main menu. The Parms (Parameters) Menu The parameters menu lets you change the vantage point (theta and phi), the magnification, and the preferences. Angle: allows you to change the vantage point by changing theta and phi. Magnf: allows you to change the magnification. Prefs: brings up the preferences menu, which allows you to change hidden line removal, aspect ratio, axis visibility, and viewing cube visibility. Back: returns to the main menu. The Prefs (Preferences) Menu The preferences menu allows you to select whether or not you want hidden lines to be removed, what kind of aspect ratio you want, and whether or not the axes and viewing cube should be drawn. HidLn: allows you to choose whether you want hidden lines to be removed. If hidden lines are removed, the plot is much slower, but all sections of a surface that are "behind" the rest of the surface are not drawn, so the graph looks much better. Axes: allows you to choose whether you want the x, y, and z axes to be drawn in before the graph is drawn. The axes do not honor hidden line removal, so you should probably not show them when hidden lines are being removed. Cube: allows you to choose whether you want the viewing cube to be drawn in before the graph is drawn. When this option is on, a wire frame of viewing cube is drawn. The viewing cube does not honor hidden line removal, so you should probably not show it when hidden lines are being removed. AspRt: allows you to select cubic or true aspect ratio. When the aspect ratio is cubic, the viewing "cube" (and the surface) is stretched or squeezed to a cubic shape. When the aspect ratio is true, no stretching occurs, and distances look correct. Back: return to the parameters menu. THE DEFAULTS Graph3D sets up the variables to certain defaults when it is run with RunBfore set to 0. The default values are: xMin3D = -10 xMax3D = 10 yMin3D = -10 yMax3D = 10 zMin3D = -10 zMax3D = 10 xCuts3D = 10 yCuts3D = 10 theta = pi/6 phi = pi/6 magnification = 1 xhidden line removal is off axes are invisible the viewing "cube" is invisible aspect ratio is cubic y1 = 15e^(-.04(x^2+y^2))cos (.15(x^2+y^2)) y2 = 0 AltFl = 0 (FALSE; y2 used only when y1 is imaginary)