Contents Changes to MuPAD 1.2.2 Advanced Calculus Polynomials Linear Algebra Graphics Gröbner Bases Further Nice Examples
>> my_curve_x := proc(u) begin sin(u)*sin(2*u)*sin(3*u): end_proc: my_curve_y := proc(u) begin sin(4*u)*sin(5*u)*sin(6*u): end_proc: plot2d( Axes = Box, Ticks = 0, Scaling = UnConstrained, PointStyle = Circles, PointWidth = 6, [Mode = Curve, [hold(my_curve_x(u)), hold(my_curve_y(u))], u = [-PI, PI], Grid = [200], Style = [LinesPoints], Color = [Height, [1, 1, 0], [1, 0, 1]] ] ):
cos(u)
in the interval [0, 2*PI]
.
>> plot2d( Labels = ["", ""], Labeling = TRUE, Title = "Different Curve Styles", Axes = Origin, AxesOrigin = [0, 0], [Mode = Curve, [u, 2*cos(u)], u = [0, PI/2], Grid = [15], Style = [Points], Color = [Height, [1, 1, 0], [1, 0, 0]], Title = "Points", TitlePosition = [2, 2.5] ], [Mode = Curve, [u, 2*cos(u)], u = [PI/2, PI], Grid = [15], Style = [Lines], Color = [Height, [0, 1, 0], [1, 1, 0]], Title = "Lines", TitlePosition = [3.5, 5.5] ], [Mode = Curve, [u, 2*cos(u)], u = [PI, 3*PI/2], Grid = [15], Style = [LinesPoints], Color = [Height, [0, 1, 1], [0, 0, 1]], Title = "LinesPoints", TitlePosition = [6, 7.5] ], [Mode = Curve, [u, 2*cos(u)], u = [3*PI/2, 2*PI], Grid = [15], Style = [Impulses], Color = [Height, [0, 0, 1], [1, 0, 1]], Title = "Impulses", TitlePosition = [8, 4] ] );
>> plot3d( Axes = None, Ticks = 0, Scaling = UnConstrained, CameraPoint = [114, 0, 155], BackGround = [1, 1, 1], ForeGround = [0, 0, 1], [Mode = Surface, [4*v*cos(u)-v*cos(4*u), 4*v*sin(u)+v*sin(4*u),-6*cos(v)], u = [0, 2*PI], v = [0.1, 6], Grid = [41, 20], Style = [ColorPatches, AndMesh], Color = [Height, [0.4, 0.4, 0.4], [0, 1, 1]] ] );
The third and fourth parameters and of the procedure
benjamin_ono_2()
describe the asymptotic velocities
of the interacting solitons.
>> benjamin_ono_2 := proc(x, t, c1, c2) local e1, e2, f, fx; begin e1 := c1*(x - c1*t): e2 := c2*(x - c2*t): f := 1-e1*e2+4*c1*c2/(c1-c2)^2+I*(e1+e2): fx := -c1*c2*(2*x-c2*t-c1*t)+I*(c1+c2): 30*abs(fx/f): end_proc: plot3d( Axes = None, Ticks = 0, Scaling = UnConstrained, Title = "Twosoliton of the B.O.", [Mode = Surface, [u, v, hold(benjamin_ono_2(u, v, 1/4, 3/5))], u = [-40, 40], v = [-30, 30], Grid = [50, 50], Smoothness = [1, 0], Style = [ColorPatches, AndMesh], Color = [Height, [0, 0, 1], [1, 1, 1]] ] ):
point
and polygon
- which can be used to compose graphical objects.
>> tetra_hedron := proc(p1, p2, p3, p4) begin polygon(p1, p2, p4, Closed=TRUE, Filled=TRUE), polygon(p1, p3, p4, Closed=TRUE, Filled=TRUE), polygon(p2, p3, p4, Closed=TRUE, Filled=TRUE) end_proc: mid_point := proc(p1, p2) local x, y, z; begin x := op(p1,1) + (op(p2,1)-op(p1,1))/2.0: y := op(p1,2) + (op(p2,2)-op(p1,2))/2.0: z := op(p1,3) + (op(p2,3)-op(p1,3))/2.0: point(x, y, z): end_proc: tetra_rec := proc(p1, p2, p3, p4, n) local np1, np2, np3, np4, np5, np6; begin if n = 0 then tetra_hedron(p1, p2, p3, p4): else np1 := mid_point(p1, p2): np2 := mid_point(p2, p3): np3 := mid_point(p3, p1): np4 := mid_point(p1, p4): np5 := mid_point(p2, p4): np6 := mid_point(p3, p4): tetra_rec(p1, np1, np3, np4, n-1), tetra_rec(np1, p2, np2, np5, n-1), tetra_rec(np2, p3, np3, np6, n-1), tetra_rec(np4, np5, np6, p4, n-1): end_if: end_proc: a := point( 1.0, 0.0, 0.0): b := point(-0.7, 0.5*sqrt(3.0), 0.0): c := point(-0.7, -0.5*sqrt(3.0), 0.0): d := point( 0.1, 0.0, sqrt(3.0)): plot3d( Axes = None, CameraPoint = [0.15, -0.1, 10.0], [Mode = List, [tetra_rec(a, b, c, d, 3)], Color = [Height] ] );
phi
, since every complex
number z
can be written as
z = abs(z) exp(I*phi)
.
>> complex_surf := proc(re, im) begin 1/((re+I*im)^3+1): end_proc: phase := proc(x_coord, y_coord, z_coord, u_val, v_val) local erg, real, imag, phi; begin erg := complex_surf(x_coord, y_coord): real := op(erg, 1): imag := op(erg, 2): if abs(real) > EPS then phi := atan(imag/abs(real)): else phi := sign(imag)*PI/2: end_if: if float(phi) < 0 then value := (phi - MIN_PHI)/(0 - MIN_PHI): [1-value, value, 0]: else value := (phi)/MAX_PHI: [0, 1-value, value]: end_if: end_proc: MIN_PHI := float(-PI/2): MAX_PHI := float(PI/2): EPS := 10^(-DIGITS): plot3d( Axes = None, Scaling = UnConstrained, [Mode = Surface, [u, v, min(abs(complex_surf(u, v)), 2.0)], u = [-2, 2], v = [-2,2], Style = [ColorPatches, AndMesh], Grid = [50, 50], Color = [Function, phase] ] ):
video/quicktime; \ xanim %s; \ test=test "$DISPLAY"
Try to reload the configuration file of your web browser. If this is not possible, you have to restart it.
After that, click here to start the first animation (800Kb). If your WWW client cannot handle gizp-compressed files then click here to get the uncompressed version (2.5Mb).