Zurück zum Inhaltsverzeichnis

Kapitel 20

3D-Plots

> restart:

> with(plots):

Warning, the name changecoords has been redefined

> plot3d( x^2-y^2, x=-1..1, y=-1..1);

[Maple Plot]

> plot3d( Im(sin(x+I*y)), x=0..2*Pi,y=-Pi/2..Pi/2, axes=boxed );

[Maple Plot]

> plot3d( sin(x*y), x=0..7, y=0..7, axes=framed, scaling=constrained);

[Maple Plot]

> plot3d( sin(x*y), x=0..7, y=0..7, axes=framed,
grid=[50,50], scaling=constrained, orientation=[-45,60]);

[Maple Plot]

> plot3d( sin(6*sqrt(x^2+y^2)), y=-2..2, x=-2..2,
grid=[40,40], scaling=constrained,
orientation=[7,45], projection=1);

[Maple Plot]

> plot3d( sin(6*sqrt(x^2+y^2)),
y=-2..2, x=-2..2, grid=[40,40],
scaling=constrained, orientation=[7,45], projection=0);

[Maple Plot]

> plot3d( Re(tan(x+I*y)),
x=0.05-Pi/2..0.05+Pi, y=-Pi/2..Pi/2,
orientation=[-126,55],scaling=unconstrained,
axes=boxed,grid=[40,40]);

[Maple Plot]

> plot3d( Re(tan(x+I*y)),
x=0.05-Pi/2..0.05+Pi, y=-Pi/2..Pi/2,
orientation=[-126,55], scaling=unconstrained,
axes=boxed, grid=[40,40], view=-5..4.5 );

[Maple Plot]

Parametrische 3D-Plots

> plot3d( [sin(s)*cos(t), cos(s)*cos(t), sin(t)],
s=0..Pi, t=0..2*Pi, scaling=constrained );

[Maple Plot]

> with(plots):
spacecurve( [ t/10, (1+t/10)*sin(t), (1+t/10)*cos(t) ], t=0..30*Pi,
numpoints=500, axes=framed, shading=none, orientation=[25,62] );

[Maple Plot]

> tubeplot( [2*sin(t), 2*cos(t), t/3], t=-1.5*Pi..2*Pi,
orientation=[45,68]);

[Maple Plot]

> tubeplot( [ -t^1.5/5, 3*cos(t), 3*sin(t) ],
t=0..8*Pi, radius=t/8, scaling=constrained,
orientation=[107,56], grid=[60,15] );

[Maple Plot]

Flächen durch Listen definieren

> restart: with(plots):

Warning, the name changecoords has been redefined

> listplot3d( [[0,0,0,0,0],
[0,0,1,2,2],
[0,1,2,1,0],
[0,2,3,2,0]],
axes=frame, style=hidden,
color=black, orientation=[45,11]);

[Maple Plot]

> setoptions3d(style=hidden,color=black):

> data := [ seq( [ seq( [ i,j,evalf(cos(sqrt(i^2+j^2)/2)) ],
i=-5..5) ], j=-5..5) ]:

> surfdata( data, axes=frame, labels=[x,y,z] );

[Maple Plot]

> #data;

Liste variabler Länge und Schrittweite, die sich auch schachteln lässt.

> varlf:=(term,var,a,b,n) -> seq(eval(term),var=seq(a+i*(b-a)/n,i=0..n));

varlf := proc (term, var, a, b, n) options operator...

>

> data:=varlf([varlf([r*sin(phi), r*cos(phi), 1.5*phi+3*sin(r)],r,Pi,2*Pi,14)],phi,0,4*Pi,41):

>

> surfdata(evalf([ data ]),orientation=[6,60]);

[Maple Plot]

>

3D Punkteplots

> restart: with(plots):

Warning, the name changecoords has been redefined

> plot3d( [sin(s)*cos(t), cos(s)*cos(t), t],
s=0..2*Pi, t=0..Pi, grid=[80,20],
shading=none, scaling=constrained, style=point);

[Maple Plot]

> data:= [seq( evalf( [t/100, sin(t/30), cos(t/30)] ),t=0..1000) ]:

> pointplot3d(data, shading=none, axes=boxed);

[Maple Plot]

>

Optionen

> restart:

> with(plots):
p:=plot3d( -5*cos(sqrt(x^2+y^2))*exp(-0.1 *sqrt(x^2+y^2)),
x=-2*Pi..7*Pi, y=-2*Pi..4*Pi,grid=[45,35], axes=framed,
scaling=constrained,orientation=[-157,62]):

Warning, the name changecoords has been redefined

> p;

[Maple Plot]

Darstellungsart

> ######### shading=none funktioniert nicht zusammen mit hidden und wireframe

> display(p, style=hidden,shading=Z);

[Maple Plot]

>

> display(p, color=black,style=wireframe);

[Maple Plot]

> display(p, style=patchnogrid);

[Maple Plot]

> display(p, style=patchcontour);

[Maple Plot]

> display(p, style=patchcontour, contours=[-2,-1,0,1,2]);

[Maple Plot]

Farben

> display(p, style=patchnogrid, shading=zhue);

[Maple Plot]

> p1:=plot3d( 1.5*cos(x^2+y^2), x=-2..2, y=-2..2, style=hidden, color=red):

> p2:=plot3d( 2*sin(sqrt(x^2+y^2)),x=-2..2, y=-2..2, style=hidden, color=blue):
display( [p1, p2] );

[Maple Plot]

> greyscale:=x->COLOR(RGB,x,x,x):
plot3d( Re(sin(x+I*y)),
x=0..2*Pi, y=-1..1, axes=framed, style=patch,
orientation=[-103,26], color=greyscale(Im(sin(x+I*y))) );

[Maple Plot]

> greyscale:=x->COLOR(RGB,x,x,x):
plot3d( abs(sin(x+I*y)), x=0..2*Pi, y=-1..1, axes=framed, style=patch,
orientation=[-103,26], color=greyscale( Pi+argument(sin(x+I*y)) ) );

[Maple Plot]

Beleuchtung

> p:=plot3d( [sin(s)*cos(t), cos(s)*cos(t), sin(t)],
s=0..Pi, t=0..2*Pi, style=patch, scaling=constrained,
color=white, orientation=[38,75]):

> with(plots): display(p);

[Maple Plot]

> display( p, light=[60,45,1,1,1]);

[Maple Plot]

> display( p, light=[60,45,1,1,1],ambientlight=[0.3,0.3,0.3]);

[Maple Plot]

> display( p, light=[60,45,1,0,0], light=[60,-45,0,1,0],light=[135,0,0,0,1]);

[Maple Plot]

Zurück zum Inhaltsverzeichnis