Saturday, January 18, 2025

🖥 Fractals in Focus : A classic BASIC program with some new twists

This program is a port and mod of Steve Justice's program presented in the "Fractals in Focus" article found in the May 1985 issue of 80micro magazine.  (Available via  🔗 this Internet Archive link.)

Find all links for the BAM program after this foreword blurb.

One of my primary goals for BASIC Anywhere Machine: the ability to, without too much effort and too many headaches, bring to life some old BASIC programs from the 70's and 80's.

What's the point in being able to run those programs if you can't share them easily?  And there is another primary goal for BASIC Anywhere Machine: the ability to share such programs in a single and small HTML file, fully self-contained (I.e. no dependencies) and with a sole requirement of a modern Web browser (operating system agnostic, device agnostic) that doesn't even need to be connected to the web once that HTML file is on some local storage device.

I am a "tweaker" at heart (with BASIC programs the same as with food recipes.)  One of the things I really like about BASIC Anywhere Machine versus running these classic BASIC programs on old hardware or emulators of old hardware: I can easily get one of these old programs working in BAM (all of the smart original code left as-is!  GOTO's and all !), and then easily intertwingle the original code with some modern code that gives the old programs some snazzy new twists.

I've made the following modifications to Steve's program:

  • I've removed the code related to printing a fractal graphic; to copy or save an image, right-click on the image, and access your browser's copy/save functionality via the context menu
  • I've added a "C" option for inverted graphs:  "Y" will invert a graph, "C" will combine the non-inverted and inverted graphs, and any other value will (as per the original program) creates a non-inverted graph
  • I've limited the number of sides for a graph within the inclusive range of 3 to 20 sides
  • I've limited the number of levels for a graph within the inclusive range of 1 to 6 levels
  • Every graph will be, randomly, either a single random colors, or multi-color (a number of random colors equal to the number of levels)
  • I've setup an "auto-pilot" mode so the program behaves like a screen-saver; simply add a parameter to the program's URL:  ?autopilot=Y
  • I've setup the program to use screen mode 15 ( 64 colors, minus black which is the program's background color)
The BAM program :



















Saturday, January 11, 2025

📚 Common Programming Constructs / Concepts / Elements

For some reason, a direct link to the documentation page does not work when shared on some forums/dites (Facebook, for example), so access that documentation via this 🔗 this link which seems to work fine in Blogger.

I suspect some forums/sites do not shared links that have certain characters in URL query parameters.

The link will show the following in a new tab/window:


Wednesday, January 8, 2025

⚗ "Code Block" toolbar button to insert code blocks

Try it out the feature in the development version of BAM.


The buttons will wrap currently selected code with lines of code related to the code block.

If there isn't any code selected, then the current line (where the text cursor is located) will be wrapped by the lines of code related to the code block. 

Nothing fancy, just functional.









Tuesday, January 7, 2025

🖥 DRAW to generate the points for regular polygons

Drawing regular polygons is pretty easy when using DRAW to generate the points of the polygon, using specified coordinates for the center of the polygon and using a specified number of points for the polygon.

This program also demonstrates simple animation by rotating the polygon around the center, and loops endlessly (in increments of 1) from 3-point to 15-point polygons, increasing the number of points every loop of 360 degrees.



Saturday, January 4, 2025

🖥 Bubbly Wonderment

This program is a port and mod of a "simple 3d sphere" QBJS program by issues37.

On older computers, this program might be a little bit demanding because it is drawing 4,000 circles.



🖥 Wispy Murmurations

This program is a "port" (not much effort: only one line replaced) of a really nice QBJS program by "issues37".

(BTW: my host, Neocities, is having some intermittent performance issues today.)



Friday, January 3, 2025

⚗ Experiment in the Works: Editor toolbar buttons for inserting "whatever" into a program

Try this in the "development version" of BASIC Anywhere Machine.

I have started experimenting (toying around with the idea?) of editor toolbar buttons to quickly add snippets of code (among other things) to a program in the midst of being created / edited.

I've added a "FOR-NEXT block" button just above the editor, which allows wrapping any number of selected lines (or just the current line if none are selected) with the start and end lines of a FOR-NEXT block.

On a line of code, just before pressing the button

The result after pressing the button







🖥 "Spirographed" ellipses to create colorful circles

This sample program shows how to use DRAW to create ellipses (I like to call this a "spirographing" approach. The program generate...