Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clf();
- ///Spirala Archimedesa 2D (lewy górny róg)
- //Koordynaty
- r=linspace(0,6,100)
- x=r.*sin(r*%pi)
- y=r.*cos(r*%pi)
- //Parametry
- xgrid()
- xset("font",4,2)
- xtitle('Spirala Archimedesa 2D')
- //Lewy górny róg, rysowanie funkcji, zmiana koloru
- subplot(2,2,1);
- plot(x,y,'g')
- //Dwie funkcje 2D (prawy górny róg)
- //Koordynaty
- x1=linspace(-10,10,100)
- fx=x1.*sin(x1)
- gx=sin(x1)
- //Prawy górny róg - wyświetlanie; parametry
- subplot(2,2,2);
- xgrid()
- xset("font",4,2)
- xtitle('Dwie funkcje sinusoidalne')
- plot(x1,fx,'b',x1,gx,'r')
- //Helisa i spirala Archimedesa 3D
- //Koordynaty helisy
- t=linspace(0,2*%pi,200)
- x2=cos(6*t)
- y2=sin(6*t)
- zi=t
- //Koordynaty spirali
- x3=0.2.*t.*cos(6*t)
- y3=0.3.*t.*sin(6*t)
- //Lewy dolny róg - helisa; parametry
- subplot(2,2,3)
- xgrid()
- xset("font",4,1)
- xtitle('Helisa')
- param3d1(x2,y2,zi)
- //Prawy dolny róg - spirala; parametry
- subplot(2,2,4)
- xgrid()
- xset("font",4,2)
- xtitle('Spirala Archimedesa 3D')
- param3d1(x3,y3,zi)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement