POV-Ray : Newsgroups : povray.off-topic : A small statistics question : Re: A small statistics question Server Time
14 Nov 2024 20:27:19 EST (-0500)
  Re: A small statistics question  
From: Alain
Date: 26 Nov 2007 19:24:29
Message: <474b63bd$1@news.povray.org>
Invisible nous apporta ses lumieres en ce 2007/11/26 05:36:
> OK, so unlike the Euler project, *this* question has some practical use. 
> ;-)
> 
> 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?
A possibility: Use the division of some random numbers. The divider must have a
range starting at 1.
Samples: rand(X)*29970/(rand(X)*Z+1)+30
(rand(X)+rand(X))*14985/(rand(X)*Z+1)+30



-- 
Alain
-------------------------------------------------
Everybody should believe in something: I believe I'll have another drink.


Post a reply to this message

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