POV-Ray : Newsgroups : povray.binaries.images : tree trunk WIP : Re: tree trunk WIP Server Time
11 Aug 2024 21:27:14 EDT (-0400)
  Re: tree trunk WIP  
From: Bill Hails
Date: 18 Jan 2004 10:37:08
Message: <400aa824@news.povray.org>
Hi.

JK wrote:

> I love it!

Thanks! It's not an original idea though :-)

> I'm wondering whether something similar can be achieved when the tree
> trunk is made out of a mesh?

Maybe. I've not done a lot with meshes, I guess if the
triangles are small it might be OK, but my method is
a long way away from meshes and I wouldn't be sure how
to translate it.

The basic technique I used was to have a separate spline
function for each of the trunk and the two branches. Then
walk each spline in short steps building a blob of spheres.
At the same time keep track of the length of the spline
so far (by accumulating the length of the vector from the
previous point to the current one.) Then apply the texture
to the current sphere, translated by -y * accumulated_length,
then rotated to align with the same said vector, then translated
to the current position.

I can post the code if that's not clear. It's kind of become
a Work On Hold rather than a WIP, Though I do plan to return to
it.

-- 
Bill Hails


Post a reply to this message

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