Advertisement
Guest User

Untitled

a guest
Mar 30th, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. clf();
  2. ///Spirala Archimedesa 2D (lewy górny róg)
  3. //Koordynaty
  4. r=linspace(0,6,100)
  5. x=r.*sin(r*%pi)
  6. y=r.*cos(r*%pi)
  7. //Parametry
  8. xgrid()
  9. xset("font",4,2)
  10. xtitle('Spirala Archimedesa 2D')
  11. //Lewy górny róg, rysowanie funkcji, zmiana koloru
  12. subplot(2,2,1);
  13. plot(x,y,'g')
  14.  
  15. //Dwie funkcje 2D (prawy górny róg)
  16. //Koordynaty
  17. x1=linspace(-10,10,100)
  18. fx=x1.*sin(x1)
  19. gx=sin(x1)
  20. //Prawy górny róg - wyświetlanie; parametry
  21. subplot(2,2,2);
  22. xgrid()
  23. xset("font",4,2)
  24. xtitle('Dwie funkcje sinusoidalne')
  25. plot(x1,fx,'b',x1,gx,'r')
  26.  
  27. //Helisa i spirala Archimedesa 3D
  28. //Koordynaty helisy
  29. t=linspace(0,2*%pi,200)
  30. x2=cos(6*t)
  31. y2=sin(6*t)
  32. zi=t
  33. //Koordynaty spirali
  34. x3=0.2.*t.*cos(6*t)
  35. y3=0.3.*t.*sin(6*t)
  36. //Lewy dolny róg - helisa; parametry
  37. subplot(2,2,3)
  38. xgrid()
  39. xset("font",4,1)
  40. xtitle('Helisa')
  41. param3d1(x2,y2,zi)
  42. //Prawy dolny róg - spirala; parametry
  43. subplot(2,2,4)
  44. xgrid()
  45. xset("font",4,2)
  46. xtitle('Spirala Archimedesa 3D')
  47. param3d1(x3,y3,zi)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement