POV-Ray : Newsgroups : povray.general : The Language of POV-Ray : Re: The Language of POV-Ray Server Time
10 Aug 2024 09:10:41 EDT (-0400)
  Re: The Language of POV-Ray  
From: Johannes Hubert
Date: 9 Mar 2000 13:27:32
Message: <38c7ed14$1@news.povray.org>
"PoD" <pod### [at] merlinnetau> wrote in message
news:38C7EEA3.D0EE7FF1@merlin.net.au...
> Axel Baune wrote:

> >Problem
> > two: What if you want to increment the variable in non deterministic
> > steps, e.g. different steps width in each loop or you didn't want to
> > increment in each loop. Than you will need the old while-construct,
and
> > why blowing up Pov-Script with higly specialised commands if you
already
> > have flexibler and more general commends for them? As a more skilled
> > programmer you can always write macros for specialised problems.
>
> Then use a while loop and nothing is lost, except that you've made
your
> script hard to read.  There's probably an easier way to do it using
> for()

For example:

for (I = 1; I <= something; ) {
    // loop body here
    I += non_deterministic_increment;
}

Johannes


Post a reply to this message

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