Google


Maxima 3d Plotting


 - Function: PLOT3D (EXPR,XRANGE,YRANGE,...,OPTIONS,..)
 - Function: PLOT3D ([EXPR1,EXPR2,EXPR3],XRANGE,YRANGE,...,OPTIONS,..)
When viewed with the netmath plotting routines, you can rotate the object by dragging with the right mouse button depressed.
  • plot3d(2^(-u^2+v^2),[u,-2,2],[v,-2,2]); would plot z = 2^(-u^2+v^2) with u and v varying in [-2,2] and [-2,2] respectively, and with u on the x axis, and v on the y axis.
  • a moebius band uses the second pattern of arguments plot3d([cos(x)*(3+y*cos(x/2)), sin(x)*(3+y*cos(x/2)), y*sin(x/2)], [x,-%pi,%pi],[y,-1,1],['grid,40,15]);
    parametrized by the 3 expressions given as the first argument to plot3d. An additional optional argument [grid,50,15] gives the grid number of rectangles in the x direction and y direction.
  • A riemann surface: Real part of z^1/3 Plot3d(r^.33*cos(th/3),[r,0,1],[th,0,6*%pi], ['grid,12,80], ['transform_xy,polar_to_xy],['view_direction,1,1,1.4], ['colour_z,true]); Here the View_direction indicates the direction from which we take a projection. We actually do this from infinitely far away, but parallel to the line from view_direction to the origin. This is currently only used in 'ps' plot_format, since the other viewers allow interactive rotating of the object.
  • a klein bottle: plot3d([5*cos(x)*(cos(x/2)*cos(y)+sin(x/2)*sin(2*y)+3.0) - 10.0, -5*sin(x)*(cos(x/2)*cos(y)+sin(x/2)*sin(2*y)+3.0), 5*(-sin(x/2)*cos(y)+cos(x/2)*sin(2*y))], [x,-%pi,%pi],[y,-%pi,%pi],['grid,40,40]);
  • a torus plot3d([cos(y)*(10.0+6*cos(x)), sin(y)*(10.0+6*cos(x)), -6*sin(x)], [x,0,2*%pi],[y,0,2*%pi], ['grid,20,20]);