POV-Ray : Newsgroups : povray.documentation.inbuilt : (seed) could use a better explanation : Re: (seed) could use a better explanation Server Time
25 Apr 2024 01:56:10 EDT (-0400)
  Re: (seed) could use a better explanation  
From: Kenneth
Date: 7 Oct 2005 20:35:00
Message: <web.434712de6c2f1bfb24699ca0@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:

>
> Actually, I think there *might* arise situations where the knowledge of how
> SEED works could prevent confusion in the visual apprearance of a scene.
>

I decided to run my own code example, as outlined above, and the results do
NOT agree with my concept of it. Which leaves me at a loss as to what's
going on. The colors in both rows of objects look completely different,
i.e., no near-repetition of colors. Is my code wrong, or is my concept
wrong?

Here's my code, ready to run. (No lights needed.) The lower row of objects
is colored using the 1st SEED value, and the higer row with the 2nd SEED
value:

------------

global_settings {assumed_gamma 1.8}

camera {
  perspective
  location  <10, 30, -30>
  look_at <10, 2, 0>
  right     x*image_width/image_height  // aspect ratio
  angle 35
       }


#declare shape =
object{
        cylinder{<0,0,0>, <0,3,0>, .2}
      }


// using 1st SEED value...
#declare S1 = seed (470);
#declare index = 1;
#while (index <= 20)
object {shape
        texture{
                pigment {color rgb <rand(S1),.5,.5>}
                finish{
                        ambient 1
                        diffuse 0
                      }
               }
        translate <index,0,0>
       }

#declare index = index + 1;
#end


// using 2nd SEED value...
#declare S1 = seed (471);
#declare index = 1;
#while (index <= 20)
object {shape
           texture{
                pigment{color rgb <rand(S1), .5,.5>}
                finish{
                        ambient 1
                        diffuse 0
                      }
                  }
         translate <index,0,4>
       }

#declare index = index + 1;
#end


Post a reply to this message

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