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

134 / Chapter 12 3D Plots

To change the default ranges and grids for the independent variables, double-click on the graph and select the QuickPlot Data tab on the 3D Plot Format dialog.

Creating a Space Curve

You can visualize any parametrically-defined function of one variable as a 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:

H(u) is a vector-valued function of one variable.

R(u), S(u), and T(u) are functions of one variable.

Note A space curve often represents the path of a particle in motion through space where u is a time parameter.

Step 2: Insert a 3D scatter plot

To create a space curve from a function or set of functions:

1.Choose Graph > 3D Scatter Plot from the

Insert menu to display a blank 3D plot.

2.Enter the name of the function or functions in the placeholder, separated by commas. To create a space curve from the functions R, S, and T, defined above, type: (R,S,T).

For specific information on formatting, see “Scatter Plots” in online Help.

Creating 3D Plots of Data

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

Creating a Surface, Bar, or Scatter Plot

Surface, bar, and scatter plots are useful for visualizing two-dimensional data contained in an array as either a connected surface, bars above and below the zero plane, or points in space.

Creating 3D Plots of Data / 135

To create a surface plot from data:

1.Create or import a matrix of values to plot. The row and column numbers represent the x- and y-coordinate values. The matrix elements themselves are the z-coordinate values plotted as heights above and below the x-y plane (at z = 0).

2.Choose Graph > Surface Plot from the Insert menu.

3.Enter the name of the matrix in the placeholder.

Figure 12-2 shows a 3D bar plot created from a matrix, M.

Figure 12-2: Defining a matrix of data and plotting it as a 3D bar plot.

In the default perspective, the first row of the matrix extends from the back left corner of the grid to the right, while the first column extends from the back left corner out toward the viewer. See “Formatting a 3D Plot” on page 139 to change this default view.

Creating a Parametric Surface Plot

A parametric surface plot is created from three matrices representing the x-, y-, and z- coordinates of your points in space.

To create a parametric surface plot:

1.Create or import three matrices having the same number of rows and columns.

2.Choose Graph > Surface Plot from the Insert menu.

3.Type the names of the three matrices separated by commas and enclosed in parentheses in the placeholder.

136 / Chapter 12 3D Plots

Figure 12-3 shows a parametric surface plot created from the matrices X, Y, and Z defined above the plot.

Figure 12-3: Defining data for a parametric surface plot.

Note The underlying parameter space is a rectangular sheet covered by a uniform mesh. The three matrices map this sheet into three-dimensional space. For example, the matrices X, Y, and Z defined in Figure 12-3 carry out a mapping that rolls the sheet into a tube and then joins the ends of the tube to form a torus.

For specific information on formatting, see “Surface Plots” in online Help.

Creating a Three-dimensional Parametric Curve

A three-dimensional parametric curve is created by passing three vectors representing the x-, y-, and z-coordinates of your points in space to the surface plot.

To create a three-dimensional parametric curve:

1.Create or import three vectors having the same number of rows.

2.Choose Graph > Scatter Plot from the Insert menu.

3.Type the names of the three vectors separated by commas and enclosed in parentheses in the placeholder.

Creating 3D Plots of Data / 137

Figure 12-4 shows a three-dimensional parametric curve created from the vectors P, Q, and R, defined above the plot.

Figure 12-4: Defining data for a space curve.

Online Help For specific information on formatting, see “Scatter Plots” in online Help.

Creating a Contour Plot

To view three-dimensional data as a two-dimensional contour map, you can create a contour plot:

1.Define or import a matrix of values to plot.

2.Choose Graph > Contour Plot from the Insert menu to display a blank plot with a single placeholder.

3.Type the name of the matrix in the placeholder.

Figure 12-5 shows a contour plot created from the matrix C defined above the plot.

The contour plot is a visual representation of the matrix’s level curves. Mathcad assumes that the rows and columns represent equally spaced intervals on the axes then linearly interpolates the values of this matrix to form level curves or contours. Each level curve is formed such that no two cross. By default, the z-contours are shown on the x-y plane. Mathcad plots the matrix such that the element in row 0 and column 0 is in the lower left corner. Thus the rows of the matrix correspond to values on the x-axis, increasing to the right, and the columns correspond to values along the y-axis, increasing toward the top.

Online Help For information on formatting a contour plot, see “Contour Plots” in online Help.

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