3 Solid 3D Plots For y varying from 0 to 2pi and x from 1 to

3 Solid 3D Plots For y varying from 0 to 2pi and x from -1 to 1, plot z = x*sin(y) using meshgrid function, and title (3D surface plot example) - plot z within [-1.5, 1.5] - plot in the same figure the three functions: z1 = y*exp(x^2.5) z2 = (1/2)x*cos(y) z3 = z1 + z2

Solution

In Mathematica Software program, you may use the following commands to get the required graphs. For other softwares, the commands might alter a bit, but the concept would remain the same.

(a) Plot3D[x Sin[y], {x, -1, 1}, {y, 0, 2 Pi}, Mesh -> 15, PlotLabel -> \"3D Surface Plot Example\"]

Mesh command will change the number of grid lines, like 15 can be made 25 or 10 etc.

PlotLabel gives the title to the plot.

(b) Plot3D[x Sin[y], {x, -1, 1}, {y, 0, 2 Pi}, Mesh -> 15, PlotRange -> {-1.5, 1.5}]

Here, PlotRange command forces z to lie in the specified interval.

(c) Plot3D[{y Exp[x^{2.5}], 1/2 x Cos[y] , y Exp[x^{2.5}] + 1/2 x Cos[y] }, {x, -1, 1}, {y, 0, 2 Pi}, PlotStyle -> {Red, Blue, Green}]

The above command will plot all the three functions in one figure. I have used PlotStyle to distinguish the three graphs in the figure using a different color for each function.

Note: See careful use of capital and small case alphabets. Also, notice the kinds of brackets used.

 3 Solid 3D Plots For y varying from 0 to 2pi and x from -1 to 1, plot z = x*sin(y) using meshgrid function, and title (3D surface plot example) - plot z within

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site