|
![](/i/fill.gif) |
Thank you, that's very kind of you. Your example looks to be a little
easier to follow that some of the examples in the scene folder. I'll have a
bit of a play, and see if I can figure it out! :)
Cheers muchly!
Heulwen
"Thomas de Groot" <t.d### [at] inter nl net> wrote in message
news:43c217ef@news.povray.org...
>
> "Bob Hughes" <omniverse@charter%net> schreef in bericht
> news:43c20d85$1@news.povray.org...
> >
> > I can only manage a loose description of what takes place and how it is
> > doing it, mimicking the Help wording, so I'd rather not try. ;) Someone
> > else might have insights into using it in #while loops so I'll leave
that
> up
> > to another person, if anyone else replies.
> >
>
> This is a trace example taken from my last scene. It is essentially
> identical to the examples in the POV documentation, but you may try it,
> changing some parameters to your own conveniences of course. It is rather
> self-explanatory I think.
>
> //================= start code ============================
> #declare Spacing = 0.25;
>
> #declare PosX = -10;
>
> #while (PosX < 10)
>
> #declare PosZ = -30;
>
> #while (PosZ < 10)
>
> // trace function
> #declare Norm = <0, 0, 0>;
> #declare Start = <PosX+(Spacing*rand(Seed)), MaxBox.y+1,
> PosZ+(Spacing*rand(Seed))>;
> #declare Pos = trace (
> Cliff, // object to test
> Start, // starting point
> -y, // direction
> Norm ); // normal
>
>
> #if (Norm.x != 0 | Norm.y != 0 | Norm.z != 0) // if intersection is
> found, normal differs from 0
> #if ((vdot(Norm, y)>0.9) /*& (Pos.y > 1.0)*/) // criteria for
placing
> trees: steep (0.1) to flat (0.9); and above certain level
>
> object {AlienTree
> scale RRand(0.01, 0.03, Seed)
> rotate RRand(0, 360, Seed)*y
> translate Pos
> }
>
> #end //end of vdot() & Pos.y
> #end //end of Norm
>
> #declare PosZ=PosZ+Spacing;
> #end //end of while Z
>
> #declare PosX=PosX+Spacing;
> #end //end of while X
>
> //================= end code ============================
>
>
> Thomas
>
>
>
Post a reply to this message
|
![](/i/fill.gif) |