Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Playing with dragon curve fractal
#9
(10-08-2023, 06:21 PM)Dav Wrote: 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

Not too different from what I used in Falling Leaves, looks nice.
b = b + ...
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



Users browsing this thread: 4 Guest(s)