POV-Ray : Newsgroups : povray.text.tutorials : Tips & tricks: How speed-up calculations in loops - part II : Re: Tips & tricks: How speed-up calculations in loops - part II Server Time: 28 Jul 2014 10:18:27 GMT
  Re: Tips & tricks: How speed-up calculations in loops - part II  
From: Warp
Date: 25 May 2002 20:49:41
Jonathan Wooldridge <jwooldrige [at] attbicom> wrote:
> #local C=C-1;
> // Do stuff with C

> #local C=C-1;
> // Do stuff with C

  If you can get rid of those #locals and do only one #local C=C-10 at the
end of the loop, better.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

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