%  ______ Create :  3D - Pyramide     _________________
%  ________with :  " cylinder " __________________________

clear all; close all; clf;

Radius = [2];
Seiten = 4;
Hoehe = 5;

[x,y,z] = cylinder(Radius,Seiten);

x(2,:) = 0;
y(2,:) = 0;
z(2,:) = Hoehe;

% >> Mega - question :   Wie ausrichten der Kanten an X - &  Y- Achse  ???

Ha = mesh(x,y,z);
set(Ha, 'Linewidth', 5)
xlabel('\bf XXX')
ylabel('\bf YYY')
% axis equal off;
camlight
lighting gouraud
pause(1)
hold on
% :::::::::::  2.  Pyramide ::::::::::::::::
Hb = surf(x+2,  y+2, (z+4)*2);
set(Hb, 'Facecolor', 'r')
pause(1)
% :::::::::::  3.  Pyramide ::::::::::::::::
Hc = surf(x+2 , y+2, (z-2)*3);
set(Hc, 'Facecolor', 'g')
pause(1)
%  rotate(Hc,  [0,0,1],90);               % Rotationsbefehl. 
view(-30,20)
rotate3d