POV-Ray : Newsgroups : povray.animations : Random Scale : Re: Random Scale Server Time
28 Jul 2024 18:23:16 EDT (-0400)
  Re: Random Scale  
From: Josh English
Date: 17 Mar 1999 15:28:33
Message: <36F010CC.9666D9D1@spiritone.com>
#declare HighPoint = 1.1;
#declare LowPoint = 0.9;
#declare Range = HighPoint - LowPoint;

#declare R1 = seed(42);
#declare MyRandomNumber = rand(R1)*Range + LowPoint;

This gives you a random number between those two points

"Inexistencia-Design, Dec. P. Eventos Lda" wrote:

> Hello!
> I need to animate a cylinder by random scaling it up and down in y axis but
> a only want to scale from 0.9 to 1.1. How can I get a random number and get
> sure that falls between 0.9 and 1.1.
> I've tried with rand(seed(clock)) but can't get there.
>
> Sergio


Post a reply to this message

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