POV-Ray : Newsgroups : povray.off-topic : A small statistics question : Re: A small statistics question Server Time
11 Oct 2024 05:19:16 EDT (-0400)
  Re: A small statistics question  
From: scott
Date: 26 Nov 2007 06:05:32
Message: <474aa87c$1@news.povray.org>
> Anybody have any idea how I can make a program generate random numbers 
> between 30 and 30,000, but so that "most" of the numbers generated are 
> actually in the range 100 - 400?

#if( rand(s1) < 0.1 )
 #local N = rand(s1) * 29970 +  30;
#else
 #local N = rand(s1) *   300 + 100;
#end


Post a reply to this message

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