|
|
I'm currently trying to use rand to determine random location of objects in my
scene. I would like rand to give the exact same result every time it runs.
I've been programming with povray for about more than a year now and I've made
some very nice stuff, whenever I needed random calculation or heavy math
algorythms, I would move to C++ and build a program that would output a
file.pov...
I don't want to do that anymore, I would like to use pov and pov only, I believe
there is a very common way to get a good random!
Here is an example of code that should normally give a cloud of dots, brighter
if there is more objects with antialiasing:
#declare n = 100 *2;
#declare i = 0;
#declare b = 3;
#while (i<n)
sphere { <rand(seed(i)), rand(seed(i+1)), 0>, 0.01 pigment { color rgb 1 }
finish { ambient 1 } translate <-0.5, -0.5, 0> scale 2}
#declare i = i+2;
#end
But this code give two Very well aligned lines (made of dots...), what is the
problem?
Thanks,
Simon
--
+--------------------------------+---------------------------+
| Simon Lemieux | http://666Mhz.myip.org/ |
| Email : lem### [at] yahoocom | Povray and OpenGL Gallery |
+--------------------------------+---------------------------+
Post a reply to this message
|
|