POV-Ray : Newsgroups : povray.beta-test : POV-Ray v3.8.0-alpha.10013324 : Re: POV-Ray v3.8.0-alpha.10013324 Server Time
18 Jun 2021 02:17:37 EDT (-0400)
  Re: POV-Ray v3.8.0-alpha.10013324  
From: Kenneth
Date: 15 Jan 2019 08:35:01
Message: <web.5c3ddd2cb703701fcd98345b0@news.povray.org>
I've at least tried the text-object example that was crashing the previous
alpha-version, and it works fine now. Kudos!

[Clipka wrote]:
>
> The text is encoded in only mildly obfuscated form in the R vector:
>
>      #local R=<7084844682857967,0787982,826975826580>
>
>      70 84 84 46 82 85 79 67   78 79 82   82 69 75 82 65 80
>      F  T  T  .  R  U  O  C    N  O  R    R  E  K  R  A  P
>
> I actually found it pretty easy to untangle: Knowing that there is no
> such default, I looked for /some/ mechanism that could conjure strings
> out of thin air. `chr` was my hottest candidate, and once I spotted it
> in macro `L(P)`, the rest almost trivially fell into place.

Trivial??!  :-O  Nice detective work!

I just spent several hours going through that code-- which is really brilliant--
to dissect it. I understand *most* of it now, but there are some particular
pieces of code syntax that I'm not quite grasping. (Sorry to go off-topic, but
the code is fascinating.)

BTW, #debugging  mod(P,100) in the #while loop gives me these values (i.e.,
in reversed order from yours):

        67 79 85 82 46 84 84 70   82 79 78   80 65 82 75 69 82
        C  O  U  R   . T  T  F    R  O  N    P  A  R  K  E  R

..... along with some less-than-1.0 fractional values.

The syntax questions:
1) In the #while loop, the value of mod(P,100) eventually falls below 1.0 to a
decimal fraction (before P itself finally reaches such a small value as to be
considered zero or 'false', to end the loop.) But what does   chr(...)  'see'
when it sees a fraction like
         0.70848?
Or rather, does mod(...) truncate fractions to zero? Whatever ASCII character
that  chr(...) *does* return in such a case would seem to be part of the final
text string (via the #while loop); but I'm wondering how that affects the final
text object, if at all?

I'm also wondering how the code's #macro construct adds the required
double-quotes around the #while-loop's created strings (for final use in the
text objects). The syntax used there is new to me. There's a pair of
double-quotes near the end of the macro that *looks* like it's just an 'empty
string', but I don't grasp what it's doing.


Post a reply to this message

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