
On Wed, 2004-08-18 at 11:41, Marcelo de Gomensoro Malheiros wrote:
On Mon, Aug 16 2004, MenTaLguY wrote:
There are a lot of numbers involved; we can either store them all, or store a single value to seed a portable PRNG to generate the rest.
I'd humbly suggest going by the portable PRNG route. IMHO, the less data stored, the better.
Note that GLIB has already a very good and portable implementation of such thing, which is one of the best (in the sense of uniformity of randomness and speed) algorithms used today:
http://developer.gnome.org/doc/API/2.0/glib/glib-Random-Numbers.html
Very interesting. I guess the only question is whether its implementation is guaranteed not to change at this point -- if we have no such guarantee, then we would need to copy it to Inkscape rather than using it directly from glib.
If it had changed in the past, that might be bad too, actually, if versions of Inkscape built with older glibs rendered randomized stars differently. So we'd also need to copy in that case.
Now is definitely the time to decide which algorithm to use, anyway, since we will be forever stuck with whatever we have selected once we release 0.40.
-mental