program square_rot real x(5),y(5),xrot(5),yrot(5) x(1)=-1 y(1)=1 x(2)=1 y(2)=1 x(3)=1 y(3)=-1 x(4)=-1 y(4)=-1 x(5)=x(1) y(5)=y(1) i_dummy=pgopen('/xwin') call pgenv(-5.0,5.0,-5.0,5.0,1,0) dtheta=3.14/18000 1000 do i=1,5 xrot(i)=x(i)*cos(dtheta)-y(i)*sin(dtheta) yrot(i)=x(i)*sin(dtheta)+y(i)*cos(dtheta) end do call pgbbuf call pgsci(0) call pgline(5,x,y) call pgsci(1) call pgline(5,xrot,yrot) call pgebuf do i=1,5 x(i)=xrot(i) y(i)=yrot(i) end do goto 1000 end