jit.gl.render xyz coordinates
Hi all,
I'm using jit.gl.render in tri-grid mode (and playing a movie into it for testing purposes). If I set the geometry dims to 4, I get a grid of 3 x 3 squares with diagonals going across each square. OK so far. I would like to analyse the position of each intersection so I get a list of xyz coordinates as they move. Simple question - how do i do it?!
Cheers
Rob
===================================
Rob Godman
Reader in Music
Programme Leader for Composition
John Lill Centre for Music Studies
Faculty for the Creative and Cultural Industries.
University of Hertfordshire
United Kingdom
T (44) 01707 284583
M 0781 249 1670
E r.godman@herts.ac.uk
For more information ....
http://www.uhshop.co.uk/subcat6-1344.aspx
http://perseus.herts.ac.uk/uhinfo/staff/?id=719376
http://www.herts.ac.uk/artdes1/research/papers/wpades/vol4/index.html
http://www.thedark.net
===================================
i think a patch would be useful to understand what you are trying to do... it's a bit unclear what you are using to create the geometry in jit.gl.render.
as an initial pointer, i would suggest something like geometry matrix > jit.spill, then parse the list out into groups of 3 (xyz coords).
hth,
justin
Hi Justin,
Thanks for your reply. I'm using the jit.gl.render.grid patch from the Jitter examples folder as a starting point. If I put jit.gl.render in tri-grid mode it will output the grid that I'm after. Changing the value of the geometry dims message will give me a greater or lesser number of squares (i.e. grid with a higher or lower resolution). It's an xyz reference of these intersection points that I'm after.
Does this make sense?
Cheers
Rob
hi rob,
it kind of makes sense... although an idea of what you want to do with the xyz data could lead to other (perhaps more elegant) solutions.
on my system (mbp 2.16 / osx 10.4.11 / latest maxmspjitter) the plane doesn't render in tri_grid mode, despite rendering with other modes. so perhaps i'm not seeing the same behaviour as you are?
Anyway i have posted an example of what i mentioned (jit.spill solution). But i can think of better ways to do this with jit.gl.grishape > jit.gl.mesh... But as i said at the start of my post, it depends on what you want to do afterwards.
justin
and an example of the other way...
j
Hi Justin - sorry for the late reply on this one. I couldn't open these patches (even with placing additional headers). However, from having a look at the text I see where you are going and have got a load of numbers! I understand the matrix is now giving me a list of numbers but I'm not sure that they are really coordinates of the grid?
Cheers
Rob
yes, it looks like the coordinates are not right... could be a problem with the ordering of the coordinates. I have tried with triangular grid, but it doesnt seem to differ.
some insight from someone at c74 would be good. dont have much time at the moment to look into this!
here's the patch as an attachment.
j
Hi - many thanks for this. yeap, still not sure what all these numbers mean! (not the first time I've had this feeling in all my years of using max/msp). However, i suspect there is a solution in here and I'll dig further.
Cheers
Rob