POV-Ray : Newsgroups : povray.general : Function based patterns ... value returned from function ... : Function based patterns ... value returned from function ... Server Time
2 Aug 2024 04:23:57 EDT (-0400)
  Function based patterns ... value returned from function ...  
From: Neil Kolban
Date: 18 Jan 2005 23:21:15
Message: <41ede03b$1@news.povray.org>
Folks,
I was having a go at updating our wiki on an area I am studying ... function 
based patterns ...

http://www.wikipov.org/ow.asp?FunctionBasedPatterns

As I started writing what I thought I knew, a question struck me that I 
think I need some help with.

If I declare a function foo(x,y,z) ... then this function is going to return 
a float calculated from x, y and z.

And this is where I get confused ...

If the value returned is between 0 and 1 .... 0.0 <= value <= 1.0 then I see 
how that can be applied to a color map to generate an appropriate color. 
But what about values outside of the color map range ... what of values < 
0.0 and > 1.0 ... how do they get mapped to a color value?

I am going to guess that the integer portion is thrown away ... but that is 
a guess ...

so

2.73   -> 0.73
199.2 -> 0.2
-56.6 -> 0.6

But this is a guess ...

Neil


Post a reply to this message

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