POV-Ray : Newsgroups : povray.binaries.images : A quick povr branch micro normal image. : Re: A quick povr branch micro normal image. Server Time
18 Apr 2024 07:37:04 EDT (-0400)
  Re: A quick povr branch micro normal image.  
From: William F Pokorny
Date: 25 Jan 2022 16:32:47
Message: <61f06c7f$1@news.povray.org>
On 1/25/22 08:39, William F Pokorny wrote:
> I'll look at your idea today and see if I can make something work for povr.

OK.

I spent some time looking at testing whether some keyword is defined. 
It's a tangle.

The short of it is the v4.0 master branch and the povr branch look like 
they can actually do something like:

#ifdef (sphere)

or

#if defined(sphere)

Though you currently get a warning, "...results might not be what you 
expect...", it appears to work in that an option would be to test for a 
povr only keyword say and then run that keyword and have it return povr 
information on versions or whatever.

Unfortunately, it appears this work-ability is part of the later parser 
work clipka was doing. He backed well off those parser updates for the 
v3.8 release. Plus, I fully expect earlier POV-Ray versions do not 
handle testing whether keywords are defined(a).

(a) - Just v3.8 support would have worked for povr as it's strictly a 
v3.8+ branch.

---

The only thing I've come up with, which I think might work, would be for 
povr to re-use a function its currently eliminated in 'f_odd()'.

The function was always useless in that it was, code wise, a duplicate 
of f_cushion. I suspect it was perhaps a place holder for some sort of 
odd / even testing or similar that just never got done.

My thinking is that povr - or any other non-official and substantially 
different - version of POV-Ray could return some unique double value 
given a particular set of inputs. We'd use maybe certain sets of inputs 
for various derivatives. The current inbuilt function would return what 
it returns. The povr branch or others would be hard coded to return some 
other value which would mean something like: This the povr branch and 
the version is, and it's Monday, or...

Would using f_odd() in this way be useful or not? It's all I've got for 
options at the moment.

I kept thinking we need a time machine. Go back to v3.0 and stick in a 
few parser functions which were simply made available to various patch / 
derivative authors to return whatever they wanted for strings and values.

Bill P.


Post a reply to this message

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