POV-Ray : Newsgroups : povray.beta-test : arrays.inc : Re: arrays.inc Server Time
2 Nov 2024 17:19:44 EDT (-0400)
  Re: arrays.inc  
From: Warp
Date: 22 Oct 2001 03:25:01
Message: <3bd3c9cd@news.povray.org>
Philippe Debar <phd### [at] belgacomnet> wrote:
: #local X = Array[FInd];

  That's a relic.
  My original sorting code used that X like this:

#local J = J-1; #while(Array[J] > X) #local J = J-1; #end
#local I = I+1; #while(Array[I] < X) #local I = I+1; #end

  However, the modified (ie. generalized) version does it this way:

#local J = J-1; #while(Sort_Compare(Array, FInd, J)) #local J = J-1; #end
#local I = I+1; #while(Sort_Compare(Array, I, FInd)) #local I = I+1; #end

  Thus, the declaration of X has become obsolete and should be removed.

  Good point.

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


Post a reply to this message

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