PicoMiteVGA DEMO


Author Message
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2936
Posted: 08:20am 13 Aug 2025      

After a while this happened:-
[23] Pixel x * rad + xc, y * rad + yc, RGB(cr, cg, cb)
Error : 256 is invalid (valid is 0 to 255)

So added rollovers to the colours.
sh=MM.VRES : sw=MM.HRES
xc = sw / 2 : yc = sh / 2
rad = sh / 40
For j = 1 To 9999
  CLS
  a = Rnd(1)
  If a > 0.86 Then a = a * 0.86
     If a < 0.1 Then a = a + 0.1
  If a = 0.5 Then a = 0.4999
  b = 0.9998
  Print @(5,5) a
  p = 15000
  c = 2 - 2 * a
  x = 0
  y = 12.17
  w = a * x + c * x * x / (1 + x * x)
  For h = 0 To p
   If h > 150 Then
    ct = 1.1 * Sqr(x * x + y * y) / rad
    cr = 83 * ct : If cr >255 Then cr = cr/5
    cg = 177 * ct : If cg >255 Then cg = cg/5
    cb = 186 * ct : If Cb >255 Then cb = cb/5
    cr = cr And 255
    cg = cg And 255
    cb = cb And 255
    Pixel x * rad + xc, y * rad + yc, RGB(cr, cg, cb)
    z = x
    x = b * y + w
    u = x * x
    w = a * x + c * u / (1 + u)
    y = w - z
   End If
  Next h
  Pause 300
Next j

Edited 2025-08-13 18:24 by phil99