Добавил:
kostikboritski@gmail.com Выполнение курсовых, РГР технических предметов Механического факультета. Так же чертежи по инженерной графике для МФ, УПП. Писать на почту. Дипломы по кафедре Вагоны Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
41
Добавлен:
12.08.2017
Размер:
2.3 Mб
Скачать

132/ Chapter 12 3D Plots

2.Select a type of three-dimensional graph.

3.Make your selections for the appearance and coloring of the plot on subsequent pages of the Wizard. Click “Finish” and a graph region with a blank placeholder appears.

4.Enter appropriate arguments (a function name, data vectors, and so on) for the 3D plot into the placeholder.

5.Click outside the plot or press [Enter].

Creating 3D Plots of Functions

You can create various 3D plots from functions using commands from the Insert menu and changing settings through the 3D Plot Format dialog box, or you can use the 3D Plot Wizard.

Tip To see a variety of twoand three-dimensional functions and data sets visualized in plots, visit the Graphics Gallery section of the Mathcad Web Resources at http://www.ptc.com/go/mathsoft/mathcad_resources/.

Creating a Surface, Bar, Contour, or Scatter Plot

You can visualize any function of two variables as a surface, bar, contour, or scatter plot in three dimensions.

Step 1: Define a function or set of functions

First, define the function in your worksheet in one of the following forms:

In the plot of each function above, the x- and y-coordinates and variables will range by default from –5 to 5 with a step size of 0.5. F(x,y) is a function of two variables. Each z-coordinate is determined by the function using these x- and y-values.

G(u,v) is a vector-valued function of two variables. The x-, y-, and z-coordinates are plotted parametrically according to the definitions in the three elements of the vector using these u- and v-values.

X(u,v), Y(u,v), and Z(u,v) are functions of two variables. The x-, y-, and z-coordinates are plotted parametrically according to the three function definitions using these u- and v-values.

Note The function descriptions above assume that you are working in Cartesian coordinates. If your function represents spherical or cylindrical coordinates, you can automatically convert the function to Cartesian coordinates. Double-click on the plot, go to the QuickPlot Data page of the 3D Plot Format dialog box, and click “Spherical” or “Cylindrical” under Coordinate System.

Creating 3D Plots of Functions / 133

Step 2: Insert a 3D plot

Choose Graph from the Insert menu and select a 3D plot type.

To create a surface plot from the functions X, Y, and Z, defined above:

1.Choose Graph > Surface Plot from the

Insert menu to display a blank 3D plot.

2.Type the name of the functions separated by commas and enclosed in parentheses in the placeholder. For this example, type:

(X,Y,Z)

3.Press [Enter].

To change your plot to a different plot type:

1.Double-click on the graph to bring up the 3D Plot Format dialog box.

2.In the “Display As” section on the General tab, select “Bar Plot,” “Contour Plot,” or “Data Points” from the array of plot types.

Figure 12-1 shows a 3D scatter plot created from the function G and a contour plot created from the function F, both defined above.

Figure 12-1: A scatter plot and a contour plot created from functions of two variables.

Note All 3D QuickPlots are parametric curves or surfaces. In other words, all QuickPlots are created from three vectors or matrices of data representing the x-, y-, and z-coordinates of the plot. In the case of a single function of two variables, Mathcad internally creates two matrices of x- and y- data over the default range –5 to 5 with a step size of 0.5 and then generates z-data using these x- and y-coordinates.

Соседние файлы в папке doc