[tw5] Fractal Tree Animation

Just a tiddler with an iframe rendering this html page running a BASIC program.

If you are interested in this kind of stuff, view the source code.

I’ll be posting a version of this that runs offline in a little bit.

Fractal Tree Animation.json (392 Bytes)

1 Like

Version that runs offline (i.e. includes the BASIC interpreter and Console Window).

Tiddlers:

  • Fractal Tree (this is the BASIC program; go ahead and edit edit !!!)
  • Fractal Tree Offline Animation (check this out to see how simple it is to include a running BASIC program in a tiddler)
  • Basic Console Window Template (the magic)
  • Basic Script Web Page (the raw HTML template that gets fed to the iframe)

Fractal Tree.offline.json (125 KB)

By the way, with either version, notice how the BASIC program creates 1 session storage item.

As the program is running, you can alter that “Depth” item at any time, and the BASIC program will pick that value up just before drawing a new tree.

The default “depth” value for the program is 10. If you want a different default on subsequent launch of the program, create in local storage an item with the same key name as the one in session storage, but with a value that you prefer.

What you do there manually with local storage and session storage, that can be done via widgets in TiddlyWiki.

So that’s how a TiddlyWiki instance can communicate with a hosted BASIC Anywhere Machine program.

That’s also how a BASIC Anywhere Machine program can communicate with the host TiddlyWiki.