POV-Ray : Newsgroups : povray.tools.general : so stupid... : so stupid... Server Time
9 Oct 2026 07:37:49 EDT (-0400)
  so stupid...  
From: ingo
Date: 1 Sep 2026 09:12:16
Message: <6a96cf30@news.povray.org>
// Normally I use one stream for everything, or I create one stream per 
subject
// in first case when I add something somewhere that needs the stream it 
also changes the rest of the scene.
// In the case of a stream per subject I have to change everything by 
hand if I want a different seed.

// Then, after decades of struggle ...

// yes you already knew how to do it but kept it secret, don't tell me.
// Makes me feel even worse :(

// It finally clicked:

// Change Seed and it all changes.
// Add something in between and give it its own seed and the rest stays 
the same.
// To change the seed for one subject, pick another number from the array

#macro Sower(N, Seed)
   #declare R0 = seed(Seed);
   #declare Seeds = array[N];
   #for (i, 0, N-1)
     #declare Seeds[i] = seed(int(rand(R0)*10000));
   #end
#end


#declare N = 10;
#declare Seed = 7;

Sower(N, Seed)

//naming step is not needed per se.
#declare RndStones = Seeds[0];
#declare RndFlowers = Seeds[1];


#for (i,0,9)
   #debug concat(str(rand(RndStones),1,1), " ", 
str(rand(RndFlowers),1,1),"\n")
#end


Post a reply to this message

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