GETTING STARTED PRIMERS

Graphing - 3D Plots

This worksheet shows you how to create a 3D plot from a function of two variables, and from a set of parametric functions. It also explains a little bit about how to format the look of these plots for maximum effect.

Examples

Here are two 3D plots with special formatting:

The 3D graph on the left shows the plot of a function of two variables, a paraboloid. The 3D graph on the right shows a parametric plot of a surface of revolution, specified by three functions to determine the x, y, and z coordinates.

Practice

To Create a 3D QuickPlot from a Function

1. To define a two-variable function,

type:

See:

H1(x,y):x^2 [Spacebar] +4y^2

Click in a new region to insert a 3D graph (surface plot) and enter the name of the function in this region by typing:

[Ctrl]2 H1

Try it!

Tip: Any two-variable function of quadratic terms produces a paraboloid in a surface plot.

This plot is a QuickPlot, meaning that you don't have to specify a range or spacing for the independent variables because Mathcad picks them automatically. To adjust the range used, double-click on the plot, and change the settings on the QuickPlot tab. The default is -5 to 5 for each independent variable with a spacing of 20 points across each range.

2. Insert a 3D graph region (bar plot) by clicking the following button on the Graph toolbar:

See:

Or, select Graph > 3D Bar Plot from the Insert menu. Then, enter the name of the function defined in the previous example, H1.

Try it!

To Create a 3D QuickPlot from Parametric Functions

It is sometimes useful to define variables in terms of other variables or parameters.

To define three two-variable functions,

type:

See:

X(u,v):sin(v)*cos(u)[Enter]

Y(u,v):sin(v)*sin(u)[Enter]

Z(u,v):cos(v)[Enter]

Then, insert a 3D graph region (surface plot) and enter the name of the functions, surrounded by parentheses, in this region by typing:

[Ctrl]2 'X,Y,Z[Enter]

Try it!

In addition to functions of two variables and sets of parametric functions, you can also enter matrix names and sets of three paired vectors specifying X, Y, and Z coordinates. See the Quicksheet on plotting data for more examples.

To Change the Appearance of a 3D Graph

1. Double-click the 3D graph below to access the 3-D Plot Format dialog box:

See:

On the Appearance page, select "Fill Surface" and "Colormap" and click OK.

See:

Click on the plot itself, hold down the mouse button, and move the mouse around. Notice that this changes the view you have of the plot.

Double-click on the plot again. On the General page, set the Rotation, Tilt, and Twist as follows:

Rotation: 0

Tilt: 35

Twist: -10

The graph appears as it does to the right.

2. Double-click the 3D graph below to access the 3-D Plot Format dialog box.

See:

On the Appearance page, select "Fill Surface" and "Solid Color" in the first column.

Click the color box to the right of the Solid Color selection. Select the following color from the palette and click OK twice to close the dialogs:

See:

Right-click on the plot and select Lighting from the menu. Under "Light Scheme," choose "Scheme 1."

Double-click on the plot again. On the Advanced page, set %Transparency to 50%. On the General page, set the Rotation, Tilt, and Twist as follows:

See:

Rotation: 40

Tilt: 20

Twist: 320

Continue to try different options to see how you can transform the look of a 3D graph. See Formatting 3D Plots for more information.

 

Íàçàä

 

Hosted by uCoz