interleave 2 one-dimensional matrices

Oct 31, 2006 at 6:09pm

interleave 2 one-dimensional matrices

I’m looking for a way to interleave 2, 3-plane, 1-dimensional matrices into
1 3-plane matrix that’s twice as wide. They both contain xyz values, each
cell 3 planes.I want every plane to interleave like this:

plane 0: a1x, b1x, a2x, b2x, a3x, b4x
plane 1: a1y, b1y, a2y, b2y, a3y, b4y
plane 2: a1z, b1z, a2z, b2z, a3z, b4z

I have a feeling there is a way to do this with jit.expr or other jitter
objects, but I can’t get my head around it. It’s not very hard to do in C,
but can someone show me how to do it with regular jitter objects?

cheers, -thijs

#28456
Oct 31, 2006 at 6:18pm

#87380
Oct 31, 2006 at 6:18pm

damn it I should know better… type “interleave” @ maxobjects.com and find
the answer in 0.12sec.

sorry for the noise.

-thijs

On 10/31/06, Thijs Koerselman

wrote:
>
> I’m looking for a way to interleave 2, 3-plane, 1-dimensional matrices
> into 1 3-plane matrix that’s twice as wide. They both contain xyz values,
> each cell 3 planes.I want every plane to interleave like this:
>
> plane 0: a1x, b1x, a2x, b2x, a3x, b4x
> plane 1: a1y, b1y, a2y, b2y, a3y, b4y
> plane 2: a1z, b1z, a2z, b2z, a3z, b4z
>
> I have a feeling there is a way to do this with jit.expr or other jitter
> objects, but I can’t get my head around it. It’s not very hard to do in C,
> but can someone show me how to do it with regular jitter objects?
>
> cheers, -thijs
>
>

#87381
Oct 31, 2006 at 6:19pm

jit.multiplex?

wes

On 10/31/06, Thijs Koerselman

wrote:
> I’m looking for a way to interleave 2, 3-plane, 1-dimensional matrices into
> 1 3-plane matrix that’s twice as wide. They both contain xyz values, each
> cell 3 planes.I want every plane to interleave like this:
>
> plane 0: a1x, b1x, a2x, b2x, a3x, b4x
> plane 1: a1y, b1y, a2y, b2y, a3y, b4y
> plane 2: a1z, b1z, a2z, b2z, a3z, b4z
>
> I have a feeling there is a way to do this with jit.expr or other jitter
> objects, but I can’t get my head around it. It’s not very hard to do in C,
> but can someone show me how to do it with regular jitter objects?
>
> cheers, -thijs
>
>
>
>
>

#87382
Oct 31, 2006 at 6:24pm

On Oct 31, 2006, at 10:09 AM, Thijs Koerselman wrote:

> I’m looking for a way to interleave 2, 3-plane, 1-dimensional
> matrices into 1 3-plane matrix that’s twice as wide. They both
> contain xyz values, each cell 3 planes. I have a feeling there is a
> way to do this with jit.expr or other jitter objects, but I can’t
> get my head around it. It’s not very hard to do in C, but can
> someone show me how to do it with regular jitter objects?

I believe jit.multiplex may be of use. jit.expr isn’t particularly
useful for spatial operations as it currently stands.

-Joshua

#87383
Oct 31, 2006 at 6:40pm

On 10/31/06, Wesley Smith wrote:
>
> jit.multiplex?

hehe, thanks guys for the quick responses. I tried to correct myself from
asking this stupid question, but I just wasn’t fast enough….:-)

cheers, -thijs

#87384

You must be logged in to reply to this topic.