[PD] Multi-dimensional arrays
lists at liminastudio.com
Sat Jan 29 17:04:04 CET 2011
Thanks for the responses everyone; I've been using gridflow and after a rocky start I've figured out what seems to be a pretty efficient solution, based around [#store] and [#many]. I'll be putting the patch up online very soon!
On Jan 29, 2011, at 10:27 AM, Mathieu Bouchard wrote:
> On Sat, 29 Jan 2011, Andrew Faraday wrote:
>> I havn't tried store, but you can always use multiple arrays with the same index, IE
>> (arrays) pos-X, pos-Y, pos-Z
>> I know that ascii hasn't come across very well, but it basically translates to multiple dimentions called up by the same index
> Ok, I don't think Tedb0t meant that. In your case, you have multiple dimensions in the space in which you pick each "value". The normal meaning of "3-dimensional array" is an array in which the indices have three dimensions.
> So, in your case, the data has 2 dimensions of indices, the latter dimension being used to pick X,Y,Z. if it's a numbered dimension, 0 may stand for X, 1 for Y, and 2 for Z.
> In our case, if the first dimension of indices has 50 possibilities, and the 2nd has 240 possibilities, and the 3rd has 320 possibilities, there are 50*240*320 = 3840000 elements that need to be put somewhere, and I don't think we'd like to spread that over too many arrays.
> "Your" concept of dimension is often called "channel" instead of "dimension" in GridFlow, such as the R,G,B channels of a colour picture (or Y,U,V channels, etc.). But many GridFlow object-classes don't know what's a channel, and don't need to know. In any case, a single structure contains all channels, numbered. Thus it's easy to have any number of channels, even a million.
> | Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
More information about the Pd-list