TreeGen v0.02
If you are like me, you probably can't see any possible way to improve upon TreeGen v0.01. It is the pinnacle of realistic tree generating scripts on the internet. But we can always try anyway.
I gave AI a little more guidance with this prompt:
"how about code that creates a tree-like fractal pattern with a definable depth of iterations. Where the trunk is the largest, then 7 large limbs from random points along the trunk, with a higher probability of being toward the top of the trunk than the bottom, limbs going out in random direction, but a random angle greater than 90 degrees from straight down. From each limb, the same kind of pattern of random, smaller branches extend, so that each smaller limb or branch or twig also has 7 offshoots. Each iteration of branches going forth is 30% of the width of the former iteration so that it gets smaller and smaller. 7 iterations total. svg file."
Here's what it came up with:
Refresh the linked page for a slightly different randomized result each time.
It looks slightly more like a tree than the first version. Maybe it's a baby pine tree of some variety. Technically it's a type of fractal just like a real tree. Real trees have 5 to 7 iterative levels of growth. I limited my tree to 3 iterations for now, as any more than that looks like a complete mess. It's still a long way from where I'd like it to be. I have some ideas to enhance the script, but I'm not going to work on it right now. I'll back burner it for a couple days at least. I have more important stuff to work on.