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

Contents of /eyes/nova_cassidi.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations)
Mon Feb 23 21:24:02 2015 UTC (3 years, 4 months ago) by hib
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +30 -1 lines
File MIME type: text/plain
aaa
1 $xsize = 30480;
2 $ysize = 30480;
3 $xcenter = $xsize * 0.54369627507163323782;
4 $ycenter = $ysize * 0.30444126074498567335;
5
6 #left
7 $xdo_size = 240;
8 $ydo_size = 30480;
9 $xoffset = 0;
10 $yoffset = 0;
11
12 #right
13 $xdo_size = 240;
14 $ydo_size = 30480;
15 $xoffset = -30240;
16 $yoffset = 0;
17
18 #top
19 $xdo_size = 30000;
20 $ydo_size = 240;
21 $xoffset = -240;
22 $yoffset = 0;
23
24 #bottom
25 $xdo_size = 30000;
26 $ydo_size = 240;
27 $xoffset = -240;
28 $yoffset = -30240;
29
30 $ssize = $ycenter;
31 if ($ssize < $xcenter) {$ssize = $xcenter;}
32 $ssize = $ssize * 1.45 * 1.2; # rough estimate of 1.414 with fudging because yeah
33 $smsize = $ssize * 0.1339;
34 $block_chunk = 1500;
35
36 $number = 11499.0;
37 $one_over_number = 1.0 / $number;
38 $strokewidth = $ycenter / ($number / 4) * 0.7;
39
40 for ($g=0;$g<$number;$g += $block_chunk) {
41 if (!$g) {
42 $a = "convert -depth 8 -size $xdo_size" . "x$ydo_size xc:'#ffff00' -stroke '#000000' -strokewidth "
43 . int($strokewidth) . " -draw \"";
44 $t = "a";
45 }
46 else {
47 $t = chr(65+32+int($g/$block_chunk));
48 $tm1 = chr(64+32+int($g/$block_chunk));
49 $a = "convert $tm1.png -stroke '#000000' -strokewidth "
50 . int($strokewidth) . " -draw \"";
51 }
52
53 for ($i = $g;($i < $number)&&($i<$g+$block_chunk);$i++) {
54 $vecx = cos(6.28318530718 * $i * $one_over_number);
55 $vecy = sin(6.28318530718 * $i * $one_over_number);
56 ($x1,$y1) = ($xcenter + $smsize * $vecx,$ycenter + $smsize * $vecy);
57 ($x2,$y2) = ($xcenter + $ssize * $vecx,$ycenter + $ssize * $vecy);
58 $x1 = $x1 + $xoffset;
59 $y1 = $y1 + $yoffset;
60 $x2 = $x2 + $xoffset;
61 $y2 = $y2 + $yoffset;
62
63 $a .= "line $x1,$y1,$x2,$y2\n";
64 }
65 $a .= "\" $t.png";
66 print "$a\n";
67 }

  ViewVC Help
Powered by ViewVC 1.1.5