POV-Ray : Newsgroups : povray.programming : random numbers in c++ : Re: random numbers in c++ Server Time
24 Apr 2024 11:37:15 EDT (-0400)
  Re: random numbers in c++  
From: clipka
Date: 25 Aug 2010 19:10:19
Message: <4c75a2db$1@news.povray.org>
Am 26.08.2010 00:52, schrieb Anthony D. Baye:

> The chief problem is thatsuccessive calls to the program return the same result
> every time.
>
> The only way I've found to change the result is to modify the initial conditions
> (i.e. changing the number of seed values in the grid before calling the
> Diamond_Square() function.)

Why, yes - of course; that's how pseudo-random number generators work 
;-). they're deterministic, after all (and as often as not this is even 
desired). To get a different result each time, a typical solution 
(outside of cryptographic applications that is) would be to seed with 
the current system time instead of a constant.


Post a reply to this message

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