quickplot := proc (x) local opts, co, f, n; options `Maple Advisor Database 1.01 for Maple 6`, `Copyright (c) 2000 by Robert B. Israel. All rights reserved`; opts := [args[ 2 .. -1]]; if hasoption(opts,coords,co,'opts') then PLOT(CURVES( `quickplot/coords`(x,co)),`plot/options2d`(op(opts))) else PLOT(CURVES(x), `plot/options2d`(op(opts))) end if end proc; quickplot3d := proc (x) local opts, co, f, n; options `Maple Advisor Database 1.01 for Maple 6`, `Copyright (c) 2000 by Robert B. Israel. All rights reserved`; opts := [args[ 2 .. -1]]; if hasoption(opts,coords,co,'opts') then PLOT3D(CURVES( `quickplot3d/coords`(x,co)),`plot3d/options3d`(op(opts))) else PLOT3D(CURVES(x ),`plot3d/options3d`(op(opts))) end if end proc; `quickplot/coords` := proc (x, co) options `Maple Advisor Database 1.01 for Maple 6`, `Copyright (c) 2000 by Robert B. Israel. All rights reserved`;local revit, f1, f2, s, q, y, hx, n, cname; cname := co; if type(cname,specfunc(anything,'reverse')) then revit := true; cname := op(cname) else revit := false end if; if type(cname,function) then s := zip(`=`,[_a, _b, _c],[op(cname)]); cname := op(0,cname) end if; q := `plot3d/coordSystems`[cname]; if not type(q,list) or nops(q) <> 2 then error cname, ` is not a known two-dimensional coordinate system` end if; if s <> ('s ') then q := subs(s,q) end if; if has(q,{_a, _b, _c}) then q := subs(_a = 1,_b = 1/2,_c = 1/3,q) end if; q := evalf(q); if revit then f1 := unapply(q[1],_y, _x); f2 := unapply(q[2],_y,_x) else f1 := unapply(q[1],_x,_y); f2 := unapply(q [2],_x,_y) end if; if type(x,rtable) then n := rtable_dims(x); y := hfarray(n) ; n := op(2,n[1]); evalhf(`quickplot/transform`(f1,f2,x,y,n)) else n := nops(x ); hx := hfarray(x); y := hfarray(1 .. n,1 .. 2); evalhf(`quickplot/transform` (f1,f2,hx,y,n)) end if; y end proc; `quickplot3d/coords` := proc (x, co) options `Maple Advisor Database 1.01 for Maple 6`, `Copyright (c) 2000 by Robert B. Israel. All rights reserved`;local revit, f1, f2, f3, s, q, y, hx, n, cname; cname := co; if type(cname,function) then s := zip(`=`,[_a, _b, _c],[op (cname)]); cname := op(0,cname) end if; q := `plot3d/coordSystems`[cname]; if not type(q,list) or nops(q) <> 3 then error cname, ` is not a known three-dimensional coordinate system` end if; if s <> ('s') then q := subs(s,q) end if; if has(q,{_a, _b, _c}) then q := subs(_a = 1,_b = 1/2,_c = 1/3,q) end if; q := evalf(q); f1 := unapply(q[1],_x,_y,_z); f2 := unapply(q[2],_x,_y,_z); f3 := unapply(q[3],_x,_y,_z); if type(x,rtable) then n := rtable_dims(x); y := hfarray(n); n := op(2,n[1]); evalhf( `quickplot3d/transform`(f1,f2,f3,x,y,n)) else n := nops(x); hx := hfarray(x); y := hfarray(1 .. n,1 .. 3); evalhf(`quickplot3d/transform`(f1,f2,f3,hx,y,n)) end if; y end proc; `quickplot/transform` := proc (f1, f2, x, y, n) options `Maple Advisor Database 1.01 for Maple 6`, `Copyright (c) 2000 by Robert B. Israel. All rights reserved`; local i; for i to n do y[i,1] := f1(x[i,1],x[i,2]); y[i,2] := f2(x[i,1],x[i,2]) end do; y end proc; `quickplot3d/transform` := proc (f1, f2, f3, x, y, n) options `Maple Advisor Database 1.01 for Maple 6`, `Copyright (c) 2000 by Robert B. Israel. All rights reserved`; local i; for i to n do y [i,1] := f1(x[i,1],x[i,2],x[i,3]); y[i,2] := f2(x[i,1],x[i,2],x[i,3]); y[i,3] := f3(x[i,1],x[i,2],x[i,3]) end do; y end proc;