Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Playing with dragon curve fractal
#8
Wow -- that's a beauty, bplus!  Love it.  Really cool how you calculated the color changing. I had to steal borrow that method for the little  tree thing I was playing with.  Just what was missing.  Added some yellow PSETs for highlights.  Before using your colors my green tree looked like a head of broccoli.  Made the branching go random (RND * 35)  instead of +/- 45 so the tree growth looks a little more natural.

- Dav

Code: (Select All)

Screen _NewImage(800, 600, 32)

tree 400, 600, -90, 100, 0: Sleep

Sub tree (x1, y1, angle, size, depth)
    If depth <= 14 Then
        x2 = x1 + size * Cos(angle * _Pi / 180)
        y2 = y1 + size * Sin(angle * _Pi / 180)
        k& = _RGB32((15 - depth) * 8, 64 + depth * 8, .25 * (15 - depth) * 12, 255 - depth * 18)
        Line (x1, y1)-(x2, y2), k&: PSet (x1, y1), _RGBA(255, 255, 0, Rnd * 75)
        tree x2, y2, angle - (Rnd * 35), size * .8, depth + 1
        tree x2, y2, angle + (Rnd * 35), size * .8, depth + 1
    End If
End Sub

Find my programs here in Dav's QB64 Corner
Reply


Messages In This Thread
Playing with dragon curve fractal - by Dav - 10-06-2023, 06:25 PM
RE: Playing with dragon curve fractal - by bplus - 10-06-2023, 08:41 PM
RE: Playing with dragon curve fractal - by Dav - 10-06-2023, 09:08 PM
RE: Playing with dragon curve fractal - by Dav - 10-07-2023, 02:25 AM
RE: Playing with dragon curve fractal - by bplus - 10-07-2023, 12:05 PM
RE: Playing with dragon curve fractal - by Dav - 10-08-2023, 06:21 PM
RE: Playing with dragon curve fractal - by bplus - 10-08-2023, 06:44 PM
RE: Playing with dragon curve fractal - by Dav - 10-08-2023, 07:00 PM
RE: Playing with dragon curve fractal - by Dav - 10-09-2023, 12:23 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  The Curve statement, an improved Circle 2112 6 685 11-02-2025, 09:45 PM
Last Post: bplus
  Schraf Brot Fractal bplus 11 2,304 06-11-2025, 06:32 PM
Last Post: SierraKen
  Pseudo-fractal - interactive version hsiangch_ong 3 886 02-06-2025, 09:20 AM
Last Post: SMcNeill
  Playing sound files in QB45 eoredson 9 2,968 01-10-2025, 05:37 AM
Last Post: ahenry3068
  Fractal Explorer vince 4 1,351 10-16-2024, 09:08 PM
Last Post: Trial And Terror

Forum Jump:


Users browsing this thread: 1 Guest(s)