|
![](/i/fill.gif) |
"Jim Charter" <jrc### [at] aol com> wrote in message
news:3C1E7BAB.BDEE43ED@aol.com...
>
>
>
> >
> >
> > Is it too thin? or too thick?
>
> The supporting trunk seems too thin to me.
>
> >
> >
> > Mmmh... I coded the coordinate-generation program in VB and use I/O in
POV
> > to read the file.
> > Would you still be interested in either code?
> >
>
> Interested at the psuedo-code level actually.
>
Hi Jim. I've posted a newer experiment which I think it fixed some of the
problems you addressed on this thread.
The (latest) pseudo-code is basically a recursive algorithm which operates
like this:
A BRANCH object is defined more or less like a cylinder:
end1 as a 3d vector
end2 as a 3d vector
thickness as a float
1. create an initial branch (the main trunk rooted in the ground)
2. decide how many levels of recursion you're going to accept.
3. decide how many subbranches are going to stem out of the initial branch
(in this example is fixed) and where are they going to stem (in this example
always at end2)
4. generate sub-sub-branches for each of the subbranches you've generated
until you've got until the deepest permitted level of recursion. The
thickness of each subbranch is diminished by a factor less than one. First I
experimented with a random value, but then I decided that a fixed value
simplified some things in POV and it didn't look so bad. Also the length of
the subbranch has to be shortened in some way: the latest example uses a
function which depends on the recursion depth. I think it looks OK.
Then in POV, I read the text file which contain all the coordinates and
thicknesses and place the cones in the those positions. In this example I
didn't add leaves, but in the newer example I added some elliptical discs at
the deepest branches.
I hope I got to explain myself more or less (my English is sometimes a bit
crappy :)
Thanks for your comments,
Fernando.
Post a reply to this message
|
![](/i/fill.gif) |