## need some help with generating geometry matrix

Jun 13, 2012 at 11:44pm

# need some help with generating geometry matrix

hi!
i am trying to create simple cube by sending geometry matrix to jit.gl.mesh. i have read a lot about geometry matrices, verticles and stuff like that but still cant find the clue. i rid that when drawing objects using draw_mode tri_grid the verticles are connected either to neighbor from the same plane and the other plane.
i thought that i will create rectangle of verticles with constant z value 1 in the first dim, and then just copy values, changing z to -1 into the second dimmension. the result is something like unfinished, open cube.
so my questions are:

-why would we even need 2 dimmension matrices for geometry?
-why the smallest dimmensions to draw the cube correctly is “dim 8 8″? isnt 64 points for creating simple shape quite lot?
-in my patch under “matrix data from jit.gl.gridshape” comment there are jit.cellblock. why a lot of values are repeated?
- what for there are two verticles in the middle of two sides?

– Pasted Max Patch, click to expand. –

`

#46612
Jun 14, 2012 at 9:30pm

up up >)

#167662
Jun 15, 2012 at 11:14am

Hi,
but maybe this image can do.

[attachment=196670,4042]

###### Attachments:
#167663
Jun 17, 2012 at 11:25pm

thanks, thats really helpfull. however i have got no idea how to understand the format of the matrix esspecially when it comes to draw_mode: quad_grid and tri_grid and multidimmensional arrays…

jitter “appendix b: the opengl matrix format” says that

“quad_grid: If the geometry matrix has two dimensions, quadrilaterals are drawn which link each vertex to its neighbors in the matrix to form a surface. “

but it has nothing to do with matrixoutput of gridshape – that couldnt be for example 16 X 2 dim…
is there any tutorial, or helpfile that i am missing, dealing with geometry matrices?

#167664

You must be logged in to reply to this topic.