3d matrix as "rubik's cube"

Feb 10, 2009 at 3:27pm

3d matrix as "rubik's cube"

Hi there,

I am “misusing” jit.matrix (three dimensions, 1 char plane) to store state information of my monome (16×16) for multiple switchable pages (16). The state information will be quite dynamic due to automation etc., and I would like to visualize the state as a rotatable cube (16x16x16) where lit led’s are represented by smaller white boxes.

I would imagine that there would be a rather easy way to visualize that with OpenGL, but I can’t get my head around (at least not going for the easiest way).

any ideas ?

cheers, nick

#42221
Feb 10, 2009 at 5:36pm

try to feed it to jit.gl.multipale

On Tue, Feb 10, 2009 at 7:27 AM, Nick Laqua wrote:

>
> Hi there,
>
> I am “misusing” jit.matrix (three dimensions, 1 char plane) to store state
> information of my monome (16×16) for multiple switchable pages (16). The
> state information will be quite dynamic due to automation etc., and I would
> like to visualize the state as a rotatable cube (16x16x16) where lit led’s
> are represented by smaller white boxes.
>
> I would imagine that there would be a rather easy way to visualize that
> with OpenGL, but I can’t get my head around (at least not going for the
> easiest way).
>
> any ideas ?
>
> cheers, nick
>

#151056
Feb 14, 2009 at 11:49pm

>
> I am “misusing” jit.matrix (three dimensions, 1 char plane) to store state information of my monome (16×16) for multiple switchable pages (16). The state information will be quite dynamic due to automation etc., and I would like to visualize the state as a rotatable cube (16x16x16) where lit led’s are represented by smaller white boxes.
>
————————————

I’d actually use 16 videoplanes (or plane gridshapes) stacked on top of each other rather than a cube, it seems easier to tell where things ought to be (the lit LEDs). Otherwise you’d actually be drawing them all as little cubes (65536 of them…) to fill your main 16x16x16 cube. Rubik would be proud, but your processor might complain.

With videoplanes you can create the coloration using data from the third plane of your matrix and apply it as a texture, rather than drawing each cell (on=white off=black or clear), which seems like it would take much longer to do. You could have some scaling of your z values to allow the planes to separate or collapse in a stack, and of course move them independently if you want. To rotate the whole mess use a jit.gl.handle on the scene itself rather than the objects (with inherit_transform=0).

Having controllable blending on each plane, plus maybe different colorations, would look really great and allow you to see lots of your states at once. Maybe a mode where all 16 are laid out flat and shrunk would also be helpful, so scale x and y positions to fit the overall scene in a 4 x 4 layout, and keep the z at 0 for this mode. You can still use the handle to navigate around this mode, of course.

#151057
Feb 20, 2009 at 3:50am

–>
Otherwise you’d actually be drawing them all as little cubes (65536 of them…) to fill your main 16x16x16 cube.
–>

ach, ‘ total noob mistake. That’s 4096, not 65536. Still, that’s a lotta cubes.

curious to hear what progress you may have made with this…?

:)

#151058
Feb 23, 2009 at 4:54pm

sorry for not having replied before, I haven’t had time to implement this feature yet as being rather low priority as I need to focus on the audio features first…

but certainly on the radar, although I was wondering whether the “individual cube drawing” approach would be feasible too by only drawing the “set” ones (which shouldn’t be near 4096 at all).

#151059

You must be logged in to reply to this topic.