The obvious place to start is with a circle:
I'm using a function that makes a circle out of line segments. But as you can see, this routine doesn't close off the circle. If I fix that and use a curve to draw between the segments, it looks a lot more like a circle:
There's a discontinuity where the two ends meet. I could fix that, but it isn't necessary for this usage.
I don't want every tree to be a perfectly circular blob, so I'll introduce some random distortion into the circle, by adding random offsets in both x and y to every point in the circle:
That gives me a lumpy, imperfect circle.
The next step is to add bumps to the circle, similar to the bumps on the outside of the forest masses I already draw:
In fact I can reuse the same routine I use for the forest masses. It takes a polyline (a series of line segments) and replaces each segment with an arc.
Here I've purposely made it blocky so you see how each segment of the circle has been turned into a "bump" which is itself just a sequence of line segments. Here's a smoother rendition:
For this example I just reused the default forest mass bump parameters. I might want my individual trees to be more "fluffy" than the forest masses, so I can tweak that parameter accordingly:
And that's the basic approach for a simple tree shape. If I add some random variation in the number of bumps and the size of the trees I can generate a pleasing variety. Here's a grove of them at something closer to map scale:
I love it. "Here Dragons Abound" just gets better and better as time goes on.
ReplyDeleteAnd now trees... Grab the popcorn. This is going to be great.
Thanks! I think you flatter me, but I'll accept it anyway :-)
ReplyDelete