Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Plot3d Calculator

Plot3d

Function: plot3d (<expr>, <x_range>, <y_range>, ..., <options>, ...)

plot3d(100*0.5^((AngularVelocity/TrackingSpeed*400/400)^2),[AngularVelocity,0,1],[TrackingSpeed,0,1], [grid, 25,25],[zlabel, "%"], [palette, [hue, .0, .8, .85, 1.0/3.0]], [mesh_lines_color, true], [colorbox, true], [legend, "Hit

Function: plot3d ([<expr_1>, ..., <expr_n>], <x_range>, <y_range>, ..., <options>, ...) Displays a plot of one or more surfaces defined as functions of two variables or in parametric form.

The functions to be plotted may be specified as expressions or function names. The mouse can be used to rotate the plot looking at the surface from different sides.

*Examples:*

     Plot of a common function:
          (%i1) plot3d (2^(-u^2 + v^2), [u, -3, 3], [v, -2, 2])$

Use of the z option to limit a function that goes to infinity (in this case the function is minus infinity on the x and y axes); this also shows how to plot with only lines and no shading:

          (%i1) plot3d ( log ( x^2*y^2 ), [x, -2, 2], [y, -2, 2], [z, -8, 4],
                   [palette, false], [color, magenta, blue])$

The infinite values of z can also be avoided by choosing a grid that does not fall on any asymptotes; this example also shows how to select one of the predefined palettes, in this case the fourth one:

          (%i1) plot3d(log(x^2*y^2), [x, -2, 2], [y, -2, 2], [grid, 29, 29],
                [palette, get_plot_option(palette,5)])$

Two surfaces in the same plot, sharing the same domain; in gnuplot the two surfaces will use the same palette:

          (%i1) plot3d ( [2^(-x^2 + y^2), 4*sin(3*(x^2+y^2))/(x^2+y^2),
                   [x, -3, 3], [y, -2, 2]])$

The same two surfaces, but now with different domains; in xmaxima each surface will use a different palette, chosen from the list defined by the option palette:

          (%i1) plot3d ( [[2^(-x^2 + y^2),[x,-2,2],[y,-2,2]],
                   4*sin(3*(x^2+y^2))/(x^2+y^2), [x, -3, 3], [y, -2, 2]],
                   [plot_format,xmaxima])$

     Plot of a Klein bottle, defined parametrically:
          (%i1) e_1: 5*cos(x)*(cos(x/2)*cos(y)+sin(x/2)*sin(2*y)+3.0)-10.0$
          (%i2) e_2: -5*sin(x)*(cos(x/2)*cos(y)+sin(x/2)*sin(2*y)+3.0)$
          (%i3) e_3: 5*(-sin(x/2)*cos(y)+cos(x/2)*sin(2*y))$
          (%i4) plot3d ([e_1, e_2, e_3], [x, -%pi, %pi],
                  [y, -%pi, %pi], [grid, 40, 40])$

Plot of a spherical harmonic, using of the predefined transformations, spherical_to_xyz, to transform from spherical to rectangular coordinates. See the documentation for spherical_to_xyz.

          (%i1) plot3d (sin(2*theta)*cos(phi), [theta,0,%pi], [phi,0,2*%pi],
                  [transform_xy, spherical_to_xyz], [grid,30,60])$

Use of the predefined function polar_to_xy to transform from cylindrical to rectangular coordinates. See the documentation for polar_to_xy. This example also shows how to eliminate the bounding box and the legend.

          (%i1) plot3d(r^.33*cos(th/3), [r,0,1], [th,0,6*%pi], [grid,12,80],
                 [transform_xy, polar_to_xy], [box, false], [legend,false])$

Plot of a sphere using the transformation from spherical to rectangular coordinates. In xmaxima the three axes are scaled in the same proportion, maintaining the symmetric shape of the sphere. A palette with different shades of a single color is used:

          (%i1) plot3d (5, [theta, 0, %pi], [phi, 0, 2*%pi],
           [transform_xy, spherical_to_xyz], [plot_format,xmaxima],
           [palette,[value,0.65,0.7,0.1,0.9]])$

Definition of a function of two-variables using a matrix. Notice the single quote in the definition of the function, to prevent plot3d from failing when it realizes that the matrix will require integer indices.

          (%i1) M: matrix([1,2,3,4], [1,2,3,2], [1,2,3,4], [1,2,3,3])$
          (%i2) f(x, y) := float(M [round(x), round(y)])$
          (%i3) plot3d (f(x,y), [x, 1, 4], [y, 1, 4], [grid, 4, 4])$
          apply: subscript must be an integer; found: round(x)

By setting the elevation equal to zero, a surface can be seen as a map in which each color represents a different level. The option colorbox is used to show the correspondence among colors and levels, and the mesh lines are disabled to make the colors easier to see.

          (%i1) plot3d (cos (-x^2 + y^3/4), [x, -4, 4], [y, -4, 4],
                  [mesh_lines_color, false], [elevation, 0], [azimuth, 0],
                  [colorbox, true], [grid, 150, 150])$

See also the section about Plotting Options.

(%o1)                                true
(%i2) 

Plot3d Example

Related Examples

plot3d
plot3d(x^2+y^2,[x,-1.0,1.0],[y,-3.0,3.0]);

plot3d(x^2+y^2,[x,-1....

Calculate

plot3d
plot3d([X(u, v), Z(u,v),Y(u,v) ], [u, 0, 1],[v, -L, L]);

L:10;

k:1;

a:1;

Calculate

plot3d
plot3d(y+x,[x,0,13],[y,0,13],[z,0,16]);

plot3d(y+x,[x,0,13],[...

Calculate

plot3d
plot3d(f(x,y), [x,-5,5], [y,-5,5]);

f(x,y):= 8*x^2-0*x*y+...

plot3d(f(x,y), [x,-5,...

Calculate

plot3d
plot3d([ [0.9999476*y+(x^2-y^2)/(10^9),[x,-10000,10000],[y,-10000,10000]] ]);

plot3d([ [0.9999476*y...

Calculate

plot3d
plot3d(x^3*y^-3, [x,-5,5], [y, -5, 5]);

plot3d(x^3*y^-3, [x,-...

Calculate

plot3d
plot3d(f(x,y), [x,-5,5], [y,-5,5]);

f(x,y):= 8*x^2-0*x*y+...

plot3d(f(x,y), [x,-5,...

Calculate

plot3d
plot3d([ [x+y,[x,0,3],[y,0,3]] ]);

plot3d([ [x+y,[x,0,3]...

Calculate

plot3d
plot3d([x^0.6,y^0.4,[x,0,100],[y,0,100]]);

plot3d([x^0.6,y^0.4,[...

Calculate

plot3d
plot3d(100*0.5^((AngularVelocity/TrackingSpeed*400/400)^2),[AngularVelocity,0,1],[TrackingSpeed,0,1], [grid, 100/4, 100/4]);

plot3d(100*0.5^((Angu...

Calculate