HTML5 Canvas Demos

Many of the programs here originate from old computer books of the 80s and 90s, primarily written in BASIC.
The goal is to port, convert, or rewrite these programs to run in browsers (using HTML5 canvas) or in Python.
My journey with computer programming began with those old type-in books and magazines,
and I was always fascinated by the endless possibilities of those machines (Apple II, Sinclair ZX Spectrum, MSX).
I remember spending hours typing out code line by line, often making mistakes and learning to debug them.
The simplicity of BASIC made it accessible, yet it was powerful enough to create some pretty cool graphics and games.
One of the most fascinating aspects was seeing how a few lines of code could produce intricate patterns and animations on the screen.
It felt like magic! This early exposure to programming not only taught me the basics of coding but also sparked a lifelong interest in understanding how things work under the hood.
Revisiting these old programs now, with the added perspective of modern programming languages like Python and web technologies like HTML5, is like rediscovering an old hobby with new tools. It's a blend of nostalgia and curiosity, trying to decode the logic and math behind those simple yet elegant programs.


how amazing it is that a few lines of code (GW-BASIC):

0 SCREEN 7 : GOTO 10
1 R=SQR(X*X+Y*Y)*1.5 : IF R=0 THEN F=90: GOTO 3
2 F=ABS(90*SIN(R)/R)
3 A=INT(10*X+160-5*Y)
4 B=INT(5*Y+2.5*X+93)
5 RETURN
10 FOR Y=-10 TO 10 STEP 0.2
30 FOR X=-10 TO 10 STEP 0.3
40 GOSUB 1
46 PSET(A,B-F), 15
50 NEXT X
60 NEXT Y

can produce something like this image: