Advertisement
Guest User

triunghiuri

a guest
Oct 23rd, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Octave 0.42 KB | None | 0 0
  1. t = [0 1 1 0;0 1 -1 0];
  2. plot(t(1,:),t(2,:),"r");
  3. axis([-5 5 -5 5],"square");
  4. text(0,0,'A');
  5. text(1,1,'B');
  6. text(1,-1,'C');
  7. grid();
  8. hold on;
  9. t1 = [-1 0 0 -1; -2 -1 -3 -2];
  10. plot(t1(1,:),t1(2,:),"b");
  11. alfa = 2*pi/3;
  12. T = [cos(alfa) -sin(alfa); sin(alfa) cos(alfa)];
  13. R = T*t;
  14. plot(R(1,:),R(2,:),'g');
  15. t2 = (R+[-2;-3])*2;
  16. plot(t2(1,:),t2(2,:),"k");
  17. ogl = t2;
  18. ogl(2,:) = -ogl(2,:);
  19. plot(ogl(1,:),ogl(2,:),"m");
  20. hold off;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement