% as auteur W. Dekkers
clear
colordef black
las = 100;das = 4; %lengte en diameter as
xcol=20;lcol = 10; dcol = 14;vlag = 1.4;%begin punt + lengte en diameter collector
lrot = 40; drot = 20; xrot=xcol+lcol+vlag;%lengte en diameter rotor + beginpunt
[x1,y1,z1]=cylinder(das/2,30);% coordinaten van as
h1=surf(z1*las,y1,x1);hold on
[x6,y6,z6]=sphere; % vlak as
h6 = surf(x6*0*das/2,y6*das/2,z6*das/2); % vlak as links
h66 = surf(x6*0*das/2+las,y6*das/2,z6*das/2);% vlak as rechts
[x4,y4,z4]=sphere; % vlak rotor
h4 = surf(x4*0*drot/2+xrot,y4*drot/2,z4*drot/2); % vlak rotor links
h5 = surf(x4*0*drot/2+xrot+lrot,y4*drot/2,z4*drot/2);% vlak rotor rechts
[x7,y7,z7]=sphere; % vlak collector
h7 = surf(x7*0*dcol/2+xcol,y7*dcol/2,z7*dcol/2); % vlak collector links
h77 = surf(x7*0*dcol/2+xcol+lcol,y7*dcol/2,z7*dcol/2);% vlak collector rechts
h333 = surf(x7*0*dcol/2+xcol+lcol,y7*1.2*dcol/2,z7*1.2*dcol/2); % vlak collector links
shading flat
[x2,y2,z2]=cylinder(drot/2,30);% coordinaten van rotor
h2=surf(z2*lrot+xrot,y2,x2);
[x3,y3,z3]=cylinder(dcol/2,60);% coordinaten van collector
h3=surf(z3*lcol+xcol,y3,x3);
h33=surf(z3*vlag+xcol+lcol,y3*1.2,x3*1.2);
camproj('perspective')
set(h1,'FaceColor',[0.4 0.4 0.4],'FaceLighting','phong','BackFaceLighting','reverselit')
set(h2,'FaceColor',[1 0.3 0.2],'FaceLighting','phong','BackFaceLighting','reverselit')
set(h3,'FaceColor',[1 0.6 0.5],'FaceLighting','phong','BackFaceLighting','reverselit')
set(h33,'FaceColor',[1 0.6 0.5],'FaceLighting','phong','BackFaceLighting','reverselit')
set(h333,'FaceColor',[1 0.6 0.5],'FaceLighting','phong','BackFaceLighting','reverselit')
set(h4,'FaceColor',[1 0.3 0.2],'FaceLighting','phong','BackFaceLighting','reverselit')
set(h5,'FaceColor',[1 0.3 0.2],'FaceLighting','phong','BackFaceLighting','reverselit')
set(h6,'FaceColor',[0.4 0.4 0.4],'FaceLighting','phong','BackFaceLighting','reverselit')
set(h66,'FaceColor',[0.4 0.4 0.4],'FaceLighting','phong','BackFaceLighting','reverselit')
set(h7,'FaceColor',[1 0.6 0.5],'FaceLighting','phong','BackFaceLighting','reverselit')
set(h77,'FaceColor',[1 0.6 0.5],'FaceLighting','phong','BackFaceLighting','reverselit')
light('Position',[-2 -2 -1])% plaats lichtbron
lightangle(20,20);
axis vis3d off %haalt assen weg
axis image