POV-Ray : Newsgroups : povray.general : I need math help : Re: I need math help Server Time
19 Nov 2024 11:41:18 EST (-0500)
  Re: I need math help  
From: =Bob=
Date: 5 Mar 2002 20:00:45
Message: <3c856a3d$1@news.povray.org>
Hi Tor,

Thanks for responding. How would I know
how many steps (NrOfSteps) to use? Or am
I missing something? What I'm trying to achieve
is to decrease a value over a known length in
an unkown number of steps.

Thanks for your help!
=Bob=

"Tor Olav Kristensen" <tor### [at] hotmailcom> wrote in message
news:3C855736.7D202442@hotmail.com...

[My post deleted]

: Since you're asking in povray.general,
: I'll answer with a POV script:
:
: #declare StartValue = 31;
: #declare EndValue = 3;
: #declare NrOfSteps = 10;
:
: #declare dValue = (EndValue - StartValue)/NrOfSteps;
: #declare Step = 0;
: #while (Step <= NrOfSteps)
:   #declare X = StartValue + Step*dValue;
:   #debug "\n"
:   #debug str(X, 0, -1)
:   #declare Step = Step + 1;
: #end // while
: #debug "\n"
:
: Tor Olav


Post a reply to this message

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