 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hi Tor!
I've been bus reviewing all sorts of code, and that of course led me across all
the different places that we've crossed paths.
So I was literally just thinking about you for the past few days.
I'm sure you're super busy as always, but hope that you get enough down-time to
enjoy things.
Thanks for that 26-year-old post. (!)
What other dark secrets lay dormant in the POV-Ray parser, waiting to one day be
awakened . . . ?
- BE
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmail com> wrote:
> Hi Bill
>
> Some posts in this old thread, ... may
> also be relevant:
This one too:
https://news.povray.org/povray.general/thread/%3Cweb.63cc2badcc2a7a8c1742c61c57ffd389%40news.povray.org%3E/?ttop=446984
&toff=200
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Which is the same macro construct as the following:
// ------------------ Scalar failure ---------------------------
#macro BugScalar(A,B,X)
#if (X < A)
0
#else
((X - A) / (B - A))
#end
#end
// ------------------ Vector failure ---------------------------
#macro BugVector(X)
#if (X < 0.5)
<1,0,0>
#else
<0,1,0>
#end
#end
However this works:
#macro Test (N)
0
#end
#local Val = Test (1);
and (provisionally)
#macro Test (N)
#if (N < 1)
#local Result = 0;
#else
#local Result = 1;
#end
Result
#end
#local Val = Test (1);
Also, as Mr. Callwood advised in an older thread,
wrapping the internals of the macro in parentheses allows successful evaluation:
#macro BugScalar(A,B,X)
(
#if (X < A)
0
#else
((X - A) / (B - A))
#end
)
#end
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Now, jr has mentioned various thing about my semicolon usage.
I noticed upon review that I can successfully assign an array without a
semicolon, and then it's only the subsequent array that triggers the error when
it doesn't have a semicolon.
So I'm thinking that it might be partially about the semicolon, but also that
the parser allows "tandem assignments" through without raising any kind of
warning or error.
See:
https://news.povray.org/web.68fc36a5251da1bc1f9dae3025979125%40news.povray.org
I noticed that the parser allowed and didn't complain about:
#local in2 = #local Result = {EcResult [2], EcResult [4]};
So who know what other wacky constructs it will let slip through.
- BE
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
hi,
"Bald Eagle" <cre### [at] netscape net> wrote:
> Now, jr has mentioned various thing about my semicolon usage.
> I noticed upon review that I can successfully assign an array without a
> semicolon, and then it's only the subsequent array that triggers the error when
> it doesn't have a semicolon.
_can_ because the parser is "forgiving", but relying on .. a quirk ?
"Note: There should be a semi-colon after the expression in all float,vector and
color identifier declarations."
<wiki.povray.org/content/Reference:Declare_and_Local_Directives#Declaring_identifiers>
> ...
> I noticed that the parser allowed and didn't complain about:
> #local in2 = #local Result = {EcResult [2], EcResult [4]};
> So who know what other wacky constructs it will let slip through.
not that one[*], beta.2 says:
Parse Error: Expected 'RValue to declare', { found instead
same with parentheses (tried supplying a "tuple" instead).
[*] replaced the 'EcResult's with '123.456' and '789.012'.
regards, jr.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"jr" <cre### [at] gmail com> wrote:
> > I noticed that the parser allowed and didn't complain about:
> > #local in2 = #local Result = {EcResult [2], EcResult [4]};
> > So who know what other wacky constructs it will let slip through.
>
> not that one[*], beta.2 says:
>
> Parse Error: Expected 'RValue to declare', { found instead
>
> same with parentheses (tried supplying a "tuple" instead).
>
> [*] replaced the 'EcResult's with '123.456' and '789.012'.
On 3.7 or 3.8?
Because remember, clipka was playing around with a LOT of parser stuff during
that time, adding and then rolling back. IIRC, that's when I started noticing it
more.
Also, thanks for running the test(s).
- BE
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
https://news.povray.org/6613cd42%241%40news.povray.org
"There are issues in all the recent parser variations with respect to
sometimes necessary, but missing semicolons. The yuqk fork has addressed
a few of them in its version of the parser, but certainly not all.
The worst cause flaky behavior during parsing without any notice
something has gone wrong."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Yes, Bill - We've been here for a while now...
And you are right; I've been very busy the last years.
Not much time to do POV-Ray work =(
But you, IIRC, have always been - and still are - quite active in here.
Very good!
This Easter I've had some spare time. So, when you, in another post,
mentioned this recent 3Blue1Brown video for us (thank you btw.):
"How (and why) to take a logarithm of an image"
https://www.youtube.com/watch?v=ldxFjLJ3rVY&t=2462s
- I couldn't resist exploring the "Droste Effect" in Escher's
"Print Gallery" picture with POV-Ray. I've made some progress in
achieving this in POV-Ray. I'll post some of my results here.
Here are some other useful texts I've found regarding this topic:
"M.C. Escher: More Mathematics Than Meets the Eye" - By Sara Robinson
https://im-possible.info/english/articles/escher_printgallery/index.html
"A logarithmic image transformation" - by Jos Leys
https://www.josleys.com/article_show.php?id=82
As far as I can see, the page above has much the same contents as
the document below. But Firefox and Edge do not try to render the
jsMath formulas within it. The PDF file from the page below has the
formulas rendered, but it's behind a pay wall.
"The Droste effect image transformation" - by Jos Leys
https://www.sciencedirect.com/science/article/abs/pii/S0097849306002433
--
Tor Olav
http://subcube.com
https://github.com/t-o-k
"Bald Eagle" <cre### [at] netscape net> wrote:
> Hi Tor!
>
> I've been bus reviewing all sorts of code, and that of course led me across all
> the different places that we've crossed paths.
> So I was literally just thinking about you for the past few days.
>
> I'm sure you're super busy as always, but hope that you get enough down-time to
> enjoy things.
>
> Thanks for that 26-year-old post. (!)
>
> What other dark secrets lay dormant in the POV-Ray parser, waiting to one day be
> awakened . . . ?
>
> - BE
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmail com> wrote:
> Yes, Bill - We've been here for a while now...
Yep - you for far longer than I. ;)
> And you are right; I've been very busy the last years.
> Not much time to do POV-Ray work =(
That's life. Work is work, and hobbies are hobbies.
We need clones. :D
> But you, IIRC, have always been - and still are - quite active in here.
> Very good!
Almost every day. It keeps my mind active, and I just have all of the ideas
that I have to somehow meaningfully get out of my head. That's why I appreciate
POV-Ray so much - it allows me to simultaneously document and create, and
explore things that a GUI modeler just can't do.
> - I couldn't resist exploring the "Droste Effect" in Escher's
> "Print Gallery" picture with POV-Ray. I've made some progress in
> achieving this in POV-Ray. I'll post some of my results here.
I've been meaning to explore it myself, since it touches on much of what I've
played with in terms of functions in the complex plane, geometric inversion,
procedural patterns, Doyle spirals, etc.
> "M.C. Escher: More Mathematics Than Meets the Eye" - By Sara Robinson
> https://im-possible.info/english/articles/escher_printgallery/index.html
>
> "A logarithmic image transformation" - by Jos Leys
> https://www.josleys.com/article_show.php?id=82
>
> As far as I can see, the page above has much the same contents as
> the document below. But Firefox and Edge do not try to render the
> jsMath formulas within it. The PDF file from the page below has the
> formulas rendered, but it's behind a pay wall.
Yes. I found Jos' page as well, and the formulas wouldn't render for me either.
I tried downloading jsMath and unzipping it (holy motherlode of files! :O ) but
I'm assuming I'm missing some key step in getting a browser to locate,
recognize, and use it.
I'd love to have some kind of math formula formatting suite of macros . . . cue
Project Number 4,597.
I have new internet arriving on Thursday, so I can continue with various
projects that are stalled due to connectivity.
Happy Easter - hope to "see" you again sometime soon.
- BE
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Also:
The original paper:
https://www.ams.org/notices/200304/fea-escher.pdf
https://www2.oberlin.edu/faculty/kwoods/talks/escher.pdf
http://roy.red/posts/droste/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |