From 10b0be14c4d4eb5056e273a91f5a9f50ecc31148 Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Tue, 29 Jul 2025 03:06:28 +0300 Subject: [PATCH] Improve application listing on the web --- 2D GFX/Fractals/index.html | 81 +++- 2D GFX/Spirals/index.html | 54 +-- 2D GFX/Textures/index.html | 678 ++++++++++++++++------------ 2D GFX/Textures/index.org | 62 ++- 3D GFX/3D Synthezier/doc/index.html | 162 +++---- 3D GFX/Miscellaneous/index.html | 54 +-- 3D GFX/Miscellaneous/index.org | 16 +- 3D GFX/Space/index.html | 36 +- 3D GFX/Space/index.org | 59 ++- index.org | 144 +++++- 10 files changed, 835 insertions(+), 511 deletions(-) diff --git a/2D GFX/Fractals/index.html b/2D GFX/Fractals/index.html index 19596d9..94b7f32 100644 --- a/2D GFX/Fractals/index.html +++ b/2D GFX/Fractals/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Fractals @@ -210,11 +210,11 @@

Table of Contents

@@ -236,24 +236,45 @@ -
-

1. Fractal circles

+
+

1. Fractal circles

+

+This QBasic program generates a visually captivating spiral fractal +composed of circles. It employs a recursive algorithm to create +intricate patterns that can inspire those interested in fractal +geometry, recursive programming, and graphical design. +

+ -
+

fractal%20circles.png

+
+
Color and Depth
The color of each circle alternates based on the +recursion depth, adding visual complexity to the fractal.
+
Termination Condition
The recursion terminates when the size of +the circles becomes too small, ensuring the program doesn't run +indefinitely.
+
+

Source code

-
-

2. Fractal circles animated

+
+

2. Fractal circles animated

+

+This QBasic program creates an animated fractal composed of circles, +demonstrating an engaging visual effect. The program uses a timer +system to control the animation's progression. +

+
-
-

3. Fractal of squares

+
+

3. Fractal of squares

+

+This QBasic program generates and displays a fractal pattern composed of squares. +

+ -
+

fractal%20squares,%201.png

-
+

fractal%20squares,%202.png

-
-

4. Fractal of squares animated

+
+

4. Fractal of squares animated

+

+This QBasic program generates an animated fractal pattern composed of +size-shifting squares. The animation creates a visually captivating +display by continuously redrawing the fractal with varying parameters, +resulting in a dynamic and ever-changing geometric pattern. +

+
+

Source code

-
-

5. Fractal of trees

+
+

5. Fractal of trees

+

+QBasic program that generates a visually appealing fractal tree +animation. The program creates a dynamic fractal pattern that +resembles a tree, with branches that grow and change over time. +

+
+ +

Source code

@@ -314,7 +355,7 @@
-

Created: 2025-07-28 ma 18:31

+

Created: 2025-07-29 ti 00:24

Validate

diff --git a/2D GFX/Spirals/index.html b/2D GFX/Spirals/index.html index 5cdba11..1cc5921 100644 --- a/2D GFX/Spirals/index.html +++ b/2D GFX/Spirals/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Spiral series @@ -210,12 +210,12 @@

Table of Contents

@@ -236,11 +236,11 @@ } -
-

1. Spiral with increasing density

+
+

1. Spiral with increasing density

-
+

spiral.png

@@ -320,11 +320,11 @@ userInput$ = INPUT$(1)
-
-

2. Spiral with varying height

+
+

2. Spiral with varying height

-
+

spiral, 2.png

@@ -391,11 +391,11 @@ a$ = INPUT$(1)
-
-

3. Shaded spiral

+
+

3. Shaded spiral

-
+

spiral, 3.png

@@ -497,8 +497,8 @@ a$ = INPUT$(1)
-
-

4. Sphere forming spiral

+
+

4. Sphere forming spiral

Similar to previous spiral, Line segments are connected between the @@ -507,7 +507,7 @@ multiple linked spherical shapes. Initially point cloud in shown:

-
+

spiral, 4, 1.png

@@ -517,7 +517,7 @@ In the next step, points are connected using lines:

-
+

spiral, 4, 2.png

@@ -622,11 +622,11 @@ a$ = INPUT$(1)
-
-

5. Textured spherical spiral

+
+

5. Textured spherical spiral

-
+

spiral, 5.png

@@ -749,11 +749,11 @@ a$ = INPUT$(1)
-
-

6. Textured and shaded spherical spiral

+
+

6. Textured and shaded spherical spiral

-
+

spiral, 6.png

@@ -937,7 +937,7 @@ yStep2 = (oppositePointY2 - oppositePointY1) / stepCount
-

Created: 2025-07-28 ma 18:31

+

Created: 2025-07-29 ti 00:24

Validate

diff --git a/2D GFX/Textures/index.html b/2D GFX/Textures/index.html index 9ed4720..5e1b02f 100644 --- a/2D GFX/Textures/index.html +++ b/2D GFX/Textures/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Fractals @@ -210,11 +210,11 @@

Table of Contents

@@ -233,394 +233,476 @@ } -
-

1. Circular waves

+
+

1. Circular waves

+

+This QBasic program creates visually captivating circular wave +patterns by manipulating pixel colors based on sine function +calculations. It's a simple yet effective demonstration of how +mathematical functions can be used to generate complex visual +patterns. +

+ +

+The program uses two nested loops to iterate over each pixel on the +screen. The outer loop handles the vertical axis (y-coordinate), and +the inner loop handles the horizontal axis (x-coordinate). +

+ +

+For each pixel, the program calculates a sine value based on the +squared distance from the origin (0,0). This calculation involves the +formula: +

+ +
+colorvalue = SIN((x^2 + y^2) / 10) * 10
+
+ + +

+This program is a blend of mathematics and art, showcasing how simple +algorithms can produce intricate and visually appealing results. +

+

Circular waves.png Source code

-
' Program to render circular wave patterns.
-' Algorithm was accidentally discovered while experimenting with sine function.
-'
-' This program is free software: released under Creative Commons Zero (CC0) license
-' by Svjatoslav Agejenko.
-' Email: svjatoslav@svjatoslav.eu
-' Homepage: http://www.svjatoslav.eu
-'
-' Changelog:
-' 2003, Initial version
-' 2025, Improved program readability
-
-SCREEN 13
-
-' Initialize the screen mode to 320x200 with 16 colors
-
-' Outer loop for the vertical axis (y-coordinate)
-FOR ycoordinate = 1 TO 199
-    ' Inner loop for the horizontal axis (x-coordinate)
-    FOR xcoordinate = 1 TO 319
-        ' Calculate the sine value based on the squared distances from the origin
-        colorvalue = SIN((xcoordinate ^ 2 + ycoordinate ^ 2) / 10) * 10
-
-        ' Clamp the color value to the range [0, 15]
-        IF colorvalue < 0 THEN colorvalue = 0
-        IF colorvalue > 15 THEN colorvalue = 15
-
-        ' Set the pixel color at (xcoordinate, ycoordinate) with an offset to use the full 16-color palette
-        PSET (xcoordinate, ycoordinate), colorvalue + 16
-    NEXT xcoordinate
-NEXT ycoordinate
-
-' Wait for user key press
-WHILE INKEY$ = "": WEND
-CLS
-END
+
' Program to render circular wave patterns.
+' Algorithm was accidentally discovered while experimenting with sine function.
+'
+' This program is free software: released under Creative Commons Zero (CC0) license
+' by Svjatoslav Agejenko.
+' Email: svjatoslav@svjatoslav.eu
+' Homepage: http://www.svjatoslav.eu
+'
+' Changelog:
+' 2003, Initial version
+' 2025, Improved program readability
+
+SCREEN 13
+
+' Initialize the screen mode to 320x200 with 16 colors
+
+' Outer loop for the vertical axis (y-coordinate)
+FOR ycoordinate = 1 TO 199
+    ' Inner loop for the horizontal axis (x-coordinate)
+    FOR xcoordinate = 1 TO 319
+        ' Calculate the sine value based on the squared distances from the origin
+        colorvalue = SIN((xcoordinate ^ 2 + ycoordinate ^ 2) / 10) * 10
+
+        ' Clamp the color value to the range [0, 15]
+        IF colorvalue < 0 THEN colorvalue = 0
+        IF colorvalue > 15 THEN colorvalue = 15
+
+        ' Set the pixel color at (xcoordinate, ycoordinate) with an offset to use the full 16-color palette
+        PSET (xcoordinate, ycoordinate), colorvalue + 16
+    NEXT xcoordinate
+NEXT ycoordinate
+
+' Wait for user key press
+WHILE INKEY$ = "": WEND
+CLS
+END
 
-
-

2. Diamond square clouds

+
+

2. Diamond square clouds

+

+This QBasic program demonstrates the Diamond-Square algorithm, a +method used to generate fractal terrain or cloud surfaces. The +algorithm is particularly useful for creating realistic landscapes or +textures in computer graphics. +

+

Diamond square clouds.png Source code

-
DECLARE SUB DrawPixels (x1 AS INTEGER, y1 AS INTEGER, s AS INTEGER)
-' Program to render cloud surface using diamond square algorithm.
-'
-' This program is free software: released under Creative Commons Zero (CC0) license
-' by Svjatoslav Agejenko.
-' Email: svjatoslav@svjatoslav.eu
-' Homepage: http://www.svjatoslav.eu
-'
-' Changelog:
-' 2003.12, Initial version
-' 2024.08, Improved program readability
-
-DECLARE SUB DrawBox (x1 AS INTEGER, y1 AS INTEGER, s AS INTEGER)
-DECLARE SUB SetPalette ()
-DECLARE SUB InitializeProgram ()
-DEFINT A-Z
+
DECLARE SUB DrawPixels (x1 AS INTEGER, y1 AS INTEGER, s AS INTEGER)
+' Program to render cloud surface using diamond square algorithm.
+'
+' This program is free software: released under Creative Commons Zero (CC0) license
+' by Svjatoslav Agejenko.
+' Email: svjatoslav@svjatoslav.eu
+' Homepage: http://www.svjatoslav.eu
+'
+' Changelog:
+' 2003.12, Initial version
+' 2024.08, Improved program readability
+
+DECLARE SUB DrawBox (x1 AS INTEGER, y1 AS INTEGER, s AS INTEGER)
+DECLARE SUB SetPalette ()
+DECLARE SUB InitializeProgram ()
+DEFINT A-Z
 InitializeProgram
 
-DIM SHARED maxLightness AS INTEGER
+DIM SHARED maxLightness AS INTEGER
 maxLightness = 127
 
-DIM scale AS INTEGER
+DIM scale AS INTEGER
 scale = 2 ^ 8
 
-1 :
+1 :
 scale = scale \ 2
 x1 = (319 \ scale) - 1
 y1 = (199 \ scale) - 1
 
-FOR y = 0 TO y1
-    FOR x = 0 TO x1
+FOR y = 0 TO y1
+    FOR x = 0 TO x1
         DrawPixels x * scale, y * scale, scale
-    NEXT x
-NEXT y
+    NEXT x
+NEXT y
 
-IF scale > 2 THEN GOTO 1
-WAITa$ = INPUT$(1)
+IF scale > 2 THEN GOTO 1
+WAITa$ = INPUT$(1)
 
-SUB DrawPixels (x1 AS INTEGER, y1 AS INTEGER, s AS INTEGER)
-    ' Get the lightness values for the corners of the box
-    c1 = POINT(x1, y1)
-    c2 = POINT(x1 + s, y1)
-    c3 = POINT(x1, y1 + s)
-    c4 = POINT(x1 + s, y1 + s)
+SUB DrawPixels (x1 AS INTEGER, y1 AS INTEGER, s AS INTEGER)
+    ' Get the lightness values for the corners of the box
+    c1 = POINT(x1, y1)
+    c2 = POINT(x1 + s, y1)
+    c3 = POINT(x1, y1 + s)
+    c4 = POINT(x1 + s, y1 + s)
 
-    ' Calculate the midpoint lightness values
+    ' Calculate the midpoint lightness values
     sp = s \ 2
     k = s * 2
     kp = k / 2
 
-    cc2 = ((c1 + c2) / 2) + (RND * k) - kp
-    IF cc2 > maxLightness THEN cc2 = maxLightness
-    IF cc2 < 0 THEN cc2 = 0
-
-    cc3 = ((c1 + c3) / 2) + (RND * k) - kp
-    IF cc3 > maxLightness THEN cc3 = maxLightness
-    IF cc3 < 0 THEN cc3 = 0
-
-    cc4 = ((c2 + c4) / 2) + (RND * k) - kp
-    IF cc4 > maxLightness THEN cc4 = maxLightness
-    IF cc4 < 0 THEN cc4 = 0
-
-    cc5 = ((c3 + c4) / 2) + (RND * k) - kp
-    IF cc5 > maxLightness THEN cc5 = maxLightness
-    IF cc5 < 0 THEN cc5 = 0
-
-    ' Calculate the central lightness value
-    cc1 = ((cc2 + cc3 + cc4 + cc5) / 4) + (RND * k) - kp
-    IF cc1 > maxLightness THEN cc1 = maxLightness
-    IF cc1 < 0 THEN cc1 = 0
-
-    ' Set the calculated lightness values for the box
-    PSET (x1 + sp, y1 + sp), cc1
-    PSET (x1 + sp, y1), cc2
-    PSET (x1, y1 + sp), cc3
-    PSET (x1 + s, y1 + sp), cc4
-    PSET (x1 + sp, y1 + s), cc5
-END SUB
-
-SUB InitializeProgram
-    ' Set the screen mode and initialize the color palette
-    SCREEN 13
+    cc2 = ((c1 + c2) / 2) + (RND * k) - kp
+    IF cc2 > maxLightness THEN cc2 = maxLightness
+    IF cc2 < 0 THEN cc2 = 0
+
+    cc3 = ((c1 + c3) / 2) + (RND * k) - kp
+    IF cc3 > maxLightness THEN cc3 = maxLightness
+    IF cc3 < 0 THEN cc3 = 0
+
+    cc4 = ((c2 + c4) / 2) + (RND * k) - kp
+    IF cc4 > maxLightness THEN cc4 = maxLightness
+    IF cc4 < 0 THEN cc4 = 0
+
+    cc5 = ((c3 + c4) / 2) + (RND * k) - kp
+    IF cc5 > maxLightness THEN cc5 = maxLightness
+    IF cc5 < 0 THEN cc5 = 0
+
+    ' Calculate the central lightness value
+    cc1 = ((cc2 + cc3 + cc4 + cc5) / 4) + (RND * k) - kp
+    IF cc1 > maxLightness THEN cc1 = maxLightness
+    IF cc1 < 0 THEN cc1 = 0
+
+    ' Set the calculated lightness values for the box
+    PSET (x1 + sp, y1 + sp), cc1
+    PSET (x1 + sp, y1), cc2
+    PSET (x1, y1 + sp), cc3
+    PSET (x1 + s, y1 + sp), cc4
+    PSET (x1 + sp, y1 + s), cc5
+END SUB
+
+SUB InitializeProgram
+    ' Set the screen mode and initialize the color palette
+    SCREEN 13
     SetPalette
-    RANDOMIZE TIMER
-END SUB
-
-SUB SetPalette
-    ' Set the color palette for lightness levels
-    FOR a = 0 TO 255
-        OUT &H3C8, a
-        OUT &H3C9, a / 4
-        OUT &H3C9, a / 3
-        OUT &H3C9, a / 2.3
-    NEXT a
-END SUB
+    RANDOMIZE TIMER
+END SUB
+
+SUB SetPalette
+    ' Set the color palette for lightness levels
+    FOR a = 0 TO 255
+        OUT &H3C8, a
+        OUT &H3C9, a / 4
+        OUT &H3C9, a / 3
+        OUT &H3C9, a / 2.3
+    NEXT a
+END SUB
 
-
-

3. Old paper

+
+

3. Old paper

+

+This QBasic program generates a procedural texture that simulates the +appearance of old paper. +

+ +

+The program initializes the screen to a 320x200 resolution with 256 +colors (SCREEN 13 in QBasic) and sets up a grayscale color +palette. Each color index from 0 to 63 is assigned a shade of gray, +creating a smooth gradient. +

+ +

+The program generates the texture by iterating over each pixel on the +screen. For each pixel, it calculates a color value based on the color +of the pixel directly above it, adding a small amount of random +noise. This creates a smooth transition between pixels with controlled +randomness, mimicking the fibrous texture of paper. +

+

Old paper.png Source code

-
' Program to render surface resembling old paper.
-'
-' This program is free software: released under Creative Commons Zero (CC0) license
-' by Svjatoslav Agejenko.
-' Email: svjatoslav@svjatoslav.eu
-' Homepage: http://www.svjatoslav.eu
-'
-' Changelog:
-' 2003, Initial version
-' 2025, Improved program readability
-
-DEFINT A-Z
-SCREEN 13
-RANDOMIZE TIMER
-
-' Initialize the color palette to grayscale. Each color index from 0 to 63 has R, G, B values equal to the index,
-' creating a smooth grayscale gradient for the 256-color mode.
-FOR paletteIndex = 0 TO 63
-    OUT &H3C8, paletteIndex
-    OUT &H3C9, paletteIndex  ' Set red component
-    OUT &H3C9, paletteIndex  ' Set green component
-    OUT &H3C9, paletteIndex  ' Set blue component
-NEXT paletteIndex
+
' Program to render surface resembling old paper.
+'
+' This program is free software: released under Creative Commons Zero (CC0) license
+' by Svjatoslav Agejenko.
+' Email: svjatoslav@svjatoslav.eu
+' Homepage: http://www.svjatoslav.eu
+'
+' Changelog:
+' 2003, Initial version
+' 2025, Improved program readability
+
+DEFINT A-Z
+SCREEN 13
+RANDOMIZE TIMER
+
+' Initialize the color palette to grayscale. Each color index from 0 to 63 has R, G, B values equal to the index,
+' creating a smooth grayscale gradient for the 256-color mode.
+FOR paletteIndex = 0 TO 63
+    OUT &H3C8, paletteIndex
+    OUT &H3C9, paletteIndex  ' Set red component
+    OUT &H3C9, paletteIndex  ' Set green component
+    OUT &H3C9, paletteIndex  ' Set blue component
+NEXT paletteIndex
 
 noiseOffset = 0
 
-' Generate a paper-like surface by averaging the color of the pixel above with some randomness.
-' This creates a procedural texture that mimics the roughness of paper.
-FOR y = 1 TO 190
-    FOR x = 1 TO 310
+' Generate a paper-like surface by averaging the color of the pixel above with some randomness.
+' This creates a procedural texture that mimics the roughness of paper.
+FOR y = 1 TO 190
+    FOR x = 1 TO 310
         stepCounter = stepCounter + 1
 
-        ' Approximately every 10 steps, introduce a new random noise offset to create variation in the pattern.
-        ' This prevents the surface from becoming too uniform.
-        IF stepCounter > 10 THEN
-            noiseOffset = RND * currentColor / 20
-            stepCounter = stepCounter - (RND * 20 + 10)
-        END IF
+        ' Approximately every 10 steps, introduce a new random noise offset to create variation in the pattern.
+        ' This prevents the surface from becoming too uniform.
+        IF stepCounter > 10 THEN
+            noiseOffset = RND * currentColor / 20
+            stepCounter = stepCounter - (RND * 20 + 10)
+        END IF
 
