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

Contents of /eyes/prototype_small_enl.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Fri Apr 27 17:39:23 2012 UTC (5 years, 11 months ago) by hib
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
File MIME type: text/plain
about to switch from 28800 to 28000 for the 1200 dpi
1
2 $seed = `generate_random_seed`;
3 srand($seed);
4 @choice = (22,"blackwhite",
5 31,"blue",
6 29,"brown",
7 13,"cyan",
8 14,"darkblue",
9 15,"darkgreen",
10 78,"darkish",
11 7,"darkred",
12 26,"green",
13 11,"greenblue",
14 31,"hazel",
15 77,"multi",
16 28,"orange",
17 86,"other",
18 25,"pink",
19 19,"red",
20 10,"redblue",
21 15,"redgreen",
22 32,"tan",
23 40,"violet",
24 14,"yellow"
25 );
26
27
28
29 sub get_color() {
30 my $look =rand($total);
31 my $i;
32 for ($i=0;$i<@choice;$i += 2) {
33 if ($look<$choice[$i]) {
34 return $choice[$i-1];
35 }
36 }
37 }
38
39
40 for ($i=0;$i<@choice;$i+= 2) {
41 if ($i) {
42 $choice[$i] = $choice[$i] + $choice[$i-2];
43 }
44 }
45 $total = $choice[@choice-2];
46
47 for ($i=0;$i<100;$i++) {
48 my $eye_color = &get_color();
49 my $tounge_color = &get_color();
50 my $seed = int(rand(2147483647));
51 my $filename=sprintf('%3.3d_%s_%s_%s.png',$i,
52 $seed,$eye_color,$tounge_color);
53 print "bash \$e/enlightenment_prototype.sh 2048 $i $seed $eye_color $tounge_color $filename\n";
54 }
55

  ViewVC Help
Powered by ViewVC 1.1.5