<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!--

Nick Montfort
 Original Python program:
 8 January 2009, Taroko Gorge National Park, Taiwan and Eva Air Flight 28

Copyright (c) 2009 Nick Montfort <nickm@nickm.com>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

-->
<style type="text/css">
/* <![CDATA[ */
body {
 background: #669999;
 color: #003366;
 margin: 0 24pt 0 24pt;
 font-family: Optima, sans-serif;
 font-size: 13pt;
}
div {
 height: 16pt;
}
a {
 color: #117;
 text-decoration: none;
}
/* ]]> */
</style>
<script language="JavaScript" type="text/javascript">
var t=0;
var n=0;
var paths=0;
var above='transformation,mist,tinker,layer,deconstruction,stone,rearrangement,height'.split(',');
var below='flow,conversion,shape,stabilization,rippling,break,cove,deformance'.split(',');
var trans='command,creation,roam,customization,frame,optimization,exercise,repair'.split(',');
var imper='track,performance,translate,kludge,progress through,control,run,play';
imper=imper.split(',');
var intrans='short cut,dwell,dilettante,relax,opening,dream,hum'.split(',');
var s='s,'.split(',');
var texture='rough,fine'.split(',');
function rand_range(max) {
 return Math.floor(Math.random()*(max+1));
}
function choose(array) {
 return array[rand_range(array.length-1)];
}
function path() {
 var p=rand_range(1);
 var words=choose(above);
 if ((words=='forest')&&(rand_range(3)==1)) {
  words='mark sample '+choose(trans);
 } else {
  words+=s[p]+' '+choose(trans)+s[(p+1)%2];
 }
 words+=' the '+choose(below)+choose(s)+'.';
 return words;
}
function site() {
 var words='';
 if (rand_range(2)==1) {
  words+=choose(above);
 } else {
  words+=choose(below);
 }
 words+='s '+choose(intrans)+'.';
 return words;
}
function cave() {
 var adjs=('encompassing,'+choose(texture)+',sinuous,disrespect the hardware autonomy,objective,expose,cool,extending,dim,redirect unexpectedly').split(',');
 var target=1+rand_range(3);
 while (adjs.length>target) {
  adjs.splice(rand_range(adjs.length),1);
  }
 var words='\u00a0\u00a0'+choose(imper)+' the '+adjs.join(' ')+' \u2014';
 return words;
}
function do_line() {
 var main=document.getElementById('main');
 if (t<=25) {
  t+=1;
 } else {
  main.removeChild(document.getElementById('main').firstChild);
 }
 if (n===0) {
  text=' ';
 } else if (n==1) {
  paths=2+rand_range(2);
  text=path();
 } else if (n<paths) {
  text=site();
 } else if (n==paths) {
  text=path();
 } else if (n==paths+1) {
  text=' ';
 } else if (n==paths+2) {
  text=cave();
 } else {
  text=' ';
  n=0;
 }
 n+=1;
 text=text.substring(0,1).toUpperCase()+text.substring(1,text.length);
 last=document.createElement('div');
 last.appendChild(document.createTextNode(text));
 main.appendChild(last);
}
function poem() {
 setInterval(do_line, 1200);
}
</script>
  <title>Taroko Gorge</title>
</head>
<body onload="poem()">
<div style="float:right; margin-top:12px; color:#003366; height:60pt">
<div>Taroko Gorge</div>
<div><a href="http://nickm.com">Nick Montfort</a></div>
</div>
<div id="main"></div>
</body>
</html>


Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.