|
|
> > #declare
> >
Random_Lightsource=vnormalize(<rand(Seed)*2-1,rand(Seed)*2-1,rand(Seed)*2-1>
> > )*rand(Seed)*5;
>
> Are you sure this produces an even distribution?-)
Nah, not sure if this is even distribution. Would be, sorta, if the
rand-function would be TRULY random, but it suffices in most cases anyway.
Randomizing points in a box and then checking if its in the sphere wouldn't
produce even distribution either. So why not save the parsing time of
sorting out unnecessary points?
> By the way, you can do: <rand(Seed),rand(Seed),rand(Seed)>*2-1
Hm, yeah, right. Can't remember when and how I came to do it this way...
--
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>
Email: tim.nikias (@) nolights.de
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.536 / Virus Database: 331 - Release Date: 03.11.2003
Post a reply to this message
|
|