

Note that Mathematica chooses very different scaling for the two coordinate axes. Thus the work in solving the equation for y is not wasted! The following routine gives a picture of the region whose revolution produces the surface. However, to generate the plot it is helpful to know that x cannot exceed 1/4. Via its ImplicitPlot command, Mathematica can acutally plot the curve without expressing y as a function of x. To do so, rewrite the equation as a quadratic equation in y and use the quadratic formula to solve for y : Since the Mathematica command to plot a surface of revolution requires a formula in the form y = f ( x ), to plot this surface of revolution, you need to solve the equation of the curve for y in terms of x. The curve x = y - in the xy -plane is revolved about the y -axis ( x = 0). Execute it as before, and compare the output with Figure 7(b), Section 6.2 of Stewart.ģ. The following routine illustrates this by plotting the result of revolving the graph of y = between y = 0 and y = 8 about the y-axis. However, the y-axis is the default axis of revolution for the SurfaceofRevolution command, so you can simply omit the RevolutionAxis command. To revolve about the y-axis, you could use RevolutionAxis ->. Listing y last puts that label on the vertical axis.Ģ.

The blank between x and y in the brace suppresses a label on the "front-back" direction. This accounts for the unusual specification of labels above. In single-variable calculus, the vertical axis normally carries the label y. This three-dimensional point of view, which Math 210 and 220 develop in detail, labels the vertical coordinate axis as the z-axis. Note: actually, Mathematica plots the surface of revolution as the graph of x = in the x z-plane, revolved about the z-axis.

Mathematica plot label code#
Execute the following code to see how that works. To add labels on the coordinate box that surrounds the surface, use the following slight modification.įor a wider x -view, specify a larger plot range on x, y, and z ( the third coordinate variable in 3-space). Needsįor a more elongated plot, which resembles Figure 6(b) of Section 6.2 of Stewart's Calculus, 4th Ed., enlarge the range of x -values and generate the plot as before. To generate a plot from the following code, position the cursor at the end of the block of blue commands, the press the Enter key (or press the Shift and Return keys together). Consider first the surface of revolution that results from revolving the graph of y = for x in the interval about the x-axis in the xy-plane. You can modify them to generate pictures of surfaces that appear in homework exercises.ġ.
Mathematica plot label how to#
The following string of examples illustrate how to use these commands. To specify the x-axis as axis of revolution, add Those commands will plot the graph of the surface in that results from revolving the graph of y = f(x) about the y-axis in the xy-plane. Mathematica has a built-in package to plot surfaces of revolution. This notebook is in the Math 116 folder, within the Math Lab folder of the volume Workspace in MSB 203. Hurley, University of Connecticut, Department of Mathematics, 196 Auditorium Rd, Unit 3009, Storrs CT 06269-3009. Plotting Surfaces of Revolution in MathematicaĬopyright © 1999, 2001 by James F. SurfRevol.nb SurfRevol: A Mathematica Notebook
