%www.ethemsulan.comclose allclear allclcsubplot(2,2,1)z = 0:pi/50:2*pi;x=sin(z);y=cos(z);cember=[x ;y ;z ]plot3(cember(1,:),cember(2,:),cember(3,:)*0,'color','red','linewidth',2);hold onplot3(cember(1,:),cember(2,:),cember(3,:)*0+20,'color','red','linewidth',2);hold onkenar=[-1 -1;0 0;0 20 ]plot3(kenar(1,:),kenar(2,:),kenar(3,:),'color','red','linewidth',2);hold onplot3(-kenar(1,:),kenar(2,:),kenar(3,:),'color','red','linewidth',2);hold on%plot3(kenar(2,:),kenar(1,:),kenar(3,:),'color','red','linewidth',2);%hold on%plot3(kenar(2,:),-kenar(1,:),kenar(3,:),'color','red','linewidth',2);%hold onkenarcap=[-1 1;0 0;0 20 ]plot3(kenarcap(1,:),kenarcap(2,:),kenarcap(3,:),'color','red','linewidth',2);hold onplot3(-kenarcap(1,:),kenarcap(2,:),kenarcap(3,:),'color','red','linewidth',2);hold onorta=[-1/sqrt(2) 0;-1/sqrt(2) 0;0 10];plot3(orta(1,:),orta(2,:),orta(3,:),'color','red','linewidth',2);hold onorta=[1/sqrt(2) 0;-1/sqrt(2) 0;0 10];plot3(orta(1,:),orta(2,:),orta(3,:),'color','red','linewidth',2);hold onorta=[0 0;-1 0;0 10];plot3(orta(1,:),orta(2,:),orta(3,:),'color','red','linewidth',2);hold oncap=[-1 1;0 0;0 0];plot3(cap(1,:),cap(2,:),cap(3,:),'color','red','linewidth',2);hold oncap=[-1/sqrt(2) 1/sqrt(2);-1/sqrt(2) 1/sqrt(2);0 0];plot3(cap(1,:),cap(2,:),cap(3,:),'color','red','linewidth',2);hold oncap=[1/sqrt(2) -1/sqrt(2);-1/sqrt(2) 1/sqrt(2);0 0];plot3(cap(1,:),cap(2,:),cap(3,:),'color','red','linewidth',2);hold ontitle('KUM SAATI')xlabel('X ekseni')ylabel('Y ekseni')zlabel('Z ekseni')grid onbox onhold onaxis squaresubplot(2,2,2)z = 0:pi/50:2*pi;x=sin(z);y=cos(z);cember=[x ;y ;z ]plot3(cember(3,:)*0,cember(1,:),cember(2,:),'color','red','linewidth',2);hold onplot3(cember(3,:)*0+20,cember(1,:),cember(2,:),'color','red','linewidth',2);hold onkenar=[-1 -1;0 0;0 20 ]plot3(kenar(3,:),kenar(1,:),kenar(2,:),'color','red','linewidth',2);hold onplot3(kenar(3,:),-kenar(1,:),kenar(2,:),'color','red','linewidth',2);hold onkenarcap=[-1 1;0 0;0 20 ]plot3(kenarcap(3,:),kenarcap(1,:),kenarcap(2,:),'color','red','linewidth',2);hold onplot3(kenarcap(3,:),-kenarcap(1,:),kenarcap(2,:),'color','red','linewidth',2);hold onorta=[-1/sqrt(2) 0;-1/sqrt(2) 0;0 10];plot3(orta(3,:),orta(1,:),orta(2,:),'color','red','linewidth',2);hold onorta=[1/sqrt(2) 0;-1/sqrt(2) 0;0 10];plot3(orta(3,:),orta(1,:),orta(2,:),'color','red','linewidth',2);hold onorta=[0 0;-1 0;0 10];plot3(orta(3,:),orta(1,:),orta(2,:),'color','red','linewidth',2);hold oncap=[-1 1;0 0;0 0];plot3(cap(3,:),cap(1,:),cap(2,:),'color','red','linewidth',2);hold oncap=[-1/sqrt(2) 1/sqrt(2);-1/sqrt(2) 1/sqrt(2);0 0];plot3(cap(3,:),cap(1,:),cap(2,:),'color','red','linewidth',2);hold oncap=[1/sqrt(2) -1/sqrt(2);-1/sqrt(2) 1/sqrt(2);0 0];plot3(cap(3,:),cap(1,:),cap(2,:),'color','red','linewidth',2);hold ontitle('KUM SAATI')xlabel('X ekseni')ylabel('Y ekseni')zlabel('Z ekseni')grid onbox onhold onaxis squaresubplot(2,2,3)z = 0:pi/50:2*pi;x=sin(z);y=cos(z);cember=[x ;y ;z ]plot3(cember(2,:),cember(3,:)*0,cember(1,:),'color','red','linewidth',2);hold onplot3(cember(2,:),cember(3,:)*0+20,cember(1,:),'color','red','linewidth',2);hold onkenar=[-1 -1;0 0;0 20 ]plot3(kenar(2,:),kenar(3,:),kenar(1,:),'color','red','linewidth',2);hold onplot3(kenar(2,:),kenar(3,:),-kenar(1,:),'color','red','linewidth',2);hold onkenarcap=[-1 1;0 0;0 20 ]plot3(kenarcap(2,:),kenarcap(3,:),kenarcap(1,:),'color','red','linewidth',2);hold onplot3(kenarcap(2,:),kenarcap(3,:),-kenarcap(1,:),'color','red','linewidth',2);hold onorta=[-1/sqrt(2) 0;-1/sqrt(2) 0;0 10];plot3(orta(2,:),orta(3,:),orta(1,:),'color','red','linewidth',2);hold onorta=[1/sqrt(2) 0;-1/sqrt(2) 0;0 10];plot3(orta(2,:),orta(3,:),orta(1,:),'color','red','linewidth',2);hold onorta=[0 0;-1 0;0 10];plot3(orta(2,:),orta(3,:),orta(1,:),'color','red','linewidth',2);hold oncap=[-1 1;0 0;0 0];plot3(cap(2,:),cap(3,:),cap(1,:),'color','red','linewidth',2);hold oncap=[-1/sqrt(2) 1/sqrt(2);-1/sqrt(2) 1/sqrt(2);0 0];plot3(cap(2,:),cap(3,:),cap(1,:),'color','red','linewidth',2);hold oncap=[1/sqrt(2) -1/sqrt(2);-1/sqrt(2) 1/sqrt(2);0 0];plot3(cap(2,:),cap(3,:),cap(1,:),'color','red','linewidth',2);hold ontitle('KUM SAATI')xlabel('X ekseni')ylabel('Y ekseni')zlabel('Z ekseni')grid onbox onhold onaxis square
22 Nisan 2010 Perşembe
Matlab ile Kum Saati Çizme Örneği
Kaydol:
Kayıt Yorumları (Atom)
Hiç yorum yok:
Yorum Gönder