interleave 2 one-dimensional matrices


    Oct 31 2006 | 6:09 pm
    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

    • Oct 31 2006 | 6:18 pm
    • Oct 31 2006 | 6:18 pm
      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
      >
      >
    • Oct 31 2006 | 6:19 pm
      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
      >
      >
      >
      >
      >
    • Oct 31 2006 | 6:24 pm
      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
    • Oct 31 2006 | 6:40 pm
      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