Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 10th, 2011  |  syntax: None  |  size: 0.30 KB  |  views: 208  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/usr/bin/perl
  2.  
  3. $rad = $ARGV[0];
  4.  
  5. $pi = 3.141562;
  6.  
  7. $num = 64;
  8.  
  9. foreach $s (0 .. ($num-1)) {
  10.  
  11.     $o = sprintf("%d, ",
  12.                  sin( $s * $pi *2 / $num) * $rad + $rad);
  13.  
  14.     $c += length($o);
  15.  
  16.     print $o;
  17.  
  18.     if($c > 70) {
  19.         print "\n";
  20.         $c=0;
  21.     }
  22. }
  23. print "\n";
clone this paste RAW Paste Data