Skip to content
This repository
Newer
Older
100644 34 lines (32 sloc) 0.638 kb
511dc44a »
2008-02-25 initial import
1 BEGIN {
2 sw = 40.0;
3 dw = 78.0;
4 hdw = dw / 2.0;
5 w = 20.0;
6 h =1.0;
7 d = 0.2;
8 ss="abcdefghijklmnopqrstuvwxyz0123456789!#$%^&*()-=\\[];'`,./";
9 rnd = srand();
10 }
11
12 {
13 xr = -hdw; y = h * 1.0; maxxl = -999;
14 s = "";
15 while (xr < hdw) {
16 x = xr * (1 + y) - y * w / 2;
17 i = (x / (1 + h) + sw /2);
18 c = (0 < i && i < length($0)) ? substr($0, i, 1) : "0";
19 y = h - d * c;
20 xl = xr - w * y / (1 + y);
21 if (xl < -hdw || xl >= hdw || xl <= maxxl) {
22 t = rand() * length(ss);
23 c = substr(ss, t, 1);
24 }
25 else {
26 c = substr(s, xl + hdw, 1);
27 maxxl = xl;
28 }
29 s = s c;
30 xr = xr + 1;
31 }
32 print s;
33 }
Something went wrong with that request. Please try again.