Proggies
#31
Kaleidoscope
Code: (Select All)
_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


Attached Files Image(s)
               
b = b + ...
Reply


Messages In This Thread
Proggies - by bplus - 04-24-2022, 04:02 PM
RE: Proggies - by bplus - 04-26-2022, 03:23 PM
RE: Proggies - by bplus - 04-26-2022, 04:24 PM
RE: Proggies - by bplus - 05-01-2022, 12:10 AM
RE: Proggies - by dcromley - 05-01-2022, 04:00 AM
RE: Proggies - by bplus - 05-01-2022, 02:52 PM
RE: Proggies - by bplus - 05-01-2022, 02:56 PM
RE: Proggies - by bplus - 05-01-2022, 08:05 PM
RE: Proggies - by bplus - 05-03-2022, 01:43 AM
RE: Proggies - by vince - 05-03-2022, 02:13 AM
RE: Proggies - by bplus - 05-03-2022, 02:16 AM
RE: Proggies - by bplus - 05-08-2022, 02:13 AM
RE: Proggies - by OldMoses - 05-08-2022, 12:40 PM
RE: Proggies - by bplus - 05-08-2022, 03:16 PM
RE: Proggies - by bplus - 05-16-2022, 12:21 AM
RE: Proggies - by bplus - 05-16-2022, 12:58 AM
RE: Proggies - by PhilOfPerth - 05-16-2022, 01:40 AM
RE: Proggies - by bplus - 05-16-2022, 01:28 AM
RE: Proggies - by SMcNeill - 05-16-2022, 12:49 PM
RE: Proggies - by bplus - 05-16-2022, 02:44 PM
RE: Proggies - by bplus - 05-17-2022, 11:16 PM
RE: Proggies - by vince - 05-25-2022, 05:08 AM
RE: Proggies - by bplus - 05-17-2022, 11:23 PM
RE: Proggies - by bplus - 05-17-2022, 11:42 PM
RE: Proggies - by bplus - 05-18-2022, 01:14 AM
RE: Proggies - by bplus - 05-19-2022, 06:43 PM
RE: Proggies - by bplus - 05-20-2022, 01:52 AM
RE: Proggies - by SierraKen - 05-20-2022, 03:44 AM
RE: Proggies - by bplus - 05-20-2022, 07:59 PM
RE: Proggies - by bplus - 05-20-2022, 08:34 PM
RE: Proggies - by Dav - 05-21-2022, 12:48 AM
RE: Proggies - by bplus - 05-25-2022, 12:47 AM
RE: Proggies - by bplus - 05-29-2022, 11:32 PM
RE: Proggies - by bplus - 05-30-2022, 01:41 PM
RE: Proggies - by bplus - 06-04-2022, 10:01 PM
RE: Proggies - by triggered - 06-05-2022, 03:44 AM
RE: Proggies - by bplus - 06-05-2022, 03:03 PM
RE: Proggies - by bplus - 06-06-2022, 08:04 PM
RE: Proggies - by bplus - 06-07-2022, 02:18 AM
RE: Proggies - by dbox - 03-03-2023, 09:14 PM
RE: Proggies - by bplus - 06-07-2022, 10:51 AM
RE: Proggies - by SierraKen - 06-09-2022, 07:04 PM
RE: Proggies - by bplus - 06-09-2022, 10:40 PM
RE: Proggies - by bplus - 06-22-2022, 02:59 PM
RE: Proggies - by vince - 06-23-2022, 08:04 PM
RE: Proggies - by SierraKen - 06-24-2022, 06:28 PM
RE: Proggies - by bplus - 07-13-2022, 06:19 PM
RE: Proggies - by bplus - 07-17-2022, 11:38 PM
RE: Proggies - by bplus - 07-19-2022, 07:16 PM
RE: Proggies - by vince - 07-22-2022, 10:40 PM
RE: Proggies - by dbox - 07-23-2022, 12:47 AM
RE: Proggies - by SierraKen - 07-23-2022, 05:16 PM
RE: Proggies - by bplus - 07-24-2022, 04:16 PM
RE: Proggies - by dbox - 07-24-2022, 11:33 PM
RE: Proggies - by SierraKen - 07-24-2022, 11:38 PM
RE: Proggies - by bplus - 09-19-2022, 07:16 PM
RE: Proggies - by bplus - 09-20-2022, 03:42 PM
RE: Proggies - by James D Jarvis - 09-21-2022, 12:22 PM
RE: Proggies - by bplus - 09-21-2022, 02:39 PM
RE: Proggies - by mnrvovrfc - 09-24-2022, 03:25 AM
RE: Proggies - by James D Jarvis - 09-21-2022, 02:55 PM
RE: Proggies - by bplus - 09-21-2022, 03:46 PM
RE: Proggies - by James D Jarvis - 09-21-2022, 05:46 PM
RE: Proggies - by bplus - 09-21-2022, 06:29 PM
RE: Proggies - by bplus - 10-09-2022, 08:17 PM
RE: Proggies - by vince - 10-09-2022, 09:20 PM
RE: Proggies - by bplus - 10-10-2022, 01:52 PM
RE: Proggies - by vince - 10-10-2022, 04:20 PM
RE: Proggies - by bplus - 10-18-2022, 02:54 PM
RE: Proggies - by bplus - 01-16-2023, 03:53 PM
RE: Proggies - by bplus - 01-16-2023, 03:59 PM
RE: Proggies - by bplus - 01-16-2023, 04:05 PM
RE: Proggies - by bplus - 01-16-2023, 04:09 PM
RE: Proggies - by bplus - 01-16-2023, 04:13 PM
RE: Proggies - by bplus - 01-17-2023, 08:18 PM
RE: Proggies - by bplus - 03-06-2023, 07:04 PM
RE: Proggies - by bplus - 03-24-2023, 02:41 AM
RE: Proggies - by vince - 03-24-2023, 05:22 AM
RE: Proggies - by bplus - 03-24-2023, 05:32 AM
RE: Proggies - by mnrvovrfc - 03-24-2023, 05:54 AM
RE: Proggies - by vince - 04-09-2023, 06:49 AM
RE: Proggies - by bplus - 04-09-2023, 03:05 PM
RE: Proggies - by bplus - 07-23-2023, 12:16 PM
RE: Proggies - by GareBear - 07-23-2023, 05:47 PM
RE: Proggies - by bplus - 07-23-2023, 07:35 PM
RE: Proggies - by bplus - 07-24-2023, 07:04 PM
RE: Proggies - by bplus - 07-24-2023, 07:09 PM
RE: Proggies - by bplus - 08-17-2023, 07:17 AM
RE: Proggies - by johnno56 - 08-17-2023, 10:32 AM
RE: Proggies - by bplus - 08-28-2023, 03:24 PM
RE: Proggies - by Dav - 08-28-2023, 05:28 PM
RE: Proggies - by PhilOfPerth - 08-28-2023, 11:47 PM
RE: Proggies - by johnno56 - 08-29-2023, 07:11 AM
RE: Proggies - by bplus - 08-29-2023, 12:39 PM



Users browsing this thread: 21 Guest(s)