1 for x in `seq 0 100`; do
2         nnn=`printf %03d \$x`
3         a=\$((\$x * 20 / 9))
4         b=\$((33 + \$x * 20 / 9))
5         convert \
6                 -size 128x128 \
7                 xc:"rgb(\$a,\$a,\$a)" \
8                 -fill "rgb(\$b,\$b,\$b)" \
9                 -draw "rectangle 0,0 63,63" \
10                 -draw "rectangle 64,64 127,127" \
11                 -gravity center \
12                 -font "Bitstream-Vera-Sans-Bold" \
13                 -pointsize 24 \
14                 -fill white \
15                 -draw "text -1,-1 '\$x%'" \
16                 -draw "text 0,-1 '\$x%'" \
17                 -draw "text 1,-1 '\$x%'" \
18                 -draw "text -1,0 '\$x%'" \
19                 -draw "text 1,0 '\$x%'" \
20                 -draw "text -1,1 '\$x%'" \
21                 -draw "text 0,1 '\$x%'" \
22                 -draw "text 1,1 '\$x%'" \
23                 -fill black \
24                 -draw "text 0,0 '\$x%'" \
25                 PNM:- |\
26                 pamtotga -mono -norle > "alpha_\$nnn.tga"
27         cat <<EOF
28 textures/alphamod/alpha_\$nnn
29 {
30         qer_nocarve
31         qer_trans 0.30
32         surfaceparm nodraw
33         surfaceparm nonsolid
34         surfaceparm skip
35         surfaceparm detail
36         surfaceparm trans
37         q3map_alphaMod volume
38         q3map_alphaMod const \${nnn%??}.\${nnn#?}
39 }
40 EOF