Contents

Graphik 3D

clear
close all

- meshc mit Hoehenlinien (contour) Wiederholung

figure
x = linspace(-3,3,30);
[X,Y] = meshgrid(x,x);
Z = peaks(X,Y);
meshc(X,Y,Z);
axis([-3 3 -3 3 -10 5])

- surf als Flaeche Wiederholung

figure
surf(X,Y,Z);
figure
surf(X,Y,Z);
shading interp

- cylinder

figure
cylinder
axis square

Rotationsflaeche

t = -1:1/10:1;
figure
plot(t,cosh(t))
%
[X,Y,Z] = cylinder(cosh(t)); % Achtung Z liegt zwischen 0 und 1!
surf(X,Y,3*Z);
figure
sphere
whitebg([0 .3 .7])
h = findobj(gcf,'Type','surface');
set(h,'CData',rand(size(get(h,'CData'))))
hold on
plot3(4*rand(1,200)-2,4*rand(1,200)-2,4*rand(1,200)-2,'w*')
axis off
axis vis3d
pause(2)
shg

for k = 1:360
  camorbit(1,0)
  drawnow
end