1. Trang chủ
  2. » Giáo án - Bài giảng

Chương trình HyBeboloit

11 173 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Chương trình HyBeboloit
Trường học Dynamic Photorealistic Graphing
Thể loại Hướng dẫn
Năm xuất bản 2004
Định dạng
Số trang 11
Dung lượng 59,5 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

DPGraph can read and write either type of DPG file, but the DPGraph Viewer can only read binary DPG files.. graph3d.resolution resolution along longest side of box, default is 21; other

Trang 1

CHÖÔNG TRÌNH HYBEBOLOIT

a := 1

a.minimum := -2

a.maximum := 2

b := 1

b.minimum := -2

b.maximum := 2

c := 1

c.minimum := -2

c.maximum := 2

d := 1

d.minimum := -2

d.maximum := 2

graph3d.box := false

graph3d.mesh := true

graph3d.view := standard

graph3d.background := black

graph3d.perspective := true

graph3d.resolution := 21

graph3d.highlight := 0

graph3d.shading := 0

graph3d.contrast := 1/2

graph3d.transparency := 0

graph3d.color := byheight

graph3d.minimumx := -3

graph3d.maximumx := 3

graph3d.minimumy := -3

graph3d.maximumy := 3

graph3d.minimumz := -3

graph3d.maximumz := 3

graph3d(a*x^2+b*y^2+sin(c*time)=d*z^2)

Trang 2

HƯỚNG DẨN VIÊT CHƯƠNG TRÌNH CHO HÌNH CO NÍC

Dynamic Photorealistic Graphing (DPGraph) the world's most powerful 2D through 8D graphing software, optimized for the internet

Version 2004.08.22 Visit www.dpgraph.com for the full documentation, or click on Open and then Edit to examine the sample files for useful tips; this online help is a summary Copying DPGraph for unlicensed users is illegal DPGraph is a trademark of David Parker Other company and products names are trademarks or registered trademarks of their respective

companies Copyright (C) 1997-2004 by David Parker All rights reserved

COMMON ERRORS: The seven 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); 5) putting a space inside the two-character symbols :=, >=, or <=; 6) using the parametric variables u or v in implicit graphs; and 7) using the implicit variables x, y, z,

r, theta, rho, or phi in parametric graphs

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 )

graph3d( z=u^2+v^2 ) graph3d( z=x^2+y^2 )

graph3d( rectangular(x,y,sin(x+y)) ) graph3d( rectangular(u,v,sin(u+v)) )

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

Trang 3

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 for implicit graphs, and 40 by 40 for parametric surfaces To change the

resolution for implicit graphs, use the EDIT dialog box to insert a line such

as the following before the GRAPH3D command:

graph3d.resolution := 30

For parametric surfaces:

graph3d.stepsu := 50

graph3d.stepsv := 50

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 have a file type of DPG There are two kinds of DPG files: binary and ASCII DPGraph can read and write either type of DPG file, but the DPGraph Viewer can only read binary DPG files Binary DPG files are compressed and contain error detection information for more reliable transmission ASCII 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

Trang 4

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

UNINSTALLATION: There are two ways to remove DPGraph from your hard disk drive Method 1: click on START - SETTINGS - CONTROL PANEL - ADD/REMOVE PROGRAMS, then scroll to DPGraph in the window, select it, and click on ADD/REMOVE Method 2: click on START - PROGRAMS - DPGRAPH - UNINSTALL

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, magenta, or an expression depending on x, y, z, or time) 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, magenta, or an expression depending on x, y, z, or time) 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)

Trang 5

graph3d.minimumy (default is -3)

graph3d.maximumy (default is 3)

graph3d.minimumz (default is -3)

graph3d.maximumz (default is 3)

graph3d.minimumu (default is -3)

graph3d.maximumu (default is 3)

graph3d.stepsu (default is 40)

graph3d.minimumv (default is -3)

graph3d.maximumv (default is 3)

graph3d.stepsv (default is 40)

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)

Trang 6

center (for vectoralign)

tip (for vectoralign)

CONSTANTS:

e (base of natural logarithms)

#e (base of natural logarithms for Derive users)

pi (pi)

VARIABLES:

x (x variable for implicit graphing)

y (y variable for implicit graphing)

z (z variable for implicit 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))

u (u variable for parametric graphs)

v (v variable for parametric graphs)

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)

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( ))

Trang 7

! (factorial)

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)

ceiling (smallest integer >= argument)

cos (cosine)

cosh (hyperbolic cosine)

cot (cotangent)

coth (hyperbolic cotangent)

csc (cosecant)

csch (hyperbolic cosecant)

floor (greatest integer <= argument)

gamma (gamma function)

ln (log base e)

log (log base 10)

nonneg (1 if argument>=0, else undefined)

one (1 if 0<=argument<=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)

TWO ARGUMENT FUNCTIONS:

Trang 8

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

beta (beta function)

THREE ARGUMENT FUNCTIONS:

cylindrical (parametric graph in cylindrical coordinates)

near (1 if (x,y,z) is near current grid, else undefined)

rectangular (parametric graph in rectangular coordinates)

spherical (parametric graph in spherical coordinates)

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

HISTORY:

22 August 2004 For the benefit of Derive users, DPGraph now accepts #e

in addition to e for 2.71828 , the base of natural logarithms

18 November 2003 DPGraph now installs under limited accounts on Windows XP Added code that prevents DPGraph from crashing when buggy memory-resident third-party programs leave floating-point interrupts enabled

