POV-Ray : Newsgroups : povray.binaries.images : tree creation : Re: tree creation Server Time
5 Nov 2024 14:25:00 EST (-0500)
  Re: tree creation  
From: Skip Talbot
Date: 17 Aug 2006 00:15:25
Message: <44e3ed5d$1@news.povray.org>
Lawrence W wrote:
> "Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
>> "Lawrence W" <lwi### [at] csicablenet> wrote:
>>> I've posted in the past about learning to create a tree macro all by myself.
>>>  My trouble at this point is to figure out how to attach each block of truck
>>> to each other when shifted out of alignment, a la not a perfectly straight
>>> truck.
>>>
>>> If you look at the attached image, you'll see I've got a cylinder broken
>>> into four chunks, along with a solid cylinder next to it.  I want this to
>>> be my trunk.  I'm looking to find out how to properly locate the beginning
>>> and end points of each chunk.  That way, I could properly rotate each chunk
>>> to meet up with the one below it.
>>>
>>> Can anyone give me some help?  Thanks!
>> If you know the coordinates of each point of the trunk, you don'tneed to
>> rotate cylinders.  Cylinders do not need to be created vertical. Just
>> specify the start and end coordinates and you are done.
>>
>> -tgq
> 
> That's exactly my goal, but also the crux of my problem.  How am I going to
> track the start and end coordinates?
> 
> .... This may become a rather moot point as I find it MUCH quicker to use
> POV-Tree.  Nonetheless, I'm really curious about how to do it from scratch
> for the learning potential.
> 
> 
The edges of the cylinder are going to jut out aren't they?  Maybe a 
different shape should be used?  Sphere sweeps perhaps?  Although they 
would probably bring the render to a screeching halt.  How about a mesh 
object?  Then you can have a macro to define the number of faces around 
the trunk (ie an octagon tree or something with a lot more faces to make 
it look smooth).  You could could easily connect vertices as the tree 
trunk curves, shrinking the radius as the tree goes to the top.  I'm not 
entirely sure how to mesh the branch intersections smoothly though (I 
guess they could just overlap).  The path of your tree trunk and 
branches could be defined with a spline.  Then you'll have a nice 
curving shape to start with, and picking start and end points for your 
cylinders merely involves evaluating the spline at the spline intervals 
you need.

Skip


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.