POV-Ray : Newsgroups : povray.general : The Eternal Student: Loop Problem : Re: The Eternal Student: Loop Problem Server Time: 23 Jul 2019 11:57:04 GMT
 Re: The Eternal Student: Loop Problem
 From: Sven Littkowski Date: 31 Jan 2018 22:44:45
```On 29.01.2018 02:49, Thomas de Groot wrote:
> On 29-1-2018 2:24, Sven Littkowski wrote:
>> 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
>>
>
> All the objects are at the same location :-)
>
> You need to randomise the translate elements too.
>
Thanks everyone, that initial problem seems to have been solved now. :-D

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