tomilov

Untitled

Aug 9th, 2021
1,206
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. M=100000
  2. N=10000
  3. echo $M
  4. shuf <(
  5.     seq 0 $(( M - 1 )) | awk -v R=10 -v M=$M '
  6.        BEGIN {
  7.            c = 2 * atan2(0, -1) / M
  8.        }
  9.        {
  10.            print R * cos(c * $0), R * sin(c * $0)
  11.        }
  12.    '
  13. )
  14. echo $N
  15. shuf <(
  16.     seq 0 $(( N - 1 )) | awk -v R=10000 -v N=$N '
  17.        BEGIN {
  18.            c = 2 * atan2(0, -1) / N
  19.        }
  20.        {
  21.            print R * cos(c * $0), R * sin(c * $0)
  22.        }
  23.    '
  24. )
RAW Paste Data