|
|
Justin,
You'll find a tree-generation macro included with:
http://www.tomandlu.co.uk/webres/raytracing/gallery/tmwinter.zip
This was used to create the tree in:
http://www.tomandlu.co.uk/webres/raytracing/gallery/pics/tmwinter.jpg
No leaves, I'm afraid, but it wouldn't be too hard to add them.
The approach I used was basically:
Generate a single branch by joining together blob components.
Whenever you generate a component, generate a random number and use to decide
whether to fork or not
If fork, then place the current vector in an array, and increase a pointer to
keep track of how many branch vectors there are.
If unprocessed branches exist, create a new branch starting from the stored
vector.
Post a reply to this message
|
|