copyright (c)1986, 1987, 2009, 2016 William Schaeffer
When this worm gets stuck, it looks ahead only one move. If the worm finds an escape path, it chooses that direction: right path or left path. If the worm gets absolutely stuck with no escape, then the worm reverses direction.
Originally programmed in Commodore 64 Basic on the Commodore 64.
I worked on this program and the "simple logic" for two years in my spare time. And then I realized in 1988 that the Commodore 64 was an obsolete machine and it was not worth spending any more time to invest in learning it.
I was surprised a few years later, when I got a Mac Performa, that there was no longer any good Basic programming environment on the computer. In fact, there was no longer any good software development environment, for individual programming and coding, on any personal computer at all. People stopped writing computer programs. Software writing and software development had been divorced from software use. I did not realize the full social implications of this restriction at the time. I do not think that anyone today really does either, except for the people that ultimately made it happen. Curious.
The program probably should be called Digital Sticks, or Digital Twigs, because these tree trunks have no branches. But it was named Digital Trees and it is too difficult to change it now.
The idea is that in a forest, you really only see the tree trunks and the ground cover and the canopy of leaves overhead.
These are the three elements that are highly abstracted into this stylized pattern generation routine 1) ground, 2) trunks, 3) leaves.
The design parameters are all based on random number possibilities and the program could run forever generating endlessly different, but all quite similar, patterns.
This pattern is an extension and enhancement of the algorithm in "Zen Bars"
The music is called "Intermission Music" and was inspired by a request from Bill Ohanesian for a theater production he was directing. The whole story is somewhat sad and amusing and now it happened a long time ago. The play was called "Someone to watch over me" and featured the song by the same name. Bill wanted me to make an audio recording of that song to use as intermission music. Unfortunately, I didn't really like the song and just recorded THIS music instead. Curiously, I thought this would work much better. Well, Bill was on vacation in Washington DC and became ill. He required hospitalization and could not travel back to Los Angeles. He had to miss the entire run of the play. I gave the recording to the shows producers, but they were not happy with it, so they did not use it for intermission music. The play was produced and I went to see it. A fun, and memorable performance under difficult circumstances. I can now play the song "Someone to watch over me" on piano, but it is still not a personal favorite.
This song "Intermission Music" can be found in the collection of recordings on "Music for Daydreams" by Bill Schaeffer and is available on itunes and at www.cdbaby.com