POV-Ray : Newsgroups : povray.advanced-users : maths 0..100 -> 0.5..5..0.5 : Re: maths 0..100 -> 0.5..5..0.5 Server Time
6 Oct 2024 12:56:52 EDT (-0400)
  Re: maths 0..100 -> 0.5..5..0.5  
From: Günther Dietrich
Date: 15 Oct 2006 03:25:17
Message: <rj3904-k0m.ln1@520042650687.t-online.de>
"Chrisir" <nomail@nomail> wrote:

>I need a function f(index) that for my index going from 0 to 100 (so it's:
>0,1,2,3,4...99,100) returns the values between 0.5 and 5 for index between
>0 and 50 and then between 5 and 0.5 back again for index between 50 and
>100.

f(x) = 5 - 0.09 * abs(x - 50)



Best regards,



Post a reply to this message

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