diff options
author | Yukihiro Matsumoto <matz@ruby-lang.org> | 1994-12-08 14:17:29 +0900 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2019-08-17 22:09:30 +0900 |
commit | 00e36aa09f54925c2f9c30524b48f4f54a9adb23 (patch) | |
tree | 57bf15576109b53406796c66b29d5e11d9fd99c0 /sample/rcs.rb | |
parent | 4dfd93c72a9a221c5575c5888483f2fb55c82117 (diff) |
version 0.60v0_60
https://cache.ruby-lang.org/pub/ruby/1.0/ruby-0.60.tar.gz
Thu Dec 8 14:17:29 1994 Yukihiro Matsumoto (matz@ix-02)
* 0.60 released - alpha test baseline.
Diffstat (limited to 'sample/rcs.rb')
-rw-r--r-- | sample/rcs.rb | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/sample/rcs.rb b/sample/rcs.rb deleted file mode 100644 index 0ed4a36c1e..0000000000 --- a/sample/rcs.rb +++ /dev/null @@ -1,46 +0,0 @@ -sw = 40.0 # 元のパターンの幅 -dw = 78.0 # 生成される Random Character Streogram の幅 -hdw = dw / 2.0 -w = 20.0 # 両眼の幅 -h =1.0 # 画面と基準面の距離 -d = 0.2 # 単位当たりの浮き上がり方 -ss="abcdefghijklmnopqrstuvwxyz0123456789!#$%^&*()-=\\[];'`,./" -rnd = srand() - -while gets() -# print($_) - xr = -hdw; y = h * 1.0; maxxl = -999 - s = ""; - while xr < hdw - x = xr * (1 + y) - y * w / 2 - i = (x / (1 + h) + sw /2) - if (1 < i && i < $_.length); - c = $_[i, 1].to_i - else - c = 0 - end - y = h - d * c - xl = xr - w * y / (1 + y); - if xl < -hdw || xl >= hdw || xl <= maxxl - tt = rand(ss.length) - c = ss[tt, 1] - else - c = s[xl + hdw, 1] - maxxl = xl - end - s = s + c - xr = xr + 1 - end - print(s, "\n") -end - - - - - - - - - - - |