POV-Ray : Newsgroups : povray.binaries.animations : The Eternal Student - Question again: Loop Server Time: 16 Dec 2018 22:20:32 GMT
  The Eternal Student - Question again: Loop (Message 1 to 3 of 3)  
From: Sven Littkowski
Subject: The Eternal Student - Question again: Loop
Date: 29 Jan 2018 00:09:41
Message: <5a6e6645$1@news.povray.org>
For some reason, my loop doesn't produce many items as intended, only
one. And I am sure, as usual I am not seeing the forest because of all
the trees in front of my eyes!  :-D


#declare MyRandom = seed (27053);
#local MyLength   = int(20*rand(MyRandom));   // Anzahl der Glieder
#local MyX        = rand(MyRandom)*45;
#local MyY        = rand(MyRandom)*1;
#local MyZ        = rand(MyRandom)*10;
#local MyElement  = 0;

#while (MyElement<MyLength)
 object { Element translate < 0.0, 0.0, 0.45 > rotate < MyX, MyY, MyZ > }
 #local MyX        = rand(MyRandom)*45;
 #local MyY        = rand(MyRandom)*1;
 #local MyZ        = rand(MyRandom)*10;
 #local MyElement  = MyElement+1;
#end


Post a reply to this message

From: clipka
Subject: Re: The Eternal Student - Question again: Loop
Date: 29 Jan 2018 16:03:43
Message: <5a6f45df$1@news.povray.org>
Am 29.01.2018 um 01:09 schrieb Sven Littkowski:
> For some reason, my loop doesn't produce many items as intended, only
> one. And I am sure, as usual I am not seeing the forest because of all
> the trees in front of my eyes!  :-D
> 
> 
> #declare MyRandom = seed (27053);
> #local MyLength   = int(20*rand(MyRandom));   // Anzahl der Glieder

Try a different seed; for this particular one, MyLength just happens to
be 1.


Post a reply to this message

From: Sven Littkowski
Subject: Re: The Eternal Student - Question again: Loop
Date: 31 Jan 2018 22:45:16
Message: <5a7246fc$1@news.povray.org>
On 29.01.2018 11:03, clipka wrote:
> Am 29.01.2018 um 01:09 schrieb Sven Littkowski:
>> For some reason, my loop doesn't produce many items as intended, only
>> one. And I am sure, as usual I am not seeing the forest because of all
>> the trees in front of my eyes!  :-D
>>
>>
>> #declare MyRandom = seed (27053);
>> #local MyLength   = int(20*rand(MyRandom));   // Anzahl der Glieder
> 
> Try a different seed; for this particular one, MyLength just happens to
> be 1.
> 
Thanks!

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

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