|
|
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
Hi Sergio!
I tried this and it worked the I I think you meant.
--------------------------------------------------------
camera {location <0,2,-2>
look_at 0}
light_source {<1,1,-1> color rgb<1,1,1>}
#declare RAND1 = seed(12345+(clock*10));
cylinder {0,y,0.25
pigment{color rgb <1,0,0>}
scale <1,0.9 + (0.2 * rand(RAND1)),1> }
--------------------------------------------------------
Marc
--
Marc Schimmler
Post a reply to this message
|
|