POV-Ray : Newsgroups : povray.general : tau Server Time: 16 Dec 2018 00:47:36 GMT
  tau (Message 1 to 5 of 5)  
From: Bald Eagle
Subject: tau
Date: 13 Sep 2018 22:35:01
Message: <web.5b9ae5d1f030c6cb458c7afe0@news.povray.org>
I've been hopping between 3.7, and other later versions.

What is the best (most robust and reliable) way to determine if tau is defined,
and if not, set it's value?

I start off with #version version;

then:

#if (version < 3.8)
 #ifndef (tau)
    #declare tau = 2*pi;
    #end
#end


#if (version < 3.8)
 #ifndef (tau)
    #declare tau = 2*pi;
    #end
#end

I get:

Parse Warning: Tried to test whether a reserved keyword is defined. Test result
may not be what you expect.
Parse Error: Expected 'undeclared identifier', float function 'tau' found
instead


Post a reply to this message

From: clipka
Subject: Re: tau
Date: 14 Sep 2018 04:32:11
Message: <5b9b39cb$1@news.povray.org>
Am 14.09.2018 um 00:33 schrieb Bald Eagle:
> 
> I've been hopping between 3.7, and other later versions.

You shouldn't be doing that. Use either v3.7.0 (the latest official
stable release) or the most recent tagged v3.8.0-alpha (currently
v3.8.0-alpha.9811560).

Any versions in between are obsolete and no longer supported.

It's the nature of development versions that they're sill in flux, and
no attempt is made to maintain backward compatibility among them.

(Experimental versions such as the new parser are a bit of an exception,
but they too become obsolete over time.)

If you're using an unofficial patch based on some interim version of
POV-Ray, it should come with its own mechanism to detect what version of
the patch you are using, which you should use to infer what set of
official features it includes and which it doesn't.


That said...

> What is the best (most robust and reliable) way to determine if tau is defined,
> and if not, set it's value?

...
> #if (version < 3.8)
>  #ifndef (tau)
>     #declare tau = 2*pi;
>     #end
> #end
> 
> I get:
> 
> Parse Warning: Tried to test whether a reserved keyword is defined. Test result
> may not be what you expect.
> Parse Error: Expected 'undeclared identifier', float function 'tau' found
> instead

The canonical solution is to write your scene to conform to one
particular version, and use the `#version` directive to (A) enforce it
as the minimum version and (B) let any later version know that it should
behave in a backwards-compatible manner:

    #version 3.8;
    // make use of tau

or:

    #version 3.7;
    // don't even try to make tau work

Again note that what constitutes canonical behaviour of version 3.8 is
still in flux. Both the most recent v3.8.0-alpha as well as all recent
experimental versions support tau, so officially the above is safe.

The next best option is to make use of the new feature if it can be
determined for sure that it is supported, but if in doubt fall back to
an alternative that is safe for all versions; e.g.:

    #if (version >= 3.8)
        #declare Tau = tau;
    #else
        #declare Tau = 2*pi;
    #end
    // make use of Tau

Note the use of capitalized Tau, and the fact that even before the
introduction of the featurethe, the following would have been considered
NOT correct:

    #declare tau = 2*pi;

because that would have constituted a user-defined variable, which
should never use all-lowercase identifiers, specifically because they
might conflict with keywords in future versions.


Post a reply to this message

From: Thomas de Groot
Subject: Re: tau
Date: 14 Sep 2018 06:35:52
Message: <5b9b56c8@news.povray.org>
On 14-9-2018 6:32, clipka wrote:
> Am 14.09.2018 um 00:33 schrieb Bald Eagle:
>>
>> I've been hopping between 3.7, and other later versions.
> 
> You shouldn't be doing that. Use either v3.7.0 (the latest official
> stable release) or the most recent tagged v3.8.0-alpha (currently
> v3.8.0-alpha.9811560).
> 
> Any versions in between are obsolete and no longer supported.
> 

Ah! Let me get this clear:

- /all/ 3.7.1 versions [introducing Diffuse Models; Tone Mapping; Cached 
Macros] can be dumped?

- I assume that the two versions of uberpov64.exe are still valid. Build 
2016. If not up-to-date, at least they are valuable for the stochastic 
antialiasing, at least for me.

-- 
Thomas


Post a reply to this message