-        ' Get the color of the pixel directly above the current position.
-        topColor = POINT(x, y - 1)
+        ' Get the color of the pixel directly above the current position.
+        topColor = POINT(x, y - 1)
 
-        ' Calculate the current color as the average of the top color and the previous current color,
-        ' plus a small random noise and minus the noise offset. This creates a smooth transition with
-        ' controlled randomness.
-        currentColor = (topColor + currentColor) \ 2 + ((RND * 2) - noiseOffset)
+        ' Calculate the current color as the average of the top color and the previous current color,
+        ' plus a small random noise and minus the noise offset. This creates a smooth transition with
+        ' controlled randomness.
+        currentColor = (topColor + currentColor) \ 2 + ((RND * 2) - noiseOffset)
 
-        ' Clamp the color value to stay within the valid palette range (0 to 63).
-        IF currentColor < 0 THEN currentColor = 0
-        IF currentColor > 63 THEN currentColor = 63
+        ' Clamp the color value to stay within the valid palette range (0 to 63).
+        IF currentColor < 0 THEN currentColor = 0
+        IF currentColor > 63 THEN currentColor = 63
 
-        ' Plot the current pixel at (x-1, y) using the calculated color.
-        PSET (x - 1, y), currentColor
-    NEXT x
+        ' Plot the current pixel at (x-1, y) using the calculated color.
+        PSET (x - 1, y), currentColor
+    NEXT x
 
-    ' Set the starting color for the next row to the last calculated color of the current row.
-    ' This ensures continuity between rows.
-    PSET (0, y + 1), currentColor
-NEXT y
+    ' Set the starting color for the next row to the last calculated color of the current row.
+    ' This ensures continuity between rows.
+    PSET (0, y + 1), currentColor
+NEXT y
 
-' Wait for a single key press before exiting the program.
-inputKey$ = INPUT$(1)
+' Wait for a single key press before exiting the program.
+inputKey$ = INPUT$(1)
 
-SYSTEM
+SYSTEM
 
-
-

4. Wood

+
+

4. Wood

+

+This QBasic program creates a visually appealing simulation of a wood +surface. It is designed to generate a realistic wood grain texture +using simple graphical techniques. +

+

Wood.png Source code

-
' Program to render surface resembling wood.
-'
-' This program is free software: released under Creative Commons Zero (CC0) license
-' by Svjatoslav Agejenko.
-' Email: svjatoslav@svjatoslav.eu
-' Homepage: http://www.svjatoslav.eu
-'
-' Changelog:
-' 2003.12, Initial version
-' 2024 - 2025, Improved program readability
-
-DECLARE SUB DrawWoodSurface (woodX%, woodY%)
-DECLARE SUB DrawPaper (xPos%, y1Pos%)
-DEFINT A-Z
-SCREEN 12
-RANDOMIZE TIMER
-
-' Set palette colors
-FOR colorIndex = 0 TO 15
-    OUT &H3C8, colorIndex
-    OUT &H3C9, colorIndex * 4
-    OUT &H3C9, colorIndex * 3
-    OUT &H3C9, colorIndex * 0
-NEXT colorIndex
-
-' Main loop to draw wood at random positions
-100:
-woodX = RND * 400 + 200
-woodY = RND * 100 + 200
-CALL DrawWoodSurface(woodX, woodY)
-GOTO 100
-
-' Wait for user input to exit
-exitKey$ = INPUT$(1)
-
-SUB DrawWoodSurface (woodX, woodY)
-    DIM lowerY AS INTEGER
-    DIM phaseOffset AS INTEGER
-    DIM xStepCounter AS INTEGER
-    DIM randomOffset AS INTEGER
-    DIM newColor AS INTEGER
-    DIM upperColor AS INTEGER
-    DIM currentColor AS INTEGER
-
-    ' Draw the outline of the wood
+
' Program to render surface resembling wood.
+'
+' This program is free software: released under Creative Commons Zero (CC0) license
+' by Svjatoslav Agejenko.
+' Email: svjatoslav@svjatoslav.eu
+' Homepage: http://www.svjatoslav.eu
+'
+' Changelog:
+' 2003.12, Initial version
+' 2024 - 2025, Improved program readability
+
+DECLARE SUB DrawWoodSurface (woodX%, woodY%)
+DECLARE SUB DrawPaper (xPos%, y1Pos%)
+DEFINT A-Z
+SCREEN 12
+RANDOMIZE TIMER
+
+' Set palette colors
+FOR colorIndex = 0 TO 15
+    OUT &H3C8, colorIndex
+    OUT &H3C9, colorIndex * 4
+    OUT &H3C9, colorIndex * 3
+    OUT &H3C9, colorIndex * 0
+NEXT colorIndex
+
+' Main loop to draw wood at random positions
+100:
+woodX = RND * 400 + 200
+woodY = RND * 100 + 200
+CALL DrawWoodSurface(woodX, woodY)
+GOTO 100
+
+' Wait for user input to exit
+exitKey$ = INPUT$(1)
+
+SUB DrawWoodSurface (woodX, woodY)
+    DIM lowerY AS INTEGER
+    DIM phaseOffset AS INTEGER
+    DIM xStepCounter AS INTEGER
+    DIM randomOffset AS INTEGER
+    DIM newColor AS INTEGER
+    DIM upperColor AS INTEGER
+    DIM currentColor AS INTEGER
+
+    ' Draw the outline of the wood
     lowerY = woodY + 1
-    LINE (0, 0)-(woodX, woodY), 0, BF  ' Black background
-    LINE (5, 5)-(woodX - 5, lowerY - 5), 8, BF  ' Gray wood outline
-    LINE (10, 10)-(woodX - 10, lowerY - 10), 15, BF  ' White inner highlight
+    LINE (0, 0)-(woodX, woodY), 0, BF  ' Black background
+    LINE (5, 5)-(woodX - 5, lowerY - 5), 8, BF  ' Gray wood outline
+    LINE (10, 10)-(woodX - 10, lowerY - 10), 15, BF  ' White inner highlight
 
-    ' Initialize random phase offset for color variation
-    phaseOffset = RND * 300
+    ' Initialize random phase offset for color variation
+    phaseOffset = RND * 300
 
