POV-Ray : Newsgroups : povray.general : The Language of POV-Ray : Re: The Language of POV-Ray (L-systems) Server Time
11 Aug 2024 09:22:11 EDT (-0400)
  Re: The Language of POV-Ray (L-systems)  
From: Jerry
Date: 13 Mar 2000 14:17:08
Message: <jerry-9FD538.11170613032000@news.povray.org>
In article <38CC002C.6DBE9012@merlin.net.au>, PoD <pod### [at] merlinnetau> 
wrote:
>Show me a simple syntax that lets you create a tree with different
>textures for trunk, branches, twigs, leaves, fruit, flowers.
>And has declarations of objects to use for the above.

Well, I'd separate out a simple IFS from full-blown LSystem, since it 
ought to be easier (and happens to be what I'm interested in :*)

#declare deadSeed = seed(99);
#declare tree = ifs {
   children 3 //number of children that bloom from each 'branch'
   angles {
      <30,0,0>, <0,60,60>, <0,30,0>
   }  //angle change for each child
   sizes {
      <.8,.75,.75>, <.6,1,1>, <.5,.5,.5>
   }  //size change for each child
   deadends {
      deadSeed
      .1,.05,.05
   }  //chance of a dead end for each iteration, as well as the
      //seed to use for randomness
   levels 5
   level_map {
      [1-2  texture { trunknbranches }]
      [3    texture { greentrees }]
      [4    texture { greenleaves }]
      [5    texture { flowers }]
   } //might also use a 0-1 range
   method dot_approximation //I've forgotten the name of this
   //other method would be to draw every piece
   turbulence .25
   //turbulence might not be the right keyword; might have to
   //be separated into 'angle_turb' and 'size_turb'.
   //some items might not be able to be applied to some methods
   //also, a completely separate 'flower' object might not be a bad idea:
   //flower { object { treeFlower } }
   //which goes on the end of any branch that makes it to the top level
}

Have I forgotten any necessary information?

Jerry


Post a reply to this message

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