POV-Ray : Newsgroups : povray.advanced-users : Texture transition : Re: Texture transition Server Time
29 Jul 2024 00:34:37 EDT (-0400)
  Re: Texture transition  
From: Christopher James Huff
Date: 2 Jun 2003 20:46:56
Message: <cjameshuff-4C9236.19393102062003@netplex.aussie.org>
In article <3edae66e@news.povray.org>, "Slime" <slm### [at] slimelandcom> 
wrote:

> function {
>     select(y-100,
>         // if y < 100
>         select(y-(-100),
>             0 // if y < -100
>             (y-(-100))/200 // else (y >= -100)
>         ),
>         1 // else (y >= 100)
>     )
> }

I think select() is a bit overkill for this. My suggestions were more 
general, but if you want something that fits this precise situation:
function {max(-100, min(100, y))/200 + 0.5}

Plus, I think you're missing a comma in the inner select().

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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