Knotted torus


News Search Site Map

Home

 

Documentation

  Up
Documentation
Browser Set Up

DPGraph Documentation 

OVERVIEW: DPGraph
 allows you to create beautiful, full-color, filled, photorealistic 3D surfaces, and then display, view, and manipulate them over the Internet. 

  • An ordinary surface, such as a sphere, is as easy as GRAPH3D( X^2 + Y^2 + Z^2 = 9 ) in Cartesian coordinates or GRAPH3D( RHO = 3 ) in spherical coordinates. 
  • Extraordinary surfaces, such as the Glynn manifold, are as easy as GRAPH3D( SIN(2*X) + SIN(2*Y) = SIN(2*Z) ). 
  • DPGraph
     can graph 3D inequalities, such as GRAPH3D( Z*X > Y ), and it can even show you the intersection of 3D inequalities, such as GRAPH3D( X^2+Y^2+Z^2<=9 & X>1 ). 
  • If you want to graph multiple surfaces, you can put them in a list: GRAPH3D( (X=1, Y=1, Z=1) ) shows three intersecting planes.
  • If you want to see your surfaces move, you can use time as a variable: a hyperboloid that moves from one sheet to two is as easy as GRAPH3D( X^2 + Y^2 + SIN(TIME) = Z^2 ). 
  • You can use the VECTOR command to graph vector fields: GRAPH3D( VECTOR( X/RHO/3, Y/RHO/3, Z/RHO/3) ). 
  • You can explore the effects of parameters in graphs such as GRAPH3D( A*X^2 + B*Y^2 + C*Z^2 = 9*D^2 ) by using DPGraph
    's scrollbar to change the values of A, B, C, and D in real time. 
  • To zoom and rotate your graph, you can use the Home, PageUp, PageDown, and arrow keys. For maximum speed and minimum size, DPGraph
     is programmed entirely in assembly language.

WEBSITE: www.davidparker.com 

COMMON ERRORS: The five most common mistakes when creating graphs in the EDIT dialog box are: 1) leaving out asterisks for multiplication; 2) leaving out equals signs or inequality signs; 3) leaving out the parentheses for lists; 4) trying to use equalities in intersections (DPGraph can only intersect inequalities, i.e. regions of space); and 5) putting a space inside the two-character symbols :=, >=, or <=.

Wrong: Right:
graph3d( 3x = z^2 ) graph3d( 3*x = z^2 )
graph3d( x^2+y^2 ) graph3d( z = x^2+y^2 )
graph3d( x=1, y=1 ) graph3d( ( x=1, y=1 ) )
graph3d( x=1 & y=1 ) graph3d( x>1 & y>=1 )
graph3d( z^2> =x^2 ) graph3d( z^2 >= x^2 )

INEQUALITIES: When graphing an inequality, such as GRAPH3D( X>1 ), remember that "blue is true"; the bluest side of the graph is the region of space for which the inequality is true, the reddest side of the graph is the region of space for which the inequality is false. If the inequality is true for the surface itself, as in GRAPH3D( X>=1 ), then the bluest side is pure blue; if the inequality is false for the surface itself, as in GRAPH3D( X>1 ), then the reddest side is pure red.

DEFAULTS.DPG: With experience you may find the following technique useful when exploring a new surface. OPEN the file DEFAULTS.DPG, go to EDIT, modify the default equation, and then EXECUTE. Since all of the options are already in DEFAULTS.DPG they can be changed with very little typing. If you like, SAVE the modified file under a different name and it will be ready for future viewing and adjustments.

RESOLUTION: The easiest way to improve the appearance of some graphs is to increase the resolution. The default resolution is 21 by 21 by 21. To change the resolution, use the EDIT dialog box to insert a line such as the following before the GRAPH3D command:

graph3d.resolution := 30

You may find it useful to use the technique described in the previous section on DEFAULTS.DPG.

COPYING A GRAPH TO THE CLIPBOARD: Click on CLIPBOARD to copy a picture of the graph to the clipboard. To copy a picture of the entire window (including the border, etc.) to the clipboard, simultaneously press down the ALT and PRINTSCREEN keys. To copy a picture of the whole screen to the clipboard, press PRINTSCREEN.

COPYING A GRAPH INTO ANOTHER APPLICATION: If the other application supports pasting, first copy the graph to the clipboard. Then click on EDIT in the other application, then click on PASTE.

PRINTING A GRAPH: First copy the the graph to an application, such as Word or Paint, that supports printing. Then click on FILE in the other application, then click on PRINT.

FILE FORMAT: DPGraph
 files are standard ASCII files with a file type of .DPG. DPG files are readable and editable by Notepad and many other text editors. Each line in the file is a separate command for DPGraph
. For example, a file might look like this:

graph3d.view:=top
graph3d.perspective:=false
graph3d(z=3*sin(x*y))

Each command must be on a separate line. The GRAPH3D command must be on the last line.

