POV-Ray : Newsgroups : povray.general : Random Dohs Server Time
7 Nov 2024 17:27:22 EST (-0500)
  Random Dohs (Message 1 to 1 of 1)  
From: Tom Melly
Subject: Random Dohs
Date: 21 Jan 2002 09:59:16
Message: <3c4c2cc4@news.povray.org>
Second time I've made the same mistake in a month, and spent 30 mins trying to
figure out why all my random objects look the same....

// v.simplified version

#macro MakeSomething(R)
    #local Rand2 = seed(R)
    sphere{0, rand(Rand2)}
#end

#local Rand1 = 1234;
MakeSomething(rand(Rand1))
MakeSomething(rand(Rand1))
MakeSomething(rand(Rand1))

--
#macro G(D,E,F)#local I=array[3]{D,E,F}#local B=0;triangle{#while(
B<3)#while(I[B])A[mod(I[B],10)]+#local I[B]=div(I[B],10);#end<-5,-
2,9>#local B=B+1;#end}#end #local A=array[7]{x,x*2,x*4,y,y*2,y*4,z
}light_source{-x*6-z*9,1}mesh{G(105,10,146)G(105,246,10)G(105,56,
146)G(105,1256,246)G(1256,126,220)G(22156,2216,201)pigment{rgb 1}}//TM


Post a reply to this message

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