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

Contents of /eyes/nova.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Thu Mar 6 06:43:51 2014 UTC (4 years, 1 month ago) by hib
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/plain
Got qi working and released.
1 $xsize = 31320;
2 $ysize = 31600;
3 $xcenter = $xsize / 2.0;
4 $ycenter = $xsize / 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.333333333;
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:Violet -stroke yellow -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