1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
<html>
<head>
<title>Maxima Plots</title>
</head>
<br>
<body BGCOLOR=#ffffff TEXT=#000000 LINK=#244C21>
<img src=net.sourceforge.maxima.png align=left border=0>
<h2>Maxima Plots</h2>
<p>Double click on the examples in blue to see the result.</p>
<h4>plot2d</h4>
<ul>
<li>Plot of a function of one variable:<br>
<eval program=maxima>
plot2d (sin(x), [x, -%pi, %pi])$
</eval>
</li>
<li>Plot of two implicit functions:<br>
<eval program=maxima>
plot2d([x^2+y^2=1, -abs(x)], [x, -1.5, 1.5], [y, -2, 2],
same_xy, nolegend);
</eval>
</li>
<li>Plot of a function and data points:<br>
<eval program=maxima>
plot2d([[discrete,[[10,.6],[20,.9],[30,1.1],[40,1.3],[50,1.4]]],
2*%pi*sqrt(l/980)], [l,0,50], [style,points,lines],
[point_type, asterisk], [legend, "experiment", "theory"],
[xlabel,"length"], [ylabel,"period"])$
</eval>
</li>
</ul>
<br>
<h4>plot3d</h4>
<p>When using the "gnuplot_pipes" or "xmaxima" plot formats, you can rotate the
object by dragging with the left mouse button depressed.</p>
<ul>
<li>To plot the function of two variables: 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, do the following:<br>
<eval program=maxima>
plot3d(2^(-u^2+v^2),[u,-2,2],[v,-2,2]);
</eval>
</li>
<li> A <b>Moebius band</b> can be plotted given 3 expressions (for the
coordinates in the three axes) depending on two parameters, x and y in
this example<br>
<eval program=maxima>
plot3d([cos(a)*(3+b*cos(a/2)), sin(a)*(3+b*cos(a/2)), b*sin(a/2)],
[a,-%pi,%pi], [b,-1,1], [grid,40,15]);
</eval>
<br>
The additional optional option [grid,50,15]
gives the grid number of rectangles in the a direction and b direction.
</li>
<li>A <b>Riemann surface</b>: Real part of z^1/3<br>
<eval program=maxima>
plot3d(r^.33*cos(th/3),[r,0,1],[th,0,6*%pi], [grid,12,80],
[transform_xy,polar_to_xy]);
</eval>
</li>
<li>A <b>Klein bottle</b>:<br>
<eval program=maxima>
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]);
</eval>
</li>
<li>A <b>torus</b><br>
<eval program=maxima>
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]);
</eval>
</li>
</ul>
<br>
</body>
</html>
|