OPTIONS (Non-numeric default values are given in capital letters.)
graph3d.resolution (resolution along longest side of box, default is 21; other sides of box have a resolution proportional to the length of the side)
graph3d.mesh (TRUE or false)
graph3d.perspective (TRUE or false)
graph3d.box (TRUE or false)
graph3d.view (STANDARD, top, side, front, or textbook)
graph3d.contrast (default is 1/2, range is 0 to 1)
graph3d.transparency (default is 0, range is 0 to 1)
graph3d.background (black, gray, WHITE, brown, red, yellow, green, cyan, blue, or magenta)
graph3d.color (BYHEIGHT, bysteepness, black, gray, white, brown, red, yellow, green, cyan, blue, or magenta)
graph3d.highlight (default is 0, range is 0 to 1)
graph3d.shading (default is 0, range is 0 to 1)
graph3d.vectorcolor (BYHEIGHT, bysteepness, black, gray, white, brown, red, yellow, green, cyan, blue, or magenta)
graph3d.vectorhighlight (default is 0, range is 0 to 1)
graph3d.vectorshading (default is 0, range is 0 to 1)
graph3d.vectoralign (TAIL, center, or tip)
graph3d.vectorarrowhead (true or FALSE)
graph3d.minimumx (default is -3)
graph3d.maximumx (default is 3)
graph3d.minimumy (default is -3)
graph3d.maximumy (default is 3)
graph3d.minimumz (default is -3)
graph3d.maximumz (default is 3)
a.minimum (scrollbar variable minimum value)
a.maximum (scrollbar variable maximum value)
b.minimum (scrollbar variable minimum value)
b.maximum (scrollbar variable maximum value)
c.minimum (scrollbar variable minimum value)
c.maximum (scrollbar variable maximum value)
d.minimum (scrollbar variable minimum value)
d.maximum (scrollbar variable maximum value)

VALUES FOR OPTIONS

true (for mesh, perspective, box, and vectorarrowhead)
false (for mesh, perspective, box, and vectorarrowhead)
standard (for view, x is the most horizontal axis)
textbook (for view, y is the most horizontal axis)
top (for view)
front (for view)
side (for view)
byheight (for color or vectorcolor)
bysteepness (for color or vectorcolor)
black (for color, vectorcolor, or background)
gray (for color, vectorcolor, or background)
white (for color, vectorcolor, or background)
brown (for color, vectorcolor, or background)
red (for color, vectorcolor, or background)
yellow (for color, vectorcolor, or background)
green (for color, vectorcolor, or background)
cyan (for color, vectorcolor, or background)
blue (for color, vectorcolor, or background)
magenta (for color, vectorcolor, or background)
tail (for vectoralign)
center (for vectoralign)
tip (for vectoralign)

CONSTANTS

pi (pi)
e (base of natural logarithms)

VARIABLES

x (x variable for 3D graphing)
y (y variable for 3D graphing)
z (z variable for 3D graphing)
r (polar radius, r=sqrt(x^2+y^2))
theta (polar angle, 0<=theta<2*pi, theta=angle(-x,-y)+pi)
rho (spherical radius, rho=sqrt(x^2+y^2+z^2))
phi (spherical angle, 0<=phi<=pi, phi=angle(z,r))
a (a variable for scrollbar)
b (b variable for scrollbar)
c (c variable for scrollbar)
d (d variable for scrollbar)
time (current time for graphs that change with time)

 

ONE ARGUMENT FUNCTIONS
abs (absolute value, same as |...|)
acos (arccosine)
acosh (hyperbolic arccosine)
acot (arccotangent)
acoth (hyperbolic arccotangent)
acsc (arccosecant)
acsch (hyperbolic arccosecant)
asec (arcsecant)
asech (hyperbolic arcsecant)
asin (arcsine)
asinh (hyperbolic arcsine)
atan (arctangent)
atanh (hyperbolic arctangent)
cos (cosine)
cosh (hyperbolic cosine)
cot (cotangent)
coth (hyperbolic cotangent)
csc (cosecant)
csch (hyperbolic cosecant)
gamma (gamma function)
ln (log base e)
log (log base 10)
nonneg (1 if x>=0, else undefined)
one (1 if 0<=x<=1, else undefined)
sec (secant)
sech (hyperbolic secant)
sign (-1 if negative, 1 if positive, indefinite if 0 or indefinite)
sin (sine)
sinh (hyperbolic sine)
sqr (square)
sqrt (square root)
tan (tangent)
tanh (hyperbolic tangent)
SYMBOLS
= (equals, for entering equations)
< (less than, for entering inequalities)
> (greater than, for entering inequalities)
<= (less than or equal, for entering inequalities)
>= (greater than or equal, for entering inequalities)
& (intersection)
:= (assignment, for assigning values)
(...) (lists of arguments or equations)
+ (addition or leading plus sign)
- (subtraction or leading minus sign)
* (multiplication)
/ (division)
^ (powers)
|...| (absolute value, same as abs(...))
! (factorial)

TWO ARGUMENT FUNCTIONS

angle (-pi <= angle of (x,y) from positive x axis <= pi)
beta (beta function)

THREE ARGUMENT FUNCTIONS

near (1 if (x,y,z) is near current grid, else undefined)
vector (graphs a vector field)

 

KNOWN PROBLEMS

  1. Microsoft WordPad under Windows NT 4.0 makes embedded graphs, or graphs copied from the clipboard, too large. It also truncates the graphs on the right hand side.
  2. Microsoft Paint in 256 color mode decreases the number of colors in the graphs to 16.

Setting up your Browser for DPGraph

Copyright © 1999-2000 by David Parker. All rights reserved.

    

 

 

Activities  |  Advisement  |  Courses  |   Faculty  |  Program  |  Resources   |  Staff  |  Students
Alumni  |  Home  News  |  Search  | Site Map 
College of Science and Health
Last update: October, 2005