POV-Ray : Newsgroups : povray.advanced-users : Random number generator needed ! : Re: Random number generator needed ! Server Time
29 Jul 2024 18:24:16 EDT (-0400)
  Re: Random number generator needed !  
From: Lutz-Peter Hooge
Date: 20 Feb 2001 15:08:59
Message: <MPG.14fced894ca8ffb1989699@news.povray.org>
hello,

> should have two integers as input. The reason I can't just use rand() and
> seed() is that I need it to always output the same random number when the
> same input numbers are used.

what about:
#macro random(a,b)
	#local S = seed(a+b);
	rand(S)
#end

For what do you need this? A subdivision-surface?

Lutz-Peter


Post a reply to this message

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