home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3d Surface Grapher
-
- 3dGraph v1.0
-
- by Dan Schikore
-
- 05/03/91
-
-
-
- INDEX
-
- 1. Disclaimer - page 1
-
- 2. Shareware Notice - page 1
-
- 3. System Requirements - page 2
-
- 4. Definitions - page 2
-
- 5. The equation types - page 3
-
- 6. The Menu System - page 4
- a) How to use it
- b) The Surface Menu
- c) The Graph Menu
- d) The Options Menu
-
- 7. The Surface Menu Commands - page 5
-
- 8. The Graph Menu Commands - page 6
-
- 9. The Options - page 7
-
- 10. Graph Mode Commands - page 8
-
-
- - page 1 -
-
-
- 1. Disclaimer
-
- This program is provided without any warranty of any kind. The
- author will not be responsible for any damage of any kind due to the use
- of this program.
-
-
-
- 2. Shareware Notice
-
- This program is Shareware. It is provided with full feature
- capability for you to examine and determine if it is of any use to you.
- You are encouraged to distribute it as long as all original files are
- included unmodified (except the data file), and no charges other than
- disk copying fees are charged. You are free to use the program for your
- personal use for two weeks. If you would like to continue using it,
- please register to encourage development of this and other shareware
- programs. Registered users will be notified of update opportunities by
- mail. To register a personal version, print or copy the file register.doc,
- fill it out, and send it along with $10 check or money order to:
-
- Dan Schikore
- 1983 Greenheath
- Florissant, MO 63033
-
- If 3dGraph is being registered for a network or use on other groups of
- computers by different users, the registration is:
-
- 2- 5 computers - $15
- 6-10 computers - $25
- 11-19 computers - $35
- 20+ computers - $50
-
- Comments and suggestions are welcome.
-
-
- - page 2 -
-
- 3. System Requirements
-
- This program will operate on any PC-compatible computer with a
- minimum of 640K of memory. All major video modes are supported. The
- printer functions were developed for use with 9 and 24 pin Star printers
- and are compatible with most dot matrix printers. A coprocessor is
- helpful but not necessary.
-
-
-
- 4. Definitions
-
- Surface - A surface consists of a function of one or two variables,
- from any of six types of equations, along with parameters which specify
- the limits of the variables x and y, the skip values for x and y (Skip
- values define how many lines of the grid surface will be graphed when in
- Graph Mode, a skip of 2 means every second line will be graphed), the
- number of data points to be used in the surface (increasing the number of
- data points increases the accuracy of the representation of the graph, and
- decreases the speed of calculations and drawing), and the center of the
- surface (Specifies a translation of the surface so a sphere can be centered
- at (1,0,0) by defining a sphere at the origin and setting the center of
- the surface to (1,0,0) ).
-
- Graph - a graph can contain up to six surfaces. All graphs must
- contain at least one surface. 2d and 3d functions can be mixed in the
- same graph.
-
- - page 3 -
-
- 5. The equation types
-
- There are six basic types of equations available:
-
- i) y=f(x)
- ii) z=f(x,y)
- iii) T[x]=( f(x), g(x) )
- iv) T[x,y]= ( f(x,y), g(x,y) )
- v) T[x]=( f(x), g(x), h(x) )
- vi) T[x,y]=( f(x,y), g(x,y), h(x,y) )
-
- When specifying a domain for x and y, the limits must be constant
- expressions. All operators and functions available in functions are
- allowed but x and y are not. Constants e and pi are defined. Equation
- types i) and ii) can be used for most functions, such as a paraboloid
- ( z=x^2 + y^2 ), however for graphs which appear circular, you may not get
- the desired effect, and it would be better to use a parametric
- representation of the surface. For a paraboloid, this would be
- T[x,y] = ( ysin(x), ycos(x), y^2 ). For other surfaces, like a sphere,
- there is really no choice. To graph the upper half of a sphere of radius 1,
- we would have z=sqrt(1 - x^2 - y^2),
- -1 <= x <= 1
- -1 <= y <= 1
- but at some places on this domain, such as (-1, 1), z would be undefined.
-
- For some of the more popular equations, there are predefined equations that
- can be used to create paraboloids, ellipses, tori, and others.
-
- The equations for f, g, and h can contain the following operators:
-
- +, - , *, /, ^
-
- The functions recognized are:
-
- abs, cos, cosh, sin, sinh, tan, tanh, sqrt, exp, ln, log
-
- And the constants PI and E are defined.
-
- The usual rules for precedence are observed.
-
- In many cases, the * operator can be omitted, for equations like f(x)=5x.
-
- Unless parentheses are used, the unary operators and functions
- ( -, cos, sin, tan ...) operate on only the next operator in the
- equation. For example:
-
- sin5x = (sin(5))*x, while
- sin(5x) = sin(5*x)
-
- - page 4 -
-
- 6. The menu system
-
- a) How to use it - The menus can be controlled several ways.
- The menu which is highlighted is the current menu. To pull down the
- options for a menu, press <ENTER> or <DOWN>. <ESC> will remove the menu
- and return to the top level. When a menu is pulled down, <UP> and <DOWN>
- move the highlight bar within the menu. To make a selection, press <ENTER>.
- <LEFT> and <RIGHT> will change the current menu.
-
- b) The Surface menu - The surface menu contains all of the options
- necessary to Create and Edit Surfaces in the current Graph. None of the
- options in this menu can be used until a graph has been loaded or created
- using either the Load or New options from the Graph Menu. The options
- available are:
-
- i) Add - Add a Surface to the current Graph
- ii) Change - Change the current surface
- iii) Delete - Delete a Surface from the current Graph
- iv) Edit - Edit the current surface
- v) Graph - Graph all surfaces in the current Graph
-
- For more details on the Surface Menu commands see page 5
-
- b) The Graph menu - The Graph menu will allow the user to create
- new graphs, load a graph, or save the current graphs to the data file. All
- the graphs actually remain in memory the entire time, so loading a graph
- actually only selects the current graph. Available options:
-
- i) Add - Add a new Graph
- ii) Delete - Delete a Graph
- iii) Load - Load a Graph
- iv) Save - Save the graphs to the graph datafile
-
- For more details on the Graph Menu commands see page 6
-
- b) The Options menu - The Options menu can be used to configure
- the program for your specific needs. Use this menu to set the printer
- type, printer port, specify whether colors should be used, whether double
- buffering should be used, and the increment of angles to be used when
- rotating the graph in Graph Mode. Available options are:
-
- i) Edit - Edit the current setup
- ii) Display - Show the current setup
- iii) Save Setup - Save the current setup
-
- For more details on the options see page 7
-
- - page 5 -
-
- 7. The Surface Menu Commands
-
- i) Add - To add a surface to the current graph, select Add from
- the Surface menu. A menu with the different equation types will appear.
- Highlight the desired type of equation and press <ENTER>. If you choose
- a predefined equation, you will be asked to supply various parameters
- depending on what surface you choose. You will then be placed in the
- Edit mode for the Surface which allows you to specify the other Surface
- parameters.
-
- ii) Change - Change allows you to change the current surface within
- the current graph. A menu will pop up with the names of the surfaces in
- the current graph, allowing you to select the new current surface.
-
- iii) Delete - Choosing delete from the Surface menu will bring up
- a menu with the names of all surfaces which are part of the current
- graph, allowing you to choose a surface to delete. All graphs must
- contain at least one surface, so if you try to delete a surface from
- a graph which only has one surface, you will get an error.
-
- iv) Edit - Edit places you into Edit mode on the current surface.
- You can change the name of the current graph or the current surface,
- change any of the equations, the limits of x and y, the step values for
- x and y, the number of data points, and the center of the surface. When
- editing an equation or a graph or surface name, you are essentially in
- insert mode, where any character you type is inserted at the position of
- the cursor. The backspace deletes the character before the cursor, and
- the delete key deletes the character under the cursor. Using the <LEFT>
- and <RIGHT> keys allow you to move back and forth in the string. The
- <UP> and <DOWN> keys allow you to move from field to field in the
- surface specification, cancelling any changes that have been made in
- the current field. <ENTER> accepts the current changes and advances
- to the next field. To quit edit mode, press <ESC>. When editing
- equations, you will not be allowed to move or quit until a "legal"
- expression has been entered.
-
- v) Graph - Graph will enter graph mode and Graph all of the
- surfaces contained in the current graph. See Graph Mode Commands on
- page 8 for more details.
-
-
- - page 6 -
-
- 8. Graph Menu commands
-
- i) Add - Selecting new allows the user to create a new graph,
- and immediately prompts the user for an equation type for the first
- surface to add the the graph, since all graphs must contain at least
- one surface.
-
- ii) Delete - Delete a graph from the list of graphs. Choosing
- this option will bring up a menu with the names of all of the graphs,
- allowing the user to choose a graph to delete. This will NOT update
- the data file in any way. If this change is supposed to be permanent,
- follow the Delete command with a Save command.
-
- iii) Load - Choosing Load allows the user to choose a current
- graph from the list of graphs. The current surface becomes the first
- surface in the list of surfaces for this graph.
-
- iv) Save - Save rewrites the datafile of graphs, updating any
- changes you have made in the current session.
-
- - page 7 -
- 9. The Options
-
- i) Printer Type - 3dGraph supports 9 and 24-pin dot matrix
- printing. It was developed for use with a Star printer, but has been
- used on a variety of different printers and found to be compatible.
-
- ii) Printer Port - There are 6 options for the printer port,
- LPT1-2, and COM1-4. The program has NOT been tested using the COM
- port configurations, but I would be interested in hearing how it works.
-
- iii) Graphing Colors - If the program is configured to use colors,
- and the monitor being used supports 16 colors or more, the graph will
- be displayed in a spectrum of colors showing the contours. If the
- monitor does not support 16 colors, this option will be ignored.
-
- iv) Double Buffering - Double buffering can be used on some
- monitors, allowing the drawing to be done on a separate graphics screen,
- and then displayed quickly so the redrawing is not noticeable. The
- problem with this is that while it is drawing the delay may cause the
- user to think the key was not detected. Turning this option off will
- draw on the currently displayed screen all of the time, so you can see
- when the computer is working. This is the default on monitors which do
- not support double buffering.
-
- v) Angle step - When rotating the graph in Graph Mode, this
- option specifies how many degrees to rotate the graph with each keypress.
- Allowable values are 1-15.
-
- - page 8 -
-
- 10. Graph Mode commands
-
- While in graph mode, there are many commands to modify the display.
- The viewpoint is specified by two angles, phi and theta, similar to the
- angles used in a spherical coordinate system. Using the arrow keys modify
- the angles as follows:
-
- i) <UP> - decreases the angle phi
- ii) <DOWN> - increases the angle phi
- iii) <LEFT> - decreases the angle theta
- iv) <RIGHT> - increases the angle theta
-
- The diagonal keys can be used as a logical combination of the above.
-
- By default, the graph is scaled so that it is viewable from all angles.
-
- The following commands are included in a help screen that can be viewed
- by pressing <F1> or 'h' while in Graph Mode.
-
- 'a' - Toggle the drawing of the axes
- 'c' - Continuous mode - causes <UP>, <DOWN>, etc. to be repeated until
- any key other than the arrow keys is pressed.
- 'd' - Toggle the drawing of the graph. This is useful to quickly rotate
- to a desired viewing angle without having to wait for the graph
- to redraw every time. If 'd' is pressed when the axes are off,
- the axes will automatically be redrawn until 'd' is pressed again.
- 'l' - label the axes
- 'p' - Print the graph from the current viewing angles.
- 'r' - Return graph to original view and reset scaling
- 'x' - Increase or decrease the x axis scaling
- 'y' - Increase or decrease the y axis scaling
- 'z' - Increase or decrease the z axis scaling
- <enter> - Toggle increase/decrease action of x,y,z commands
-
- To exit from the Graph Mode and return to the main menu, press <ESC>
-
-