|
Post by bplus on Jan 2, 2023 14:17:11 GMT -5
Like Charlie's in BAM I thought I'd do my own interpretation:
_Title "Bilateral Kaleidoscope" ' 2023-01-02 NOT may 2022 version by b+ Const sh = 600, sw = 800 Screen _NewImage(sw, sh, 32) '_ScreenMove 200, 100 _FullScreen Randomize Timer Do If lc = 0 Then dx1 = 0: dx2 = 0: dy1 = 0: dy2 = 0: dr = 0: dg = 0: db = 0 x1 = sw * Rnd: y1 = sh * Rnd: x2 = sw * Rnd: y2 = sh * Rnd: r = Rnd * 255: g = Rnd * 255: b = Rnd * 255 While dx1 = 0: dx1 = Rnd * 6 - 3: Wend While dx2 = 0: dx2 = Rnd * 6 - 3: Wend While dy1 = 0: dy1 = Rnd * 6 - 3: Wend While dy2 = 0: dy2 = Rnd * 6 - 3: Wend While dr = 0: dr = Rnd * 4 - 2: Wend While dg = 0: dg = Rnd * 4 - 2: Wend While db = 0: db = Rnd * 4 - 2: Wend End If Line (x1, y1)-(x2, y2), _RGB32(r, g, b, 100) Line (sw - x1, y1)-(sw - x2, y2), _RGB32(r, g, b, 100) Line (x1, sh - y1)-(x2, sh - y2), _RGB32(r, g, b, 100) Line (sw - x1, sh - y1)-(sw - x2, sh - y2), _RGB32(r, g, b, 100) x1 = Remainder(x1 + dx1, sw) x2 = Remainder(x2 + dx2, sw) y1 = Remainder(y1 + dy1, sh) y2 = Remainder(y2 + dy2, sh) r = Remainder(r + dr, 255) g = Remainder(g + dr, 255) b = Remainder(b + db, 255) lc = lc + 1 If ((Rnd > .999) And (lc > 300)) Or (lc > 4000) Then Sleep 1: Cls: lc = 0 _Limit 60 Loop Until _KeyDown(27)
Function Remainder (n, d) If d = 0 Then Exit Function Remainder = n - (d) * Int(n / (d)) End Function
|
|
aurel
Full Member
Posts: 233
|
Post by aurel on Jan 3, 2023 1:54:04 GMT -5
Nice Mark as usual ....but .. is really worth to post anything here ?
when recently epizy hosting go down i was thinking to move here but better not...especially because is proboards
|
|
|
Post by bplus on Jan 3, 2023 7:45:07 GMT -5
Best not keep all your eggs in one basket and spread the word too!
|
|
|
Post by bplus on Jan 3, 2023 10:29:47 GMT -5
Here is perfect example. I did this in May 2022 and lost my hard drive 2x's. If not saved at forum I would never have recovered this Gem.
_Title "Kaleidoscope" 'b+ 2022-05-24 ' it so obvious to use maptriangle! Randomize Timer Dim Shared sH, sW, sHd2, sWd2 sH = 700: sW = 700: sHd2 = sH / 2: sWd2 = sW / 2 Screen _NewImage(700, 700, 32) _ScreenMove 290, 0 Do Until _KeyDown(27) If Rnd > .05 Then Line (0, 0)-(sW - 1, sH - 1), _RGB32(0, 0, 0, 10), BF Else Cls n = (n + 1) Mod 66 + 4 If n Mod 2 Then n = n + 1 ReDim px(0 To n - 1), py(0 To n - 1) circleDivN = _Pi(2 / n) For i = 0 To n - 1 px(i) = sWd2 + sHd2 * Cos(i * circleDivN) py(i) = sHd2 + sHd2 * Sin(i * circleDivN) Next For i = 1 To 700 Line (Rnd * sW, Rnd * sH)-Step(Rnd * 5, Rnd * 5), _RGB32(Rnd * 255, Rnd * 255, Rnd * 255), BF Circle (Rnd * sW, Rnd * sH), Rnd * 8 + 2, _RGB32(Rnd * 255, Rnd * 255, Rnd * 255) Next For i = 1 To 30 w = Rnd * 700 Line (sWd2 - w / 2, Rnd * sH)-Step(w, Rnd * 5), _RGB32(Rnd * 255, Rnd * 255, Rnd * 255), BF Next For s = 0 To n - 1 For i = 0 To n - 1 _MapTriangle (sWd2, sHd2)-(px((i + s) Mod n), py((i + s) Mod n))-(px((i + 1 + s) Mod n), py((i + 1 + s) Mod n)), 0 To(sWd2, sHd2)-(px((i + 2 + s) Mod n), py((i + 2 + s) Mod n))-(px((i + 1 + s) Mod n), py((i + 1 + s) Mod n)) Next Next _Display _Limit 2 Loop
|
|
aurel
Full Member
Posts: 233
|
Post by aurel on Jan 4, 2023 2:12:35 GMT -5
OK I agree with you ...
so that is why i tend to put all my programs on github and some on sourceForge
|
|