-    ' Draw the wood texture
-    FOR y = woodY - 1 TO 0 STEP -1
-        FOR x = woodX - 1 TO 0 STEP -1
+    ' Draw the wood texture
+    FOR y = woodY - 1 TO 0 STEP -1
+        FOR x = woodX - 1 TO 0 STEP -1
             xStepCounter = xStepCounter + 1
-            IF xStepCounter > woodX THEN
-                randomOffset = RND * 13  ' Small random noise for texture variation
-                xStepCounter = SIN((y + phaseOffset) / 100) * woodX  ' Sine wave to create wavy grain pattern
-            END IF
-            upperColor = POINT(x, y + 1)  ' Get color from upper pixel
-            currentColor = POINT(x, y)    ' Get color from current pixel
-            newColor = (upperColor * 2 + currentColor + newColor * 3 + randomOffset) / 7 + RND * 1
-
-            ' Ensure color value is within the valid range (0-15)
-            IF newColor < 0 THEN newColor = 0
-            IF newColor > 15 THEN newColor = 15
-
-            ' Set the pixel color for the wood texture
-            PSET (x + 1, y), newColor
-        NEXT x
-    NEXT y
-
-END SUB
+            IF xStepCounter > woodX THEN
+                randomOffset = RND * 13  ' Small random noise for texture variation
+                xStepCounter = SIN((y + phaseOffset) / 100) * woodX  ' Sine wave to create wavy grain pattern
+            END IF
+            upperColor = POINT(x, y + 1)  ' Get color from upper pixel
+            currentColor = POINT(x, y)    ' Get color from current pixel
+            newColor = (upperColor * 2 + currentColor + newColor * 3 + randomOffset) / 7 + RND * 1
+
+            ' Ensure color value is within the valid range (0-15)
+            IF newColor < 0 THEN newColor = 0
+            IF newColor > 15 THEN newColor = 15
+
+            ' Set the pixel color for the wood texture
+            PSET (x + 1, y), newColor
+        NEXT x
+    NEXT y
+
+END SUB
 
-
-

5. Yellow flame

+
+

5. Yellow flame

+

+"Yellow Flame" is a visually captivating program written in QBasic +that generates a dynamic flame-like pattern on the screen. +

+ +

+Program initializes the color palette using sine waves to create a +smooth gradient of colors. This gradient is essential for the flame +effect. +

+ +

+The core of the program involves generating a surface pattern that +mimics a flame. It does this by iterating over each pixel on the +screen and calculating the average color of the surrounding pixels. A +small amount of randomness is added to this average to create a +natural, flickering effect. +

+

Yellow flame.png Source code

-
' Yellow flame.
-'
-' This program is free software: released under Creative Commons Zero (CC0) license
-' by Svjatoslav Agejenko.
-' Email: svjatoslav@svjatoslav.eu
-' Homepage: http://www.svjatoslav.eu
-'
-' Changelog:
-' 2003.12, Initial version
-' 2024.08, Improved program readability
-
-
-DEFINT A-Z ' Define all variables as integers
-SCREEN 13 ' Set graphics mode to 320x200 with 256 colors
-RANDOMIZE TIMER ' Seed the random number generator
-
-' Initialize palette registers with sine wave colors
-FOR paletteIndex = 0 TO 255
-    OUT &H3C8, paletteIndex
-    OUT &H3C9, INT(SIN(paletteIndex / 21) * 30 + 30)
-    OUT &H3C9, INT(SIN(paletteIndex / 34) * 30 + 30)
-    OUT &H3C9, INT(SIN(paletteIndex / 10) * 30 + 30)
-NEXT paletteIndex
-
-' Generate the surface pattern
-FOR y = 1 TO 199
-    FOR x = 1 TO 319
-        prevPixel = POINT(x, y - 1)
-        leftPixel = POINT(x - 1, y)
-        diagPixel = POINT(x - 1, y - 1)
-        left2Pixel = POINT(x - 2, y)
-
-        ' Calculate the average of surrounding pixels and add some randomness
-        newColor = (prevPixel + leftPixel + diagPixel + left2Pixel) \ 4 + (RND * 5 - 2)
-
-        ' Clamp the color value within the valid range
-        IF newColor < 0 THEN newColor = 0
-        IF newColor > 63 THEN newColor = 63
-
-        ' Set the pixel with the calculated color
-        PSET (x, y), newColor
-    NEXT x
-NEXT y
-
-' Wait for user input to exit
-userInput$ = INPUT$(1)
+
' Yellow flame.
+'
+' This program is free software: released under Creative Commons Zero (CC0) license
+' by Svjatoslav Agejenko.
+' Email: svjatoslav@svjatoslav.eu
+' Homepage: http://www.svjatoslav.eu
+'
+' Changelog:
+' 2003.12, Initial version
+' 2024.08, Improved program readability
+
+
+DEFINT A-Z ' Define all variables as integers
+SCREEN 13 ' Set graphics mode to 320x200 with 256 colors
+RANDOMIZE TIMER ' Seed the random number generator
+
+' Initialize palette registers with sine wave colors
+FOR paletteIndex = 0 TO 255
+    OUT &H3C8, paletteIndex
+    OUT &H3C9, INT(SIN(paletteIndex / 21) * 30 + 30)
+    OUT &H3C9, INT(SIN(paletteIndex / 34) * 30 + 30)
+    OUT &H3C9, INT(SIN(paletteIndex / 10) * 30 + 30)
+NEXT paletteIndex
+
+' Generate the surface pattern
+FOR y = 1 TO 199
+    FOR x = 1 TO 319
+        prevPixel = POINT(x, y - 1)
+        leftPixel = POINT(x - 1, y)
+        diagPixel = POINT(x - 1, y - 1)
+        left2Pixel = POINT(x - 2, y)
+
+        ' Calculate the average of surrounding pixels and add some randomness
+        newColor = (prevPixel + leftPixel + diagPixel + left2Pixel) \ 4 + (RND * 5 - 2)
+
+        ' Clamp the color value within the valid range
+        IF newColor < 0 THEN newColor = 0
+        IF newColor > 63 THEN newColor = 63
+
+        ' Set the pixel with the calculated color
+        PSET (x, y), newColor
+    NEXT x
+NEXT y
+
+' Wait for user input to exit
+userInput$ = INPUT$(1)
 
-

Created: 2025-07-28 ma 18:32

+

Created: 2025-07-29 ti 02:13

Validate

