      program perp ! bernd berg, jan 7, 2013.
c generation of a permutation n! using random numbers and heapsort.
      include '../../libs/fortran/implicit.sta'
      include '../../libs/fortran/constants.08'
      parameter(iuo=6,iud1=11,n=1000) ! a=one.
c
      open(iud1,file="perp.d",form='formatted',status='unknown')
      write(iud1,'(2f10.6)') zero,zero
      del=one/n
      do i=1,n-1
        rpar=i*del
        rperp=sqrt((one-rpar)*rpar)
        write(iud1,'(2f10.6)') rpar,rperp
      enddo
      write(iud1,'(2f10.6)') one,zero
      close(iud2)
c
      stop
      end
