Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Schraf Brot Fractal
#5
hello @bplus
I Grok to colorize it but all I got was a black screen, then I asked ChatGPT and it gave me the following working code, but the colors are not great
Code: (Select All)

_Title "Schraf Brot (colorized, per Aurel 2025-06-06)"
w = 1280
h = 720
zoom = 3 / w
dmin = 0.06
Screen _NewImage(w, h, 32): _ScreenMove 0, 0
Cls

For a = 0 To w - 1
    For b = 0 To 1.5 * h
        x = (a - w) * zoom
        y = (b - h) * zoom
        i = 0
        d = 100
        Do
            u = x * x
            v = y * y
            If u + v > 4.8 Or i > 30 Or d < dmin Then
                Exit Do
            End If
            t = u - v
            y = 2 * x * y + 0.156
            x = t - 0.8
            i = i + 1
            n = Abs(u + v - 1)
            If n < d Then d = n
        Loop

        If d < dmin Then
            coul = 255 - Int(4000 * d)
            If coul < 0 Then coul = 0
            If coul > 255 Then coul = 255

            ' Color gradient based on iteration and distance
            red = coul
            green = (i * 8) Mod 256
            blue = 255 - coul

            x1 = a - w / 2
            y1 = b - h / 2
            x2 = w + w / 2 - 1 - a
            y2 = h + h / 2 - b
            Line (x1, y1)-(x1 + 1, y1 + 1), _RGB(red, green, blue)
            Line (x2, y2)-(x2 + 1, y2 + 1), _RGB(red, green, blue)
        End If
    Next b
Next a
End
Reply


Messages In This Thread
Schraf Brot Fractal - by bplus - 06-05-2025, 11:12 PM
RE: Schraf Brot Fractal - by Jack - 06-05-2025, 11:49 PM
RE: Schraf Brot Fractal - by madscijr - 06-06-2025, 02:12 AM
RE: Schraf Brot Fractal - by SierraKen - 06-06-2025, 04:21 AM
RE: Schraf Brot Fractal - by Jack - 06-06-2025, 12:23 PM
RE: Schraf Brot Fractal - by Jack - 06-06-2025, 12:36 PM
RE: Schraf Brot Fractal - by CharlieJV - 06-06-2025, 01:14 PM
RE: Schraf Brot Fractal - by euklides - 06-08-2025, 07:20 AM
RE: Schraf Brot Fractal - by SierraKen - 06-10-2025, 03:51 PM
RE: Schraf Brot Fractal - by SierraKen - 06-10-2025, 04:07 PM
RE: Schraf Brot Fractal - by PhilOfPerth - 06-10-2025, 10:15 PM
RE: Schraf Brot Fractal - by SierraKen - 06-11-2025, 06:32 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pseudo-fractal - interactive version hsiangch_ong 3 886 02-06-2025, 09:20 AM
Last Post: SMcNeill
  Fractal Explorer vince 4 1,349 10-16-2024, 09:08 PM
Last Post: Trial And Terror
  Playing with dragon curve fractal Dav 11 2,483 10-09-2023, 12:23 AM
Last Post: Dav

Forum Jump:


Users browsing this thread: 1 Guest(s)