From: clipka
Subject: Re: tau
Date: 14 Sep 2018 16:41:14
Message: <5b9be4aa$1@news.povray.org>
Am 14.09.2018 um 08:35 schrieb Thomas de Groot:
> On 14-9-2018 6:32, clipka wrote:
>> Am 14.09.2018 um 00:33 schrieb Bald Eagle:
>>>
>>> I've been hopping between 3.7, and other later versions.
>>
>> You shouldn't be doing that. Use either v3.7.0 (the latest official
>> stable release) or the most recent tagged v3.8.0-alpha (currently
>> v3.8.0-alpha.9811560).
>>
>> Any versions in between are obsolete and no longer supported.
>>
> 
> Ah! Let me get this clear:
> 
> - /all/ 3.7.1 versions [introducing Diffuse Models; Tone Mapping; Cached
> Macros] can be dumped?

All v3.7.1-alpha and v3.7.1-beta versions (as well as v3.7.1-rc
versions, should you be able to get hold of one of those) can be dumped.

Cached macros are in the official v3.8.0 dev branch, so no loss there.

Alternative diffuse models, as well as tone mapping, were published as
v3.7.1-x (i.e. experimental) versions; as I said those are a bit of an
exception. But they're indeed getting stale in a way, too, and the most
sensible thing to do about those is not for you to continue to use them,
but for me to update them with all the changes that have been going on
in the main branch since then.

> - I assume that the two versions of uberpov64.exe are still valid. Build
> 2016. If not up-to-date, at least they are valuable for the stochastic
> antialiasing, at least for me.

UberPOV is a completely different animal, as it comes with a mechanism
to identify the specific UberPOV version, from which you can deduce the
POV-Ray feature set available.

Also getting somewhat stale though, and I'm not exactly sure whether I
will continue (well, more like revive) the project. I'm pretty sure I'll
add anti-aliasing mode 3 to official POV-Ray though, as I /think/ it has
left little doubt about its worth.


Post a reply to this message

From: Thomas de Groot
Subject: Re: tau
Date: 15 Sep 2018 06:54:08
Message: <5b9cac90$1@news.povray.org>
On 14-9-2018 18:41, clipka wrote:
> Am 14.09.2018 um 08:35 schrieb Thomas de Groot:
>> On 14-9-2018 6:32, clipka wrote:
>>> Am 14.09.2018 um 00:33 schrieb Bald Eagle:
>>>>
>>>> I've been hopping between 3.7, and other later versions.
>>>
>>> You shouldn't be doing that. Use either v3.7.0 (the latest official
>>> stable release) or the most recent tagged v3.8.0-alpha (currently
>>> v3.8.0-alpha.9811560).
>>>
>>> Any versions in between are obsolete and no longer supported.
>>>
>>
>> Ah! Let me get this clear:
>>
>> - /all/ 3.7.1 versions [introducing Diffuse Models; Tone Mapping; Cached
>> Macros] can be dumped?
> 
> All v3.7.1-alpha and v3.7.1-beta versions (as well as v3.7.1-rc
> versions, should you be able to get hold of one of those) can be dumped.
> 
> Cached macros are in the official v3.8.0 dev branch, so no loss there.
> 
> Alternative diffuse models, as well as tone mapping, were published as
> v3.7.1-x (i.e. experimental) versions; as I said those are a bit of an
> exception. But they're indeed getting stale in a way, too, and the most
> sensible thing to do about those is not for you to continue to use them,
> but for me to update them with all the changes that have been going on
> in the main branch since then.
> 
>> - I assume that the two versions of uberpov64.exe are still valid. Build
>> 2016. If not up-to-date, at least they are valuable for the stochastic
>> antialiasing, at least for me.
> 
> UberPOV is a completely different animal, as it comes with a mechanism
> to identify the specific UberPOV version, from which you can deduce the
> POV-Ray feature set available.
> 
> Also getting somewhat stale though, and I'm not exactly sure whether I
> will continue (well, more like revive) the project. I'm pretty sure I'll
> add anti-aliasing mode 3 to official POV-Ray though, as I /think/ it has
> left little doubt about its worth.
> 

Perfectly clear. Thank you indeed. I believe all those experiments were 
worthwhile and should be included in version 3.8.0 eventually. And so is 
aa mode 3 which I particularly favour myself.

I shall delete the experiments and keep using UberPOV until 3.8.0 is 
up-to-date to my uses.

-- 
Thomas


Post a reply to this message

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