POV-Ray : Newsgroups : povray.pov4.discussion.general : Tree Fractals : Re: Tree Fractals Server Time
19 Apr 2024 15:15:48 EDT (-0400)
  Re: Tree Fractals  
From: John VanSickle
Date: 22 Nov 2009 15:32:19
Message: <4b099fd3$1@news.povray.org>
clipka wrote:
> Gerhard Oosthuizen schrieb:
>> It would be nice to have a fractal object for trees and lightning.
>> Tree-like fractal textures would also be nice for veins and leaves.
> 
> I guess you're talking about fractals of the recursive kind, as in:
> 
>     #declare MyTree {
>       cylinder { <0,0,0>, <0,1,0> }
>       object { MyTree scale 0.5 rotate  z*30 translate y*1 }
>       object { MyTree scale 0.7 rotate -z*20 translate y*1 }
>     }
> 
> (which of course doesn't work in POV-Ray 3.6 or 3.7)
> 
> Unfortunately, such recursive definitions are perfectly unsuited for 
> raytracing, and would have to be "resolved" prior to rendering anyway 
> (same goes for textures).

Not necessarily, if the bounding scheme is right.

In the case above, tracing tests for the bound around the whole fractal 
object; if the ray intersects the bound, then test for the cylinder and 
each of the child objects.  Ray tracing recurses well (or else 
reflection and refraction would not be something that ray tracing excels 
at).

Going into each level, the camera would have to be transformed so that 
the sub-objects are scaled, rotated, and transformed correctly.

Additional parameters would be helpful here:

* A bound for the whole fractal, allowing the renderer to move on to 
other objects in the scene as soon as possible;
* A recursion_level setting, declaring a maximum depth for recursion;
* A minimum_size setting, telling the renderer the smallest amount of 
scaling allowed for any further recursion;
* a leaf_object { }, which allows the user to specify an object that is 
used in place of recursion when either the recursion_level or the 
minimum_size is reached.

The only real problem I can see with such an object is that while it's 
probably very good for making trees and plants of a certain quality, 
most of its uses are fairly abstract.  Most of the things that we want 
to model aren't fractal in overall shape.

So barring a compelling reason, other than trees, to have fractals in 
the renderer, it seems that the usefulness of the feature does not 
justify the effort needed to implement it.

Regards,
John


Post a reply to this message

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