Dividing jit.pwindow into rectangles (easiest way?)
hello!
I want to devide my jit.pwindow into even rectangles via jit.lcd and I'm looking for the most convenient & effective way to do this (surprise!)...
this is my patch so far - and I don't feel like leaning back on it. :)
I didn't post this in the jitter forum for I don't assume this specifically to be a jitter problem.. more a logical thinking and inference capability issue. :)
thankful for any thoughts!
nice weekend to all..
-jonas
Here's where some context might matter - why do you want to do it?
If you're splitting a matrix into pieces, my first resort would be
jit.scissors/jit.glue unless I knew what I was doing wouldn't need
that....
hey gregory!
it's for an installation (motion capture) - I want to divide my camera input into equal parts and depending on where you step, you trigger sounds etc.. I've got the jitter bit going fairly well, now I'm looking for a "comfortable" way to set up my zones/areas..
my example patch is the LONG way.. imagine I want to split up my window into 50 (trigger) areas, and not only 4 - I'd have a lot more copy 'n pasting to do..
all the best!
-jonas
my patch accommodates to many objects, I'll just have to tax my brain for this one =)
my jit.pwindow's 320 x 240 in size, let's say I want it devided into 10 even areas
thus my rectangles are 32x24 in size (school wasn't for nothing after all..!)
rectangle row 1
0 0 32 24
32 0 64 24
64 0 96 24
96 0 128 24
rectangle row 2
0 24 32 48
32 24 64 48
64 24 96 48
96 24 128 48
etc
OR
rectangle column 1
0 0 32 24
0 24 32 48
0 48 32 72
0 72 32 96
recangle column 2
32 0 64 24
32 24 64 48
32 48 64 72
32 72 64 96
etc
I'll get to the maths behind that. :) what else are vacations best for?
nice weekend to everyone!
-jonas
here's one way to draw a grid with jit.lcd.
if you intend to perform color tracking, you can plug in the jit.findbounds tutorial into this patch.
it should only be a matter of some simple math to determine which section the center of the bounds is currently in.
hey rob!
first of all - thanks for attending to both of my requests! :)
because this topic and
fairly go hand in hand..
my intention does appear cumbersome, but I actually want to be able to shove my zones around individually, after having equally filled my [jit.pwindow] in mentioned manner. (which is a piece of cake after having come up with an automation..)
that's why I modified your patch a little to get a whole bunch of single rectangles (which merely give the impression of a grid - my mistake in being more precise about my intentions)..
I'll get back to obove-mentioned jitter thread - and post my patch once having combined the two!
and here's what I've made out of your food for thought..
cheers!
-jonas