9 November 2001 Put in a workaround for a bug in Windows XP that caused previous versions of DPGraph to crash

25 September 2001 The commands in DPGraph files can now extend over more than one line There must be an opening parenthesis on the first line of the command, and a closing parenthesis on the last line For example, the command

GRAPH3D( (X^2+Y^2+Z^2=9,SIN(X)+SIN(Y)=SIN(Z)) )

can now be written as

GRAPH3D( (X^2+Y^2+Z^2=9,

SIN(X)+SIN(Y)=SIN(Z)) )

This version also fixes some minor bugs You can now use exponential notation for numbers (e.g 1.856E3) Also, selecting 'By expression' on the Color menu doesn't cause crashes when displaying parametric graphs

12 May 2001 Added several examples to the Parametric Curves and Surfaces directory

Trang 9

10 May 2001 Fixed a bug that caused time-dependent parametric graphs

to gradually eat up memory

6 May 2001 Added support for 2D to 5D parametric curves and surfaces

in rectangular, polar, cylindrical, and spherical coordinates Also added ceiling and floor functions

22 January 2001 Fixed the documentation to mention both ASCII and binary DPG files Added more user contributed graphs, including a new folder called Optimal Geometry

2 January 2001 Added support for binary DPG files, which are smaller than ASCII DPG files Also released DPGraph Viewer, which can read binary DPG files

12 December 2000 Changed the opening screen, changed the name from DPGraph 2000 to DPGraph, and unified the Linux and Windows versions into a single executable file

26 November 2000 Fixed a bug that caused some vector fields to be displayed incorrectly when used in lists

7 October 2000 You can now use mathematical expressions to specify the colors of surfaces and vectors This enables DPGraph to display up to 8D graphs: 3D arrays of time-dependent 3D vectors, using color to encode another dimension of information (momentum, for example) For example, here is what you could type into a DPG file (by clicking on Edit inside DPGraph) to specify the color of a surface:

graph3d.color := sin(x)*sin(y)*sin(z)

and here is what you could type to specify the color of vectors:

graph3d.vectorcolor := sin(x)*sin(y)*sin(z)

You can even make the color vary with time For example:

graph3d.color := (x+time)/6

To convert the expression to a color, DPGraph uses only the fractional part

of the expression when evaluated at the current x, y, z, and time coordinates This results in values that range from 0 to 1 These values are then mapped onto a color wheel that ranges from red at 0, through magenta, blue, cyan, green, yellow, and finally back to red again at 1

13 August 2000 Found and fixed a bug in the Linux version that caused status information to be displayed in the middle of the main window, instead

of at the bottom of the main window

10 August 2000 This is the release of the first Linux version

17 July 2000 Fixed a bug under older releases of Windows 95 that caused the OPEN and SAVE menu items to not work

2 May 2000 Increased the maximum size of lines in DPGraph files from 1,500 characters to 36,000 characters In the Edit dialog box, Windows may

Trang 10

seem to break an extremely long line into several smaller lines each with about 1,000 characters, but internally it is still one long line

4 April 2000 Added three new features that are handy for graphing vector fields To put arrowheads on the vectors in a vector field, set

GRAPH3D.VECTORARROWHEAD := TRUE (the default is FALSE) To change the alignment of the vectors with respect to the points at which they are defined, set GRAPH3D.VECTORALIGN to either CENTER or TIP (the default is TAIL) And finally, to view only selected vectors in a vector field, use the new NEAR function NEAR(X,Y,Z) is 1 if the current grid point is near (X,Y,Z), otherwise NEAR is undefined To select a subset of the

vectors for display, multiply NEAR(X,Y,Z) times one of the elements of the vector For example, to graph the VECTOR(2,3,1) with its tail near (0,0,0),

do GRAPH3D( VECTOR( NEAR(0,0,0)*2,3,1 ) ) Handy trick: set

GRAPH3D.RESOLUTION so that NEAR(X,Y,Z) is right on a grid point For example, the if you are only interested in the vector NEAR(0,0,0), set GRAPH3D.RESOLUTION := 3 Another trick: the arguments to NEAR don't have to be constants To graph a whole plane of vectors, try

NEAR(X,0,0)

28 February 2000 Fixed a bug that caused DPGraph to occasionally freeze up

23 February 2000 DPGraph can now graph 4D vector fields (three spacial dimensions, plus time) For example, to generate a 3D radial vector field type GRAPH3D( VECTOR( X/RHO/3, Y/RHO/3, Z/RHO/3) ) into the EDIT dialog box RHO is the radius in spherical coordinates For an

example of a moving 4D vector field that might make you seasick, try

GRAPH3D( VECTOR(-SIN(THETA+TIME)/6,COS(THETA+TIME)/6,0) ) and rotate it with the arrow keys till you are looking at it from the top You might also want to set GRAPH3D.PERSPECTIVE:=FALSE so that the columns line up and GRAPH3D.VIEW:=TOP so that it automatically comes

up in a top view If you have a strong stomach, you can click on ANIMATE

to continuously rotate the graph while it is seething You can graph lists of vectors and you can combine vector fields with other types of surfaces As with other types of surfaces, you can use the SCROLLBAR to slice through vector fields and change the shading and highlighting You can also click on COLOR to change the color of the vectors Click on OPEN to view

DEFAULTS.DPG, which contains an example DPGraph doesn't support vector math (yet!), so you can't add or subtract vectors However, you can always do the additions and subtractions inside the VECTOR function I've also added hundreds of pretty pictures from the DPGraph Library and added

Ngày đăng: 01/07/2013, 01:27

w