we need a support group for ppl addicted to math images.
how can i make it so that in a while it will go for a certain number and
skip like
go while 0-15 then to 45-30
From: Mark Wagner
Subject: Re: math support
Date: 28 Aug 1999 01:09:26
Message: <37c76f06@news.povray.org>
Noah A wrote in message <37C75A75.9104ACCC@powersurfr.com>...
>we need a support group for ppl addicted to math images.>how can i make it so that in a while it will go for a certain number and>skip like>go while 0-15 then to 45-30>
#declare counter = 0;
#while(counter != 29)
/*Do something*/
#if(counter < 16)
#declare counter = counter + 1;
#end
#if(counter > 16)
#declare counter = counter - 1;
#end
#if(counter = 16)
#declare counter = 45;
#end
#end
Mark
Noah A wrote:
> > we need a support group for ppl addicted to math images.> how can i make it so that in a while it will go for a certain number and> skip like> go while 0-15 then to 45-30
This is not a math question as much as it is a proceedure question. Mark's
example looks good to me so I will defer to his narrative on the remainder
of you needs.
--
Ken Tyler
See my 850+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html
From: Bob Hughes
Subject: Re: math support
Date: 28 Aug 1999 16:41:29
Message: <37c84979@news.povray.org>
Might also look into 'range' as well, used in the '#switch'
definition. Although the already said '#while' method seems perfectly
plausible for the problem. Except I would put the last '#if' in the
middle instead, and include a 30 check also. I might be in error so be
warned.
#declare counter = 0;
#while(counter != 29)
/*Do something*/
#if(counter < 16)
#declare counter = counter + 1;
#end
#if(counter = 16)
#declare counter = 45;
#end
#if(counter = 30)
#declare counter = 29;
#if(counter > 16)
#declare counter = counter - 1;
#end
#end // 30 check
#end
Bob
Mark Wagner <mar### [at] gtenet> wrote in message
news:37c76f06@news.povray.org...
>> Noah A wrote in message <37C75A75.9104ACCC@powersurfr.com>...> >we need a support group for ppl addicted to math images.> >how can i make it so that in a while it will go for a certain
number and
> >skip like> >go while 0-15 then to 45-30> >>> #declare counter = 0;> #while(counter != 29)> /*Do something*/> #if(counter < 16)> #declare counter = counter + 1;> #end> #if(counter > 16)> #declare counter = counter - 1;> #end> #if(counter = 16)> #declare counter = 45;> #end> #end>> Mark>>>
i meant an easy way
Noah A wrote:
> we need a support group for ppl addicted to math images.> how can i make it so that in a while it will go for a certain number and> skip like> go while 0-15 then to 45-30
Noah A wrote:
> > i meant an easy way> > Noah A wrote:> > > we need a support group for ppl addicted to math images.> > how can i make it so that in a while it will go for a certain number and> > skip like> > go while 0-15 then to 45-30
#declare tt=0; // counter
#declare dd=1; // increment-step
#while (tt!=30)
---- do something! anything! ----
#declare tt=tt+dd;
#if (tt=15)
#declare tt=45;
#declare dd=-1;
#end
#end
Remco