program arrow_rot_save_name real x(13),y(13),xnew(13),ynew(13) write(*,*)'drgrees for rotation?' read(*,*)n idummy=pgopen('/xwin') call pgenv(-10.0,10.0,-10.0,10.0,1,0) x(1)=2 y(1)=0 x(2)=1 y(2)=1 x(3)=1 y(3)=0 x(4)=-1 y(4)=0 x(5)=-1.5 y(5)=1 x(6)=-2 y(6)=1 x(7)=-1.5 y(7)=0 x(8)=-2 y(8)=-1 x(9)=-1.5 y(9)=-1 x(10)=-1 y(10)=0 x(11)=1 y(11)=0 x(12)=1 y(12)=-1 x(13)=2 y(13)=0 d_theta=2*3.14159/360 theta=n*d_theta do i=1,13 xnew(i)=x(i)*cos(theta)-y(i)*sin(theta) ynew(i)=x(i)*sin(theta)+y(i)*cos(theta) end do open(unit=10,file='arrow.dat') write(10,*)13 do i=1,13 write(10,*)xnew(i),ynew(i) end do close(10) call pgline(13,xnew,ynew) call pgclos end