POV-Ray : Newsgroups : povray.binaries.utilities : Array Patch! Server Time
26 Dec 2024 08:47:43 EST (-0500)
  Array Patch! (Message 1 to 6 of 6)  
From: Jamis Buck
Subject: Array Patch!
Date: 13 Dec 1997 13:25:50
Message: <3492D32E.E647D175@cs.byu.edu>
OK!  I've just finished coding and briefly testing a patch for POVRay
that supports ARRAYS!  I don't know about the rest of you, but I've been
wanting this for awhile, and (although it still needs to be tested some
more) this seems to work pretty well.  If there is anyone out there that
would be interested, I'll post the altered files.  (I'd post them now,
but I'd like to add some more error checking and do some more testing).

- Jamis Buck
buc### [at] csbyuedu
http://students.cs.byu.edu/~buck


Post a reply to this message

From: Sam & Tina Barnes
Subject: Re: Array Patch!
Date: 13 Dec 1970 19:11:34
Message: <01bd081c$ed74c040$a8332399@default>
I would like to see them. 

Jamis Buck <buc### [at] csbyuedu> wrote in article
<3492D32E.E647D175@cs.byu.edu>...
> OK!  I've just finished coding and briefly testing a patch for POVRay
> that supports ARRAYS!  I don't know about the rest of you, but I've been
> wanting this for awhile, and (although it still needs to be tested some
> more) this seems to work pretty well.  If there is anyone out there that
> would be interested, I'll post the altered files.  (I'd post them now,
> but I'd like to add some more error checking and do some more testing).
> 
> - Jamis Buck
> buc### [at] csbyuedu
> http://students.cs.byu.edu/~buck
>


Post a reply to this message

From: Michael C  Andrews
Subject: Re: Array Patch!
Date: 22 Jan 1998 10:15:38
Message: <34C7629A.546F@reading.ac.uk>
Jamis Buck wrote:
> 
> OK!  I've just finished coding and briefly testing a patch for POVRay
> that supports ARRAYS!  I don't know about the rest of you, but I've been
> wanting this for awhile, and (although it still needs to be tested some
> more) this seems to work pretty well.  If there is anyone out there that
> would be interested, I'll post the altered files.  (I'd post them now,
> but I'd like to add some more error checking and do some more testing).
> 
> - Jamis Buck
> buc### [at] csbyuedu
> http://students.cs.byu.edu/~buck
Any more progress with this patch yet - otherwise I may have to get down
to some real programming again and try for myself!

		Mike Andrews.


Post a reply to this message

From: Ronald L  Parker
Subject: Re: Array Patch!
Date: 26 Jan 1998 10:03:36
Message: <34cca523.242182600@10.0.2.33>
On Sat, 13 Dec 1997 11:25:50 -0700, Jamis Buck <buc### [at] csbyuedu>
wrote:

>OK!  I've just finished coding and briefly testing a patch for POVRay
>that supports ARRAYS!  

How do your arrays work?  Can you put any object, texture, halo,
camera, or whatever definition into each element of the array, or are
they limited to mundane things like numbers and vectors?  I'd like to
see something like this:

#declare Stuff=array[20]
#declare Stuff[0]=sphere{...}
#declare Stuff[1]=texture{...}

Is that possible in your implementation?


Post a reply to this message

From: Twyst
Subject: Re: Array Patch!
Date: 27 Jan 1998 14:09:15
Message: <34ce31ac.0@news.povray.org>
Ronald L. Parker wrote in message <34c### [at] 100233>...
>On Sat, 13 Dec 1997 11:25:50 -0700, Jamis Buck <buc### [at] csbyuedu>
>wrote:
>
>>OK!  I've just finished coding and briefly testing a patch for POVRay
>>that supports ARRAYS!
>
>How do your arrays work?  Can you put any object, texture, halo,
>camera, or whatever definition into each element of the array, or are
>they limited to mundane things like numbers and vectors?  I'd like to
>see something like this:
>
>#declare Stuff=array[20]
>#declare Stuff[0]=sphere{...}
>#declare Stuff[1]=texture{...}
>
>Is that possible in your implementation?
>

heheh.. That's EXACTLY how it's implemented!
You can do multi-dimensional arrays as well..
Here's the (sparse) docs we have for it:

Arrays are declared as follows:
  #declare <identifier> = array[ <size> ]
       examples:
          #declare my_array = array[ 25 ]
          #declare p12      = array[ array_size ]
Elements in an array are accessed and assigned as follows:
  #declare <identifier>[ <index ] = <blah blah blah>
       examples:
          #declare my_array[ 13 ] = my_sphere_object
          #declare p12[ idx ] = <13,y_var,zvals[idx]>
          #declare temp = my_array[ 14 ]
Arrays may be nested to create multi-dimensional arrays as well,
as follows:
  examples:
     #declare my_array[ 0 ] = array[ 10 ]
     #declare my_array[ 0 ][ 0 ] = 15
Note: to create such a multi-dimensional arrays, you must iteratively
create each level (see the arraytest2.pov file for an example of how
this might be done).
The size of an array may be accessed with the upper_bound function,
as follows:
  examples:
     #declare my_size = upper_bound( my_array )

Twyst================================
EFnet and NewNet #povray Channel Operator
Website: http://twyst.home.ml.org
E-Mail: twy### [at] v-wavecom
=====================================


Post a reply to this message

From: Chris
Subject: Re: Array Patch! (43k)
Date: 23 Jan 1998 19:17:49
Message: <34c9718f.0@news.povray.org>
>
>> OK!  I've just finished coding and briefly testing a patch for POVRay
>> that supports ARRAYS!

>Any more progress with this patch yet - otherwise I may have to get down
>to some real programming again and try for myself!
>


In the past, I have used Excel for repetitive commands.  I put the points in
a series of cells.  Then I have a second section which references the first.
See the attached file for examples

I have no idea how the POV development team work, but I would be surprised
if they would put such a feature in this application.

Cheers
Chris


Post a reply to this message


Attachments:
Download 'code.xls.dat' (43 KB)

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