#!perl -w # Volve (text) v1.0 # by Kevin Reid # # Precursor to Volve (graphic). @set = (0) x 80; @chars = ( #'a'..'z', split(//, q< !_@,#.$%^&*()-+={[}]|\:;"'<>?/>), #'A'..'Z', #'0'..'9', ); sub tfunc { return $chars[$_[0] % (scalar @chars)]; } while (1) { for ($d = 1; $d < $#set; $d++) { $avg = ($set[$d-1] + $set[$d] + $set[$d+1]) / 3; $diff = $avg - $set[$d]; $change = $diff * .1 + (rand() - .5); $set[$d] += $change; } #for (1..50000) {} print map(tfunc($_), @set), "\n"; }