POV-Ray : Newsgroups : povray.general : is PHASE working backwards? : Re: is PHASE working backwards? Server Time
25 Apr 2024 00:49:33 EDT (-0400)
  Re: is PHASE working backwards?  
From: Kenneth
Date: 11 Feb 2018 17:55:01
Message: <web.5a80c89b51e282aca47873e10@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

>
> Did you also test with v3.6 and/or v3.7.0?
>

Just tried it in v3.7.0, and the behavior is the same.

But I've been giving this behavior some more thought-- assuming that phase is
working *correctly* (disregarding the radial pattern for the moment.)

I'll use the gradient x pattern as an example (on a flat box, as a 'view or
window into the pattern'):

pigment{
     gradient x
     frequency 1
     phase 0.5
....

I was originally expecting the gradient x pattern *itself* to move 0.5 units to
the right. But the 'opposite' concept is that phase 0.5 shifts the *view* of the
pattern to the right-- as if phase is a 'camera' looking at a (static) pattern.
If this 'camera' moves to the right, then the VIEW of the pattern naturally
appears to shift to the left. In more technical terms, a positive phase 'climbs
through' the pattern's color_map index values: instead of 'seeing' the pattern
from index 0.0 to 1.0, it now sees it from 0.5 to 1.5 (actually, the index
starts repeating.)

If this is so, then my original expectation was wrong.

And in the case of the radial pattern, it's just a simple mistake in the docs:
Instead of "...rotate y*angle", it should be "...rotate -y*angle".

Honestly, it has been quite awhile since I used the phase keyword; my memory of
its long-ago operation is probably 'backwards' ;-)


Post a reply to this message

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