|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Will the new array function (latest pov release) allow you
to define an array of ANY size...say 30 by 200 ?
Also...is there a tutorial which deals mostly with this function?
thanks, stu7
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Stewart #7 wrote:
>
> Will the new array function (latest pov release) allow you
> to define an array of ANY size...say 30 by 200 ?
>
> Also...is there a tutorial which deals mostly with this function?
>
> thanks, stu7
I believe it it limited to a maximum of 5 x n in the format of
<a,b,c,d,e>,
<f,g,h,i,j>,
<k,l,m,n,o>,
etc...
See also the thread I started in this group:
Subject: Mandelbrots, Rand, and maybe more...
Date: Fri, 28 May 1999 21:27:56 -0700
From: Ken <tyl### [at] pacbellnet>
Newsgroups: povray.advanced-users
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 30 Jun 1999 12:25:31 -0700, Ken wrote:
>
>
>Stewart #7 wrote:
>>
>> Will the new array function (latest pov release) allow you
>> to define an array of ANY size...say 30 by 200 ?
>>
>> Also...is there a tutorial which deals mostly with this function?
>>
>> thanks, stu7
>
>I believe it it limited to a maximum of 5 x n in the format of
>
><a,b,c,d,e>,
><f,g,h,i,j>,
><k,l,m,n,o>,
>etc...
Why should that be? You're not limited to a single-dimensional
array, you know. Consider this example, from the docs:
#declare Rows=5; #declare Cols=4;
#declare Table=array[Rows][Cols]
Here are the real limits on arrays, gleaned from the source code:
- An array may have a maximum of five dimensions.
- All of the elements in an array must be of the same type.
- Each dimension may be as large as needed, but the product of the sizes must
be no greater than the size of a signed int on your architecture. For most
current architectures, this is something like 2 billion, so you'll probably
run out of either time or memory first.
This information is also in the documentation for arrays, except for the maximum
size (probably because it's so ridiculously huge as to not bear mentioning.)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 1 Jul 1999 6:00 AM, Ron Parker <mailto:par### [at] fwicom> wrote:
>On Wed, 30 Jun 1999 12:25:31 -0700, Ken wrote:
>>
>>
>>Stewart #7 wrote:
>>>
>>> Will the new array function (latest pov release) allow you
>>> to define an array of ANY size...say 30 by 200 ?
>>>
>>> Also...is there a tutorial which deals mostly with this function?
>>>
>>> thanks, stu7
>>
>>I believe it it limited to a maximum of 5 x n in the format of
>>
>><a,b,c,d,e>,
>><f,g,h,i,j>,
>><k,l,m,n,o>,
>>etc...
>
>Why should that be? You're not limited to a single-dimensional
>array, you know. Consider this example, from the docs:
>
> #declare Rows=5; #declare Cols=4;
> #declare Table=array[Rows][Cols]
>
>Here are the real limits on arrays, gleaned from the source code:
> - An array may have a maximum of five dimensions.
[rest snipped]
and if you run out after 5D then:
#declare a_big_array=array[3][3][3][3][3]
#declare another_array=array[2][2]
#declare a_big_array[0][0][0][0][0]=3.141592653589793;
//note you *must* assign values to elements before assigning an array to
//another array's element, otherwise the parser objects when accessing the
//element in the #statistics line below
#declare another_array[0][0]=a_big_array//notionally now a 7D array
#statistics str(another_array[0][0][0][0][0][0][0],3,9)
which allows variable length and dimension arrays... anyone for lists of
vertices?
(note: you can test array elements for the dimensions of the array held in
the element, but testing the containing array doesn't take those dimensions
into account)
As this is undocumented (as far as I can see) it probably isn't a good idea
to build scenes which rely on it, just mentioned it in case someone needs
>5 array dimensions NOW.
Have Fun
Martin
--
Owner/Operator - Tesseract Computing
<hyp### [at] tesseractcomau> or just reply.
Computer Systems Officer - Tourism Tasmania
<Mar### [at] tourismtasgovau>
I speak for me.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|