POV-Ray : Newsgroups : povray.advanced-users : Keeping objects spaced enough using Array? : Re: Keeping objects spaced enough using Array? Server Time
29 Jul 2024 18:16:31 EDT (-0400)
  Re: Keeping objects spaced enough using Array?  
From: Ron Parker
Date: 25 Mar 2002 08:28:30
Message: <slrna9u9fv.804.ron.parker@fwi.com>
On Mon, 25 Mar 2002 10:45:41 +0100, Thorsten Froehlich wrote:
> In article <slr### [at] fwicom> , Ron Parker 
><ron### [at] povrayorg>  wrote:
> 
>> It wouldn't be any slower than a regular binary tree, but it would have a
>> limit on the maximum depth, it would take up more storage than absolutely
>> necessary, and it couldn't be balanced.
> 
> Actually, this implies it isn't possible to make an array (of arbitrary size,
> of course) an element of another array, or is this possible?  I have to admit

I didn't mean to imply that.  What I was saying was that using an array to
represent the tree directly using the scheme I mentioned limits the depth
to a maximum, unless you want to spend lots of time enlarging the array.

However, I think perhaps we could add a few lines to Parse_Array_Declare to
allow syntax like this to enlarge an array more quickly:

#declare A=array[5] {1, 2, 3, 4, 5}
#declare B=array[10] A

or maybe something a little more attractive...

-- 
plane{-z,-3normal{crackle scale.2#local a=5;#while(a)warp{repeat x flip x}rotate
z*60#local a=a-1;#end translate-9*x}pigment{rgb 1}}light_source{-9red 1rotate 60
*z}light_source{-9rgb y rotate-z*60}light_source{9-z*18rgb z}text{ttf"arial.ttf"
"RP".01,0translate-<.6,.4,.02>pigment{bozo}}light_source{-z*3rgb-.2}//Ron Parker


Post a reply to this message

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