#include #include #include #include #include "pssuby.h" //--------//--------//--------//--------//--------//--------//--------//-------- void main() { init(); viewport(0.2,0.2,0.8,0.8);xyworld(0.0,0.0,1.0,1.0); newpath();linety(2);plot(0.0,0.0,3);plot(0.0,1.0,2);plot(1.0,1.0,2);plot(1.0,0.0,2);closepath();stroke(); newpath();linety(1);wallr(0.3,0.15,0.7,0.15,40);stroke(); newpath();linety(1);spring(0.4,0.2,0.4,0.4,0.03,4);stroke(); newpath();linety(1);damper(0.6,0.2,0.6,0.4,0.05);stroke(); newpath();rect(0.35,0.45,0.65,0.5);stroke(); newpath();linety(1);plot(0.5,0.15,3);plot(0.5,0.2,2);stroke(); newpath();linety(1);plot(0.4,0.2,3);plot(0.6,0.2,2);stroke(); newpath();linety(1);plot(0.5,0.45,3);plot(0.5,0.4,2);stroke(); newpath();linety(1);plot(0.4,0.4,3);plot(0.6,0.4,2);stroke(); text(0.48,0.52,"m"); text(0.33,0.28,"k"); text(0.65,0.28,"c"); fin(); }