POV-Ray : Newsgroups : povray.tools.general : so stupid... : Re: so stupid... Server Time
9 Oct 2026 07:37:54 EDT (-0400)
  Re: so stupid...  
From: ingo
Date: 2 Sep 2026 01:56:33
Message: <6a97ba91$1@news.povray.org>
On 2026-09-01 21:49, Leroy wrote:

> You don't have to have an array of seed values!
> Every time you make a new seed POV's seed function adds that seed to an built_in
>   array and returns the element number of that array.
> So when you first start with #declare S=seed(35423); S=0;
> The next time you declare a seed like #declare R=seed(35423); then R=1; and so
> on...
> 
> So all you need to know is how many seeds you made.
> 
> You don't even have to use a variable in the random statement you can use the
> number!!
>   as in #declare A=rand(0);
> 
> I wouldn't call what you did as stupid. I just call it a habit. Like I've used
> sky_sphere forever for a simple sky and the other day going though the documents
> I found out that you could use layered pigments?! HABIT
> 
> Have Fun! 
> 
---%<------%<------%<---
#macro Sower(N, Seed)
   #local R0 = seed(Seed);
   #for (i, 0, N-1)
     #local s = seed(int(rand(R0)*10000));
   #end
#end


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

Sower(N, Seed)
//Sower(N, 8);

#for (i,0,9)
   #debug concat(str(rand(0),1,1), " ", str(rand(1),1,1),"\n")
#end
---%<------%<------%<---

That works fine. But now, how to create a second stream of streams? (do 
I need that? In audio/DSP I use it to compare room reverbs, a new stream 
of streams is a new room. Does it make sense for use in POV-Ray?)

ingo


Post a reply to this message

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