2 Gnu Octave | ||
→ | 2.13 Plotten | |
→ | 2.13.2 3D-Plots |
Mit
hidden("on"); hidden("off");
wird die Entfernung verdeckter Elemente ein- bzw. ausgeschaltet.
Mit
view(azimuth, elevation); view([azimuth elevation]); view([x y z]);
und weiteren Varianten des view()-Befehles kann die
Blickrichtung geändert werden.
Der Winkel azimuth entspricht der geografischen Länge. Er
verschiebt den Betrachterstandpunkt innerhalb der
x/y-Ebene. Der Wert 0 bedeutet, dass der Blick von
der negativen y-Achse aus erfolgt. Negative Werte
verschieben den Betrachterstandort nach links, positive nach
rechts.
Der Winkel elevation entspricht der geografischen Breite.
Positive Werte verschieben den Betrachterstandort nach oben,
negative nach unten.
Der Betrachterstandort kann auch durch die Koordinaten x, y und z angegeben werden, die Blickrichtung geht von diesem Standort aus in Richtung Koordinatenursprung.
graphics_toolkit("gnuplot");
x = linspace(-pi/2, pi/2, 51)';
y = x;
[XX, YY] = meshgrid(x, y);
z = -1 * (sin(XX) .* sin(YY));
surf(x, y, z);
graphics_toolkit("gnuplot");
x = linspace(-pi/2, pi/2, 51)';
y = x;
[XX, YY] = meshgrid(x, y);
z = -1 * (sin(XX) .* sin(YY));
surfl(x, y, z);
graphics_toolkit("gnuplot");
x = linspace(-pi/2, pi/2, 51)';
y = x;
[XX, YY] = meshgrid(x, y);
z = -1 * (sin(XX) .* sin(YY));
surfc(x, y, z);
graphics_toolkit("gnuplot");
x = linspace(-pi/2, pi/2, 51)';
y = x;
[XX, YY] = meshgrid(x, y);
z = -1 * (sin(XX) .* sin(YY));
meshc(x, y, z);
graphics_toolkit("gnuplot");
x = linspace(-pi/2, pi/2, 51)';
y = x;
[XX, YY] = meshgrid(x, y);
z = -1 * (sin(XX) .* sin(YY));
meshz(x, y, z);
graphics_toolkit("gnuplot");
z = linspace(0,1,51);
phi = (2 * pi) .* z;
x = cos(phi);
y = sin(phi);
stem3(x, y, z);
graphics_toolkit("gnuplot");
x = linspace(-pi/2, pi/2, 51)';
y = x;
[XX, YY] = meshgrid(x, y);
z = -1 * (sin(XX) .* sin(YY));
contour(x, y, z);
graphics_toolkit("gnuplot");
x = linspace(-pi/2, pi/2, 51)';
y = x;
[XX, YY] = meshgrid(x, y);
z = -1 * (sin(XX) .* sin(YY));
contourf(x, y, z);
graphics_toolkit("gnuplot");
x = linspace(-pi/2, pi/2, 65)';
y = x;
[XX, YY] = meshgrid(x, y);
z = -1 * (sin(XX) .* sin(YY));
pcolor(x, y, z);
graphics_toolkit("gnuplot");
x = linspace(-pi/2, pi/2, 51)';
y = x;
[XX, YY] = meshgrid(x, y);
z = -1 * (sin(XX) .* sin(YY));
contour3(x, y, z);
graphics_toolkit("gnuplot");
fx = @(t) t;
fy = @(t) cos(6*pi*t);
fz = @(t) sin(6*pi*t);
ezplot3(fx, fy, fz, [0 1], 100);
graphics_toolkit("gnuplot");
fx = @(s,t) cos (s) .* cos(t);
fy = @(s,t) sin (s) .* cos(t);
fz = @(s,t) sin(t);
ezmesh (fx, fy, fz, [-pi, pi, -pi/2, pi/2], 60);
graphics_toolkit("gnuplot");
fx = @(s,t) cos (s) .* cos(t);
fy = @(s,t) sin (s) .* cos(t);
fz = @(s,t) sin(t);
ezmesh (fx, fy, fz, [-pi, pi, -pi/2, pi/2], 60);
graphics_toolkit("gnuplot");
fx = @(s,t) cos (s) .* cos(t);
fy = @(s,t) sin (s) .* cos(t);
fz = @(s,t) sin(t);
ezsurf(fx, fy, fz, [-pi, pi, -pi/2, pi/2], 60);
graphics_toolkit("gnuplot");
fx = @(s,t) cos (s) .* cos(t);
fy = @(s,t) sin (s) .* cos(t);
fz = @(s,t) sin(t);
ezsurfc(fx, fy, fz, [-pi, pi, -pi/2, pi/2], 60);