|
|
No, sir, it's still not correct. Plot this curve from RAND(S) = 0 to 1 and look at
the shape!
Try, instead:
#declare RR = seed(231);
#declare v3030 = pwr((rand(RR)-0.5),3)*240;
[I always have to look up the 3.02 docs: is X^3 represented as POW(X,3) or PWR(X,3)
? ]
Spider wrote:
> 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
|
|