POV-Ray : Newsgroups : povray.general : 2Q's: normal & random : Re: 2Q's: normal & random Server Time
12 Aug 2024 13:19:46 EDT (-0400)
  Re: 2Q's: normal & random  
From: Spider
Date: 8 Feb 1999 21:02:16
Message: <36BF95F3.24FA6F0@bahnhof.se>
Ooops.
I forgot that there needs to be +0.4 or +0.5 inside the log..
my mistake..
#declare s = seed(6666);
(log(rand(s)+0.5)*60)-30

This should perhaps be better.

//Spider



//Spider

Dan Connelly wrote:
> 
> Whoa!! This is unbound on the lower end -- lim[x->0]{log{x}}->-infty
> 
> A simpler approach is simply to exploit the central limit theorem, and
> take averages....
> 
> #declare A = ((rand(s)+rand(s)+rand(s))*20 - 30;
> 
> for example.
> 
> Spider wrote:
> >
> > You can try :
> > #declaree s = seed(6666);
> > (log(rand(s))*60)-30
> > this may be what you want..
> >
> > //Spider
> >
> > ingo wrote:
> > >
> > > Hi,
> > > I'm trying to make randomly curled paper sheets, I have two questions on
> > > this:
> > > 1. Although I don't need mutch detail I'd like to smooth the paper, so how
> > > to calculate the normals for smooth triangles?
> > > 2. How do I generate random numbers between -30 and +30, in such a way that
> > > there are mutch more between -15 and 15 than between -30 and 30?
> 
> --
> http://www.flash.net/~djconnel/


Post a reply to this message

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