POV-Ray : Newsgroups : povray.documentation.inbuilt : Mysterious function argument : Re: Mysterious function argument Server Time
18 Oct 2021 15:25:13 EDT (-0400)
  Re: Mysterious function argument  
From: Kenneth
Date: 4 Oct 2021 14:55:00
Message: <web.615b4d143ec630374cef624e6e066e29@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:
> On 10/3/21 7:05 PM, Kenneth wrote:
> >
> > Question 2:
> > Your F3 function  is
> >          #declare F3 = function { F0(x+1,y/2,z) }
> > and the V3 function is
> >          #declare V3 = F3(1,2,3);
> >
> > Those have 3 components <x...,y...,z...>, yet your #debug for V3 uses just
> > 'str' to pull out some kind of*single*  value (not 'vstr' to pull out
> > all 3 or 5). I thought  str  would outright *fail* with a 3-component
> >  function... yet it does not, interestingly. Is your F3 function
> > 'continuous', or does it just create a single value?
>
> F3 is continuous because F0 is. F3 calls F0 which is defined as
> function{pattern{bozo}} as as such it is a scalar function - it returns
> a single value. F0 is continuous only because the bozo pattern is a
> continuous pattern.

Ah! That's the 'missing piece of the puzzle' for me, in TWO ways:
1) It explains the successful  str  use in #debug-- because function F0 (the
bozo PATTERN) is a *scalar* function, not a multi-component color function. I
have always assumed that such pigment 'patterns', even though grayscale, still
contain 3 (or maybe 5) color components like <.3,.3,.3,0,0>. But they are just a
SINGLE value like .3.  Thanks! That clears up a long-standing misconception for
me.

2) It also explains to me why F0 (and F3), when actually used (as they are),
cannot have a dot operator like .gray added-- because the function is *scalar*
with only one component; the dot operator 'mechanism' assumes that there or 2 or
more components, and fails.

Much food for thought! I'm still 'putting all of the pieces together'...


Post a reply to this message

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