POV-Ray : Newsgroups : povray.binaries.scene-files : Simulated urbanism macro scene: version 2013.04.08 : Simulated urbanism macro scene: version 2013.04.08 Server Time
28 Apr 2024 02:24:28 EDT (-0400)
  Simulated urbanism macro scene: version 2013.04.08  
From: Thomas de Groot
Date: 8 Apr 2013 04:00:40
Message: <51627928@news.povray.org>
I made a number of code improvements to the macros, following 
Christian's advice.

In the Orientation() macro I also changed the #while() loop into a 
#for() loop.

I have a major question though.

If, in the Urbanism() macro, I change the #while() into a #for() loop, I 
get a different end result! IMO this should not be the case as no 
changes whatsoever are made to any random parameter. You can test this 
yourself by:

1) change the line:
   #while (Counter < Numbers)
into:
   #for (Counter, 1, Numbers)

and 2) comment out the line: #local Counter = Counter + 1;

A second question follows from the docs about the #for() loop (my italics):
[quote]
A new #for loop construct is now available for simple loops incrementing 
Identifier from Start to End /(inclusive)/ with the given Step size. The 
default Step size is +1.0.
[/quote]

However, in the code and setting Verbose=on, #for() goes till End-1.

Probably my skull thickness but any idea?

Thomas


Post a reply to this message


Attachments:
Download 'windows-1252' (16 KB)

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