diff --git a/2D GFX/Textures/index.org b/2D GFX/Textures/index.org index 46e4c6c..3db1dc5 100644 --- a/2D GFX/Textures/index.org +++ b/2D GFX/Textures/index.org @@ -1,4 +1,4 @@ -#+TITLE: Fractals +#+TITLE: Algorithmic textures #+LANGUAGE: en #+LATEX_HEADER: \usepackage[margin=1.0in]{geometry} #+LATEX_HEADER: \usepackage{parskip} @@ -24,6 +24,26 @@ #+end_export * Circular waves + +This QBasic program creates visually captivating circular wave +patterns by manipulating pixel colors based on sine function +calculations. It's a simple yet effective demonstration of how +mathematical functions can be used to generate complex visual +patterns. + +The program uses two nested loops to iterate over each pixel on the +screen. The outer loop handles the vertical axis (y-coordinate), and +the inner loop handles the horizontal axis (x-coordinate). + +For each pixel, the program calculates a sine value based on the +squared distance from the origin (0,0). This calculation involves the +formula: + +: colorvalue = SIN((x^2 + y^2) / 10) * 10 + +This program is a blend of mathematics and art, showcasing how simple +algorithms can produce intricate and visually appealing results. + #+attr_html: :class responsive-img #+attr_latex: :width 1000px [[file:Circular waves.png]] @@ -32,6 +52,12 @@ #+INCLUDE: "Circular waves.bas" src basic-qb45 * Diamond square clouds + +This QBasic program demonstrates the Diamond-Square algorithm, a +method used to generate fractal terrain or cloud surfaces. The +algorithm is particularly useful for creating realistic landscapes or +textures in computer graphics. + #+attr_html: :class responsive-img #+attr_latex: :width 1000px [[file:Diamond square clouds.png]] @@ -40,6 +66,21 @@ #+INCLUDE: "Diamond square clouds.bas" src basic-qb45 * Old paper + +This QBasic program generates a procedural texture that simulates the +appearance of old paper. + +The program initializes the screen to a 320x200 resolution with 256 +colors (SCREEN 13 in QBasic) and sets up a grayscale color +palette. Each color index from 0 to 63 is assigned a shade of gray, +creating a smooth gradient. + +The program generates the texture by iterating over each pixel on the +screen. For each pixel, it calculates a color value based on the color +of the pixel directly above it, adding a small amount of random +noise. This creates a smooth transition between pixels with controlled +randomness, mimicking the fibrous texture of paper. + #+attr_html: :class responsive-img #+attr_latex: :width 1000px [[file:Old paper.png]] @@ -48,6 +89,11 @@ #+INCLUDE: "Old paper.bas" src basic-qb45 * Wood + +This QBasic program creates a visually appealing simulation of a wood +surface. It is designed to generate a realistic wood grain texture +using simple graphical techniques. + #+attr_html: :class responsive-img #+attr_latex: :width 1000px [[file:Wood.png]] @@ -56,6 +102,20 @@ #+INCLUDE: "Wood.bas" src basic-qb45 * Yellow flame + +"Yellow Flame" is a visually captivating program written in QBasic +that generates a dynamic flame-like pattern on the screen. + +Program initializes the color palette using sine waves to create a +smooth gradient of colors. This gradient is essential for the flame +effect. + +The core of the program involves generating a surface pattern that +mimics a flame. It does this by iterating over each pixel on the +screen and calculating the average color of the surrounding pixels. A +small amount of randomness is added to this average to create a +natural, flickering effect. + #+attr_html: :class responsive-img #+attr_latex: :width 1000px [[file:Yellow flame.png]] diff --git a/3D GFX/3D Synthezier/doc/index.html b/3D GFX/3D Synthezier/doc/index.html index 2fac5ab..47264a5 100644 --- a/3D GFX/3D Synthezier/doc/index.html +++ b/3D GFX/3D Synthezier/doc/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + 3D Synthezier @@ -1103,39 +1103,39 @@ hsAddReviewPanels();

Table of Contents

@@ -1157,8 +1157,8 @@ hsAddReviewPanels(); -
-

1. Operating principle

+
+

1. Operating principle

Parses scene definition language and creates 3D world based on @@ -1221,60 +1221,60 @@ They were produced by importing generated -

1.1. Rectangular city

+
+

1.1. Rectangular city

-
+

rectangular city, 1.jpeg

-
+

rectangular city, 2.jpeg

-
+

rectangular city, 3.jpeg

-
-

1.2. Hexagonal city

+
+

1.2. Hexagonal city

-
+

hexagonal city, 1.jpeg

-
+

hexagonal city, 2.jpeg

-
+

hexagonal city, 3.jpeg

-
-

2. Scene description language

+
+

2. Scene description language

See also examples.

-
-

2.1. here

+
+

2.1. here

 here
@@ -1285,8 +1285,8 @@ defines new segment
 

-
-

2.2. p

+
+

2.2. p

 p  x y z
@@ -1297,8 +1297,8 @@ defines new point
 

-
-

2.3. f

+
+

2.3. f

 f  p1 p2 p3 p4
@@ -1309,8 +1309,8 @@ defines new polygon,  p4  may be unused
 

-
-

2.4. warn

+
+

2.4. warn

 warn  <message>
@@ -1321,8 +1321,8 @@ displays warning message, and wait for key
 

-
-

2.5. end

+
+

2.5. end

 end
@@ -1333,8 +1333,8 @@ terminates parser
 

-
-

2.6. mtl

+
+

2.6. mtl

 mtl  material
@@ -1345,8 +1345,8 @@ selects material
 

-
-

2.7. mtlrnd

+
+

2.7. mtlrnd

 mtlrnd  material ...
@@ -1357,8 +1357,8 @@ selects random material from list
 

-
-

2.8. obj

+
+

2.8. obj

 obj  object xz45 xy20 x+3 y*2
@@ -1373,14 +1373,14 @@ directly from file, and not chached, to allow loading of greater than
 

-
+

rotation.png

-
-

2.9. rnd

+
+

2.9. rnd

 rnd  p^1^2^3 p^7^2^1
@@ -1391,8 +1391,8 @@ select random command to execute, ^ will be converted to spaces.
 

-
-

2.10. #

+
+

2.10. #

 # whatever text
@@ -1403,8 +1403,8 @@ comment
 

-
-

2.11. out

+
+

2.11. out

 out  file
@@ -1415,8 +1415,8 @@ specify output file name, must be first command
 

-
-

2.12. set

+
+

2.12. set

 set  variable  contents
@@ -1428,8 +1428,8 @@ string. max variables is 100. first is 0.
 

-
-

2.13. variables usage

+
+

2.13. variables usage

 anycommand %1 anything
