POV-Ray : Newsgroups : povray.general : Weirdnesses with function patterns : Re: Weirdnesses with function patterns Server Time
29 Jul 2024 00:24:10 EDT (-0400)
  Re: Weirdnesses with function patterns  
From: David Given
Date: 8 Dec 2013 17:13:21
Message: <52a4ef01@news.povray.org>
On 08/12/13 20:02, clipka wrote:
[...]
>> Instead what happens is the return value of the function is clipped into
>> the [0..1] range.
> 
> This is consistent with each and every other pattern, and entirely
> intentional.

In which case can this be made explicit? It's really not obvious from
either the documentation or the code.

In addition, I've just discovered this:

#version 3.7;
#local f = function { pigment { rgb <10, 10, 10> }}
#warning str(f(0, 0, 0).red, 0, 1)

...prints 10.

Also I note that some of the internal pattern functions that drive
things like cubic, hexagon etc will return values outside [0..1]. But I
think these are all safely isolated from the user, unless there's a code
path to Evaluate_TPat which I haven't found yet.

-- 
┌─── dg@cowlark.com ─────
http://www.cowlark.com ─────
│ "There does not now, nor will there ever, exist a programming
│ language in which it is the least bit hard to write bad programs." ---
│ Flon's Axiom


Post a reply to this message

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