POV-Ray : Newsgroups : povray.general : to make a plane with random drops of water : Re: to make a plane with random drops of water Server Time
31 Jul 2024 04:28:01 EDT (-0400)
  Re: to make a plane with random drops of water  
From: Trevor G Quayle
Date: 8 Nov 2007 12:15:00
Message: <web.473343a755ec4e01c150d4c10@news.povray.org>
"Rarius" <rar### [at] rariuscouk> wrote:
> MrLoft,
>
> You seem to be misunderstanding the SDL random keywords and how to use
> them...
>
>     #declare NxRd = seed (23574);
>     #declare NyRd = seed (22846);
>     #declare NzRd = seed (24784);
>
>     ...
>
>     scale <0.2*NxRd, 0.2*NyRd, 0.2*NzRd>
>
> You are multiplying by the identifier of a random stream, not a random
> number... You need to change the "scale" line to read as follows:
>
>     scale <0.2*rand(NxRd), 0.2*rand(NyRd), 0.2*rand(NzRd)>
>
> Personally I would only use a single random stream, rather than three.
>
> Rarius

Sometimes multiple streams are convenient if you want your randomness consistent
(even if that sounds contradictory).  In this case, it may be of use to have the
x/y/z translations on the same stream (however, I can also see reason not to).
But I would certainly put the scaling seed on a separate stream so it doesn't
interfere with the translations.

From what I can tell in your scene, you should also make sure you scale the
object before translating it (unless that is your intention), as scaling after
causes the translation to essentially get scaled as well (all scaling is
relative to the origin).

-tgq


Post a reply to this message

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