@@ -1440,8 +1440,8 @@ inserts variable 1 contents info line
 

-
-

2.14. cmp

+
+

2.14. cmp

 cmp  flag string1 string2
@@ -1452,8 +1452,8 @@ compares strings, and inserts TRUE to flag, if they are equal, else inserts FALS
 

-
-

2.15. ?

+
+

2.15. ?

 ?flag anycommand
@@ -1468,8 +1468,8 @@ exapmle: ?3 obj car z*2 xy45
 

-
-

2.16. dum

+
+

2.16. dum

 dum
@@ -1482,16 +1482,16 @@ dummy function, does notheing
 
-
-

3. Installation

+
+

3. Installation

Edit bin/3dparse.bas file and update include path in there.

-
-

3.1. System requirements

+
+

3.1. System requirements

@@ -1522,8 +1522,8 @@ Edit bin/3dparse.bas file and update include path in there. -
-

3.2. Directory layout

+
+

3.2. Directory layout

bin
@@ -1540,8 +1540,8 @@ Edit bin/3dparse.bas file and update include path in there.
-
-

4. Usage

+
+

4. Usage

Make sure you have QB binaries in your PATH. Execute @@ -1566,7 +1566,7 @@ Visualize scene with your favourite renderer.

-

Created: 2025-07-28 ma 18:33

+

Created: 2025-07-29 ti 00:25

Validate

diff --git a/3D GFX/Miscellaneous/index.html b/3D GFX/Miscellaneous/index.html index 8148ab3..240ec9a 100644 --- a/3D GFX/Miscellaneous/index.html +++ b/3D GFX/Miscellaneous/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Miscellaneous 3D graphics demos @@ -210,14 +210,14 @@

Table of Contents

@@ -238,8 +238,8 @@ } -
-

1. Rotating exclamation mark

+
+

1. Rotating exclamation mark

Wireframe 3D model of a rotating exclamation mark. @@ -259,8 +259,8 @@ Wireframe 3D model of a rotating exclamation mark.

-
-

2. 3D bouncing ball

+
+

2. 3D bouncing ball

3D ball made of point cloud. @@ -280,8 +280,8 @@ Wireframe 3D model of a rotating exclamation mark.

-
-

3. 3D text in a room

+
+

3. 3D text in a room

Wireframe 3D text hanging in a wireframe 3D room. User can look and @@ -302,8 +302,8 @@ fly around in all directions.

-
-

4. 3D bouncing cubes on grid floor

+
+

4. 3D bouncing cubes on grid floor

3D wireframe cubes bouncing on a grid floor, creating an immersive and @@ -324,8 +324,8 @@ dynamic visual effect.

-
-

5. Matrix math for rotation in 3D space

+
+

5. Matrix math for rotation in 3D space

Instead of combining simple 2D rotors, pixels in this 3D space are @@ -346,15 +346,15 @@ rotated by using matrix multiplications.

-
-

6. Maze explorer

+
+

6. Maze explorer

TODO: add description

-
+

Maze%20explorer.png

@@ -365,8 +365,8 @@ TODO: add description
-
-

7. Tank animation

+
+

7. Tank animation

Animated tank driving through the bridge back and forward. User can @@ -387,8 +387,8 @@ look and fly around in all directions.

-
-

8. Tiled room

+
+

8. Tiled room

Room with some tiles on the wall and on the floor. User can freely fly @@ -409,7 +409,7 @@ around.

-

Created: 2025-07-28 ma 18:33

+

Created: 2025-07-29 ti 00:25

Validate

diff --git a/3D GFX/Miscellaneous/index.org b/3D GFX/Miscellaneous/index.org index 3eb03a3..f8d5367 100644 --- a/3D GFX/Miscellaneous/index.org +++ b/3D GFX/Miscellaneous/index.org @@ -41,10 +41,11 @@ Wireframe 3D model of a rotating exclamation mark. [[file:!.bas][Source code]] - * 3D bouncing ball -3D ball made of point cloud. +This QBasic program creates a visually engaging 3D animation of a +point-cloud ball bouncing around the screen. The program is an example +of early computer graphics techniques. #+begin_export html
@@ -57,7 +58,6 @@ Wireframe 3D model of a rotating exclamation mark. [[file:3D%20ball.bas][Source code]] - * 3D text in a room Wireframe 3D text hanging in a wireframe 3D room. User can look and @@ -74,7 +74,6 @@ fly around in all directions. [[file:3D%20text.bas][Source code]] - * 3D bouncing cubes on grid floor 3D wireframe cubes bouncing on a grid floor, creating an immersive and @@ -91,7 +90,6 @@ dynamic visual effect. [[file:3D%20GFX/Bouncing%20cubes.bas][Source code]] - * Matrix math for rotation in 3D space Instead of combining simple 2D rotors, pixels in this 3D space are @@ -108,10 +106,13 @@ rotated by using matrix multiplications. [[file:Matrix%20math.bas][Source code]] - * Maze explorer -TODO: add description +The Evolving 3D Maze Explorer is a QBasic program that generates and +navigates through a dynamically evolving 3D maze. This program is an +excellent example of early 3D graphics programming and provides an +interactive experience where users can explore a maze that grows and +changes as they navigate through it. #+attr_html: :class responsive-img #+attr_latex: :width 1000px @@ -135,7 +136,6 @@ look and fly around in all directions. [[file:Tank.bas][Source code]] - * Tiled room Room with some tiles on the wall and on the floor. User can freely fly diff --git a/3D GFX/Space/index.html b/3D GFX/Space/index.html index 6f03a32..17ca24a 100644 --- a/3D GFX/Space/index.html +++ b/3D GFX/Space/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Space themed 3D graphics @@ -210,10 +210,10 @@

Table of Contents

@@ -234,15 +234,15 @@ } -
-

1. Galaxy explorer

+
+

1. Galaxy explorer

TODO: add description

-
+

Galaxy%20explorer.png

@@ -254,8 +254,8 @@ TODO: add description
-
-

2. Rocket simulator

+
+

2. Rocket simulator

TODO: add description @@ -275,8 +275,8 @@ TODO: add description

-
-

3. Stars

+
+

3. Stars

TODO: add description @@ -295,27 +295,27 @@ TODO: add description

-
-

4. Universe explorer

+
+

4. Universe explorer

TODO: add description

-
+

1.png

-
+

2.png

-
+

3.png

@@ -327,7 +327,7 @@ TODO: add description
-

Created: 2025-07-28 ma 18:33

+

Created: 2025-07-29 ti 00:25

Validate

diff --git a/3D GFX/Space/index.org b/3D GFX/Space/index.org index 8f0b931..722a55d 100644 --- a/3D GFX/Space/index.org +++ b/3D GFX/Space/index.org @@ -28,7 +28,10 @@ * Galaxy explorer -TODO: add description +This QBasic program renders a navigable 3D point cloud galaxy, +allowing users to explore a virtual galaxy using mouse or keyboard +controls. The program creates a visually engaging simulation of a +galaxy with stars distributed in a spiral pattern. #+attr_html: :class responsive-img #+attr_latex: :width 1000px @@ -36,10 +39,12 @@ TODO: add description [[file:!.bas][Source code]] - * Rocket simulator -TODO: add description +QBasic program that simulates the takeoff and flight of a rocket from +the surface of a planet. This program provides a simple yet engaging +3D visualization of a rocket's journey, allowing users to navigate and +observe the rocket's trajectory from various angles. #+begin_export html
@@ -52,10 +57,26 @@ TODO: add description [[file:Rocket simulator.bas][Source code]] - * Stars -TODO: add description +The 3D Starfield Simulation is a QBasic program that creates a +visually captivating simulation of a starfield in three +dimensions. This program is designed to render stars moving in space, +giving the illusion of flying through a galaxy. + +How the Program Works: + +- Camera Rotation :: The camera's rotation is calculated to give a + dynamic view of the starfield. +- Star Movement :: Each star's position is updated to simulate + movement through space. Stars that get too close to the viewer are + repositioned to the far distance to create an infinite starfield + effect. +- Projection :: The 3D coordinates of each star are projected onto a + 2D screen using perspective projection, which scales the stars based + on their distance from the viewer. +- Brightness and Color :: The brightness of each star is adjusted + based on its distance, with closer stars appearing brighter. #+begin_export html
@@ -70,7 +91,33 @@ TODO: add description * Universe explorer -TODO: add description +This QBasic program that simulates a navigable 3D universe. Users can +freely fly through a dynamically generated universe composed of galaxy +clusters, galaxies, and stars. The program employs a clever algorithm +to manage the level of detail, dynamically increasing or decreasing +the complexity of the universe regions based on the user's +position. This ensures a reasonable quantity of stars is rendered at +any given time, optimizing performance and visual experience. + +What's in it for the Reader? + +- Algorithm Insight :: The program provides a practical example of + dynamic level-of-detail algorithms, which can be useful for anyone + interested in computer graphics, game development, or simulation + programming. + +- 3D Navigation :: It demonstrates how to implement a 3D navigation + system using basic input devices like a mouse and keyboard, offering + insights into handling user inputs for movement and interaction in a + 3D space. + +- Procedural Generation :: The universe is procedurally generated, + showcasing how to create complex structures like galaxies and star + systems algorithmically. + +- Performance Optimization :: The program highlights techniques for + optimizing performance in resource-intensive applications, such as + limiting the number of rendered objects based on distance. #+attr_html: :class responsive-img #+attr_latex: :width 1000px diff --git a/index.org b/index.org index 23d6d7d..d5d88a8 100644 --- a/index.org +++ b/index.org @@ -87,7 +87,9 @@ screen. Every iteration built upon previous result. ** Miscellaneous *** Hello friend -TODO: description goes here ... +This QBasic program is a simple yet engaging demonstration of 2D +graphics capabilities. It showcases various graphical techniques such +as pixel manipulation, geometric shapes, and simple animations. #+attr_html: :class responsive-img #+attr_latex: :width 1000px @@ -99,7 +101,8 @@ TODO: description goes here ... *** People -TODO: description goes here ... +This QBasic program is a slideshow presentation tool that includes +animated transitions and effects. #+begin_export html
@@ -114,7 +117,11 @@ TODO: description goes here ... *** Stroboscope -TODO: description goes here ... +This QBasic program is an educational presentation on how to build a +stroboscope. It uses graphical animations and text to illustrate the +schematics involved in constructing a stroboscope. The program is +designed to be visually engaging, with animated transitions and +diagrams. #+attr_html: :class responsive-img #+attr_latex: :width 1000px @@ -124,7 +131,11 @@ TODO: description goes here ... *** Truncated cone -TODO: description goes here ... +This QBasic program is designed to draw a 3D representation of a +truncated cone, which consists of three main parts: a top cylinder +with diagonal hatching, a middle frustum (truncated cone), and a +bottom smaller cylinder. The primary goal of this program is to test +the viability of generating images of 3D shapes using code. #+attr_html: :class responsive-img #+attr_latex: :width 1000px @@ -269,7 +280,12 @@ editor. ** Checkers -TODO: add description +This program is implementation of the game of Checkers, written in +QBasic. It provides a mostly functional two-player experience on a +10x10 grid, where players can move and capture pieces according to the +traditional rules of Checkers. User is playing against AI. AI is quite +primitive. It has many hard-coded patterns that it tries to detect and +utilize when possible. [[file:Games/checkers.bas][Source code]] @@ -279,15 +295,16 @@ TODO: add description ** Checkers 2 -Play checkers against the computer with any board size and any amount -of caps. Does thinking by recursively testing many possible scenarios -with any depth. +This more advanced implementation of checkers. User can play checkers +against the AI. AI does not have hard-coded patterns anymore. Instead +it does recursive lookahead for possible own moves and following +possible opponent moves up to determined cut-off depth. While +crunching through all possible moves (up-to fixed depth), it chooses +the best possible move for itself. -Since it is slow QBasic implementation, it isn't practical to play -with many caps or big thinking depth, for reasonable responce time. - - -TODO: add description +Board size is reduced to 6x6 grid to gain reasonable AI +performance. Possible combinations count exponentially explodes with +larder board size. [[file:Games/checkers2.bas][Source code]] @@ -301,6 +318,21 @@ TODO: add description :END: ** Game of life animation +This QBasic program creates a visually engaging 3D animation that +combines elements of cellular automata with dynamic graphics. The +program simulates a rotating 3D scene composed of cubes that appear +and disappear according to Conway's Game of Life rules. This classic +algorithm models the life cycles of cells on a grid, where each cell +can live, die, or reproduce based on its neighbors. + +The Game of Life is a zero-player game, meaning that its evolution is +determined by its initial state, requiring no further input. + +The main loop of the program continuously updates the camera position +and rotation angles, generating a dynamic view of the 3D scene. Cubes +are drawn based on the current state of the Game of Life grid, and the +scene is rendered frame by frame. + #+begin_export html