POV-Ray : Newsgroups : povray.binaries.images : Towards a procedural tree macro (62kbbu) : Re: Towards a procedural tree macro (62kbbu) Server Time
2 Oct 2024 20:21:43 EDT (-0400)
  Re: Towards a procedural tree macro (62kbbu)  
From: SamuelT 
Date: 26 Mar 2000 16:36:13
Message: <38DE858D.B0B3FCF5@aol.com>
I'm thinking a marriage between standard pov objects for branches, and
isosurfaces for leaves might be the best we can do to make good, and hopefully
fast-rendering trees. I might have to try it. :)

"Greg M. Johnson" wrote:

> I've seen some tree makers here which are breathtaking in their visual
> beauty.  I think that the coolest alorgithm for a tree, however, would
> be procedural and not involve lots of translate & rotate statements.
>
> Here's my first stab at a procedurally derived tree.  Further
> experimentation underway.  Feel free to take this and improve it.
>
> #declare rag=function{ 1/(x^2+y^2+z^2)^0.5*5}   // 35;
> #macro Treegent(gent,tx,ty,tz)
> //gent is currently useless randomizer,  translate to tx, ty, tz
> union{
>  isosurface{
>          function{
> noise3d((x+gent)/rag,(y+gent)/rag,(z+gent)/rag)&(-y-1) }
>                 accuracy .001
>                 threshold  .01
>          contained_by {sphere{0,15} }
>          bounded_by   {sphere{0,2 } }
>                 }
>  isosurface{
>          function{  noise3d((x+gent)/rag,(y+gent)/20/rag,(z+gent)/rag)}
>                 accuracy .001
>                 threshold  .08
>          contained_by { sphere{0,5} }
>          bounded_by   { sphere{0,1} }
>                    }
>  pigment{
>          spherical
>   pigment_map{
>                  [0      Green]
>                         [.2     Brown]
>                         [1     Brown]
>                           }
>                 scale 12
>                 }
>         finish{ambient 0.1}
>         translate <tx,ty,tz>
>         }
>   #end
>
>   ------------------------------------------------------------------------
>  [Image]

--
Samuel Benge

E-Mail: STB### [at] aolcom

Visit the still unfinished isosurface tutorial: http://members.aol.com/stbenge


Post a reply to this message

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