|
|
Hi Warp!
Just curios: Why the inner loop? I don't see a reason to keep the length of
Location below 1.
vlength(Location/vlenth(Location)) is always 1 isn't it?
Or is it already too late at night?
KK
Warp <war### [at] tagpovrayorg> wrote:
> For example something like this:
>
> #declare Stars = 1000;
> #declare Distance = 1000;
> #declare StarRadius = 1;
> #declare Seed=seed(0);
>
> #local Ind=0;
> #while(Ind<Stars)
> #local Location = <-1+rand(Seed)*2, -1+rand(Seed)*2, -1+rand(Seed)*2>;
> #while(vlength(Location) > 1)
> #local Location = <-1+rand(Seed)*2, -1+rand(Seed)*2, -1+rand(Seed)*2>;
> #end
> #local Location = Distance*Location/vlength(Location);
> sphere { Location, StarRadius pigment { rgb 1 } finish { ambient 1 } }
> #local Ind=Ind+1;
> #end
Post a reply to this message
|
|