POV-Ray : Newsgroups : povray.binaries.scene-files : Simulated urbanism macro scene: version 2013.03.29 Server Time
23 Nov 2024 11:07:28 EST (-0500)
  Simulated urbanism macro scene: version 2013.03.29 (Message 1 to 4 of 4)  
From: Thomas de Groot
Subject: Simulated urbanism macro scene: version 2013.03.29
Date: 29 Mar 2013 11:56:10
Message: <5155b99a@news.povray.org>
This is the latest version of the macro. See p.b.i. for example image 
and discussion.

Thomas


Post a reply to this message


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

From: Christian Froeschlin
Subject: Re: Simulated urbanism macro scene: version 2013.03.29
Date: 29 Mar 2013 15:56:36
Message: <5155f1f4@news.povray.org>
I haven't used this, but is there a specific reason why the macro
returns the result in a fixed variable name? If you simply write

union {
   object {HouseBlock}
   object {Single}
}

without #declare you can use the macro like this

#declare HouseBlock = Urbanism(
   ...
)

or like this

object
{
   Urbanism(...)
   textures {...}
}

Also there are some other uses of #declare in the macro
that are probably intended to be #local.

Not a criticisms, just a general observation that coding is
usually less confusing if something you call "returns a value"
as opposed to having "side effects".


Post a reply to this message

From: Thomas de Groot
Subject: Re: Simulated urbanism macro scene: version 2013.03.29
Date: 30 Mar 2013 04:07:56
Message: <51569d5c$1@news.povray.org>
On 29-3-2013 20:56, Christian Froeschlin wrote:
> I haven't used this, but is there a specific reason why the macro
> returns the result in a fixed variable name? If you simply write
>
> union {
>    object {HouseBlock}
>    object {Single}
> }
>
> without #declare you can use the macro like this
>
> #declare HouseBlock = Urbanism(
>    ...
> )
>
> or like this
>
> object
> {
>    Urbanism(...)
>    textures {...}
> }

You are perfectly right on this. No reason at all for my particular 
choice ;-)


>
> Also there are some other uses of #declare in the macro
> that are probably intended to be #local.

This is different. Those #declare are exchanged between the two macros. 
#local does not work in that case.


>
> Not a criticisms, just a general observation that coding is
> usually less confusing if something you call "returns a value"
> as opposed to having "side effects".

Sure. However, I slightly prefer my method (your first comment) because 
I like to have defined terms in my code most of the time.

Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Simulated urbanism macro scene: version 2013.03.29
Date: 30 Mar 2013 04:44:32
Message: <5156a5f0$1@news.povray.org>
On 30-3-2013 9:07, Thomas de Groot wrote:
> On 29-3-2013 20:56, Christian Froeschlin wrote:

>> Also there are some other uses of #declare in the macro
>> that are probably intended to be #local.
>
> This is different. Those #declare are exchanged between the two macros.
> #local does not work in that case.
>

Eerr... Apart from those, there are some more  #declare that could be 
#local indeed ;-)

In due time. There will probably be more future changes...

Thomas


Post a reply to this message

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