Mapping between planes and dimensions in jitter matrices

Apr 26, 2013 at 5:19am

Mapping between planes and dimensions in jitter matrices

Dear all,

What is the simplest way to convert between matrix dimensions and planes?

e.g.:

I make a jit.matrix 6 float32 10 20

Where
planes = rgbxyz
10 = objects
20 = object history

And where in one instance I want to interpret this as: jit.matrix 20 float32 10 6
so I can use a jit.iter to iterate across the 20 dimensions, producing the color/position history of each cell as a list…

Can it be done neatly?

Thanks,

John

#67953
Apr 26, 2013 at 9:18am

this seems a good place for jit.gen
have a look here for a tutorial about the ‘swiz’ operator, which can be what you want

http://cycling74.com/2012/02/02/gen-tutorial-2a-the-joy-of-swiz/

#244243

You must be logged in to reply to this topic.