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

Annotation of /eyes/nova_pearl.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Tue Feb 2 04:02:35 2016 UTC (4 years, 5 months ago) by hib
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/plain
added is_image_grey

1 hib 1.1
2     $xsize = 28800;
3     $ysize = 28800;
4     $xcenter = $xsize * 0.5;
5     $ycenter = $ysize * 0.5;
6    
7     #left
8     $xdo_size = 800;
9     $ydo_size = 28800;
10     $xoffset = 0;
11     $yoffset = 0;
12    
13     #right
14     $xdo_size = 800;
15     $ydo_size = 28800;
16     $xoffset = -28000;
17     $yoffset = 0;
18    
19     #top
20     $xdo_size = 27200;
21     $ydo_size = 800;
22     $xoffset = -800;
23     $yoffset = 0;
24    
25     #bottom
26     $xdo_size = 27200;
27     $ydo_size = 800;
28     $xoffset = -800;
29     $yoffset = -28000;
30    
31     #right
32     $xdo_size = 800;
33     $ydo_size = 28800;
34     $xoffset = -28000;
35     $yoffset = 0;
36    
37    
38     $ssize = $ycenter;
39     if ($ssize < $xcenter) {$ssize = $xcenter;}
40     $ssize = $ssize * 1.45 * 1.2; # rough estimate of 1.414 with fudging because yeah
41     $smsize = $ssize * 0.1339;
42     $block_chunk = 1500;
43    
44     $number = 11499.0;
45     $one_over_number = 1.0 / $number;
46     $strokewidth = $ycenter / ($number / 4) * 0.7;
47    
48     for ($g=0;$g<$number;$g += $block_chunk) {
49     if (!$g) {
50     $a = "convert -depth 8 -size $xdo_size" . "x$ydo_size xc:'#ffffff' -stroke '#000000' -strokewidth "
51     . int($strokewidth) . " -draw \"";
52     $t = "a";
53     }
54     else {
55     $t = chr(65+32+int($g/$block_chunk));
56     $tm1 = chr(64+32+int($g/$block_chunk));
57     $a = "convert $tm1.png -stroke '#000000' -strokewidth "
58     . int($strokewidth) . " -draw \"";
59     }
60    
61     for ($i = $g;($i < $number)&&($i<$g+$block_chunk);$i++) {
62     $vecx = cos(6.28318530718 * $i * $one_over_number);
63     $vecy = sin(6.28318530718 * $i * $one_over_number);
64     ($x1,$y1) = ($xcenter + $smsize * $vecx,$ycenter + $smsize * $vecy);
65     ($x2,$y2) = ($xcenter + $ssize * $vecx,$ycenter + $ssize * $vecy);
66     $x1 = $x1 + $xoffset;
67     $y1 = $y1 + $yoffset;
68     $x2 = $x2 + $xoffset;
69     $y2 = $y2 + $yoffset;
70    
71     $a .= "line $x1,$y1,$x2,$y2\n";
72     }
73     $a .= "\" $t.png";
74     print "$a\n";
75     }

  ViewVC Help
Powered by ViewVC 1.1.26