POV-Ray : Newsgroups : povray.newusers : Problem with using rand : Re: Problem with using rand Server Time
30 Jun 2024 04:50:36 EDT (-0400)
  Re: Problem with using rand  
From: Thorsten Froehlich
Date: 16 Oct 2011 10:46:24
Message: <4e9aee40$1@news.povray.org>
On 16.10.11 16:28, lucas wrote:
> Hello,
>
> I declared a few functions. I need to use a random generator in one of them.
> Accprding to documentation (http://www.povray.org/documentation/view/3.6.1/228/)
> I thought that I can use function rand() as any other float function, but I
> encountered a problem. I can declare a function like below:

You need to look at the documentation for user-defined functions at 
http://www.povray.org/documentation/view/3.6.1/231/ . Some SDL functions 
cannot be used in user-defined functions. In your particular case, the best 
alternative is a noise function, which provides a 3D randomness that 
probably meets your needs.

	Thorsten


Post a reply to this message

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