POV-Ray : Newsgroups : povray.general : I need math help : I need math help Server Time
19 Nov 2024 11:28:46 EST (-0500)
  I need math help  
From: =Bob=
Date: 5 Mar 2002 16:52:31
Message: <3c853e1f@news.povray.org>
I need a formula to slowly adjust one value to
another value over a known period. For example,
I have an increment value of 1 and I want that
value to decrease until it's 0 (or some other
value as needed, 0 for now). And I must reach
the known period (length in this case).

So I would be doing something like:

somelen = 62;
incval = 1;
someotherval = ?

for (x=0;x<somelen;x+=incval)
    {
    incval -= someotherval;
    if (incval <= 0)
        break;
    }

I need x to achieve "somelen" and "incval" to
achieve the value of 0 at about the same time,
give or take a bit.

How do I calculate "someotherval" ?
Thanks for your help.
=Bob=


Post a reply to this message

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