POV-Ray : Newsgroups : povray.binaries.images : Castle Gard (WIP) : Re: Castle Gard (WIP) Server Time
2 Aug 2024 22:13:42 EDT (-0400)
  Re: Castle Gard (WIP)  
From: Thomas de Groot
Date: 18 Feb 2007 09:51:30
Message: <45d867f2$1@news.povray.org>
"Florian Brucker" <tor### [at] torfboldcom> schreef in bericht 
news:45d8395f@news.povray.org...
> Until now, the random vector has components from 0..1,
> we need them to go from -1 to 1. We subtract 0.5 (then
> it goes from -0.5 to 0.5 and double it, and multiply it
> by the maximum amount of rotation we want, here 10
> degrees.

Personally, I find it easier to use RRand(min,max,R) from the rand.inc

example:
#declare R=seed(1010);

object {.....
  rotate RRand(-1,1,R)*y
  ....
}


Thomas


Post a reply to this message

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