POV-Ray : Newsgroups : povray.bugreports : one source, two images : Re: one source, two images Server Time
17 May 2024 19:42:55 EDT (-0400)
  Re: one source, two images  
From: William F Pokorny
Date: 1 Feb 2024 17:57:19
Message: <65bc21cf$1@news.povray.org>
On 2/1/24 07:28, William F Pokorny wrote:
>> My vague recollection is that some time during v3.71->v3.8 development 
>> a typo was introduced somewhere in the class set up for the spiral 1 & 
>> 2 patterns. We ended up with two spiral1(s) or two spiral2(s) instead 
>> of one of each - or something similar to that. Likely in pattern.h or 
>> pattern.cpp or both.
> 
> In looking at a question elsewhere I realized there is more going on 
> with these spiral 1 & 2 changes that I realized when I picked up an 
> unexpected difference in spiral1 spin direction in yuqk. I'll need to 
> dig for a while.

OK. I did not remember correctly - not that much of a surprise these days.

The typo in the v3.8 code is in the parser not in the class definitions 
for the spirals. Further, the typo is in a section which pertains to the 
use of the spiral1 pattern in a function.

In the file parser_materials.cpp there are two blocks of code looking like:


...
         CASE (SPIRAL1_TOKEN)
             New->Type = GENERIC_PATTERN;
             New->pattern = ParseSpiralPattern<Spiral1Pattern>();
         END_CASE
...



...
         CASE (SPIRAL1_TOKEN)
             New->Type = GENERIC_PATTERN;
             New->pattern = ParseSpiralPattern<Spiral2Pattern>();
         END_CASE
...

That second one is in a section which handles function{ pattern {} } 
wrap differences (though the spiral has none) and it should of course read:

...
         CASE (SPIRAL1_TOKEN)
             New->Type = GENERIC_PATTERN;
             New->pattern = ParseSpiralPattern<Spiral1Pattern>();
         END_CASE
...


On the rotational difference between v3.8 and yuqk
--------------------------------------------------

It is intentional!

I forgot that the spiral patterns were two of those touched by the fix 
to POV-Ray's internal Turbulence() function - for the distribution drift 
on the omega values.

While I was doing the work to adjust to that turbulence change and to 
move to the internal turbulence keywords (it_* (a)), I noticed the 
official POV-Ray rotation for the spiral pattern was right handed about 
z as the distance from the origin increased rather than the more normal 
- and likely expected - left handed rotation(b).

(a) - The spiral's turbulence in official POV-Ray has long been 
colliding with the pattern modifier's 'frequency' keyword usage.

(b) - With yuqk, I have, in a few other places too, moved to change 
right handed implementations of stuff to left handed ones.

Remembering all this, I recall there is somewhere a detailed post on 
everything going on that was fixed / changed in yuqk with the spiral 
patterns.

And yep! That I cannot remember my own work is a little disturbing.

Bill P.


Post a reply to this message

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