/[opencvs]/eyes/nova_als.pl
ViewVC logotype

Contents of /eyes/nova_als.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Wed Apr 9 03:45:44 2014 UTC (4 years ago) by hib
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/plain
als is complete
1 $xsize = 26976;
2 $ysize = 20880;
3 $xcenter = $xsize / 2.0;
4 $ycenter = $ysize / 2.0;
5
6 $ssize = $ycenter;
7 if ($ssize < $xcenter) {$ssize = $xcenter;}
8 $ssize = $ssize * 1.45; # rough estimate of 1.414 with fudging because yeah
9 $smsize = $ssize * 0.33;
10
11 $number = 365.0;
12 $one_over_number = 1.0 / $number;
13 $strokewidth = $ycenter / ($number / 4) * 0.7;
14
15 $a = "convert -depth 8 -size $xsize" . "x$ysize xc:'#ffdcc6' -stroke '#9fc6e4' -strokewidth "
16 . int($strokewidth) . " -draw \"";
17 for ($i = 0;$i < $number;$i++) {
18 $vecx = cos(6.28318530718 * $i * $one_over_number);
19 $vecy = sin(6.28318530718 * $i * $one_over_number);
20 ($x1,$y1) = ($xcenter + $smsize * $vecx,$ycenter + $smsize * $vecy);
21 ($x2,$y2) = ($xcenter + $ssize * $vecx,$ycenter + $ssize * $vecy);
22 $a .= "line $x1,$y1,$x2,$y2\n";
23 }
24 $a .= "\" a.png";
25
26 print "$a\n";

  ViewVC Help
Powered by ViewVC 1.1.5