Javascript and MultiTouch

s.rozsa's picture

Hi to the fine folks at Kineme.

I did not wanted to go too much off-topic in the Gesture Recognition thread, but i would like to ask for some help here in the forum. I am fiddeling around with QC and MultiTouch for a while now. My goal is to get some easy to use patches, macros whatever so that also newbies or non programmers like me can make at least some easy and nice looking multitouch applications. I have done some easy (a pretty cheesy) QC-compositions the last few weeks (and it makes fun making them) but now that i comes to more complicated things (well complicated for me) i could use some help from some JavaScript experts... I have also a small MultiTouch site together with Ben Britten (well, he's the coder - and the serious app you may find on that site are from him - i'm doing the cheesy QC stuff and some graphics :-). In case you are interested: www.xtuio.com...

Here is one of my (many) problems:

I have put together a Surface-Like Lighttable application (using also some code from other people). I have tryed to comment everything inside the composition. So far it is working well, but i have some big problems with the rotate/scale stuff. The composition is using the TUIO plugin so in case you may want to help me out you should install that in the plugin folder. I will post the plugin and also the TUIO simulator (java) along with the composition since i don't think that so many people here have a MultiTouch table :-)

It would be very kind, if somebody from this forum could give me a helping hand. If you would like to contact me: rozsa (at) cd-cologne (dot) de

Thank you in advance,

Sandor

PreviewAttachmentSize
TuioClient.zip78.14 KB
TUIO_Simulator.zip159.01 KB
QC_LIGHTBOX.zip98.05 KB

gtoledo3's picture
Some thoughts come to mind

Some thoughts come to mind on the stuff you are talking about... without giving any examples other than some ideas. I'm way too busy to cobble something together, and don't have the time to look at this stuff right now :o(

Look at the pdf zoom in the developer examples for a good method of scaling via CI. Look at the teapotii optical flow example. That can be revised to work with tuio, and you can use a "3D transform" in that scenario instead of the teapot renderer... that will help you with the "throwing around" the pictures stuff.... you can attach a control method to the z of the 3d transform as a "semi-zoom" type of function as well. Then look at the open CV set points javascript/iterator stuff of Chris's that is in the openCV examples, and the javascript patch that was posted by kristopf for "dropping" points. Between all of that, you should be able to cobble together what you are wanting to do most likely.

s.rozsa's picture
Thanks George,

Thanks George,

i got some greatfully little help here inhouse, so that i was able to do some improvements. I am posting the new file anyhow - there are a few things i can't figure out. In case somebody is inrrested - any help is welcome! :-)

Move, Rotate and Scale: - they are working now quite well. The problem is that they should do the rotate/scale with the "touchA" (the first touch) as a midpoint. Also there are some minor glitches with the javascript stuff (actually now its is a mix of two scripts - so it's a bit ugly and cheesy...)

Drop Shadows: - a lightbox app needs dropshadow ;-) Anyhow: i am having some problems. I am using the NI-Drop Shadow filter. I like that little filter and don't having problems with usually. But here ther's a problem with the Z-orders of the iterated pictures. If i have the "dethTesting in Read/write" modus, the pictures are displayed with a frame around. If i put the depthTesting in "none" or "read" modus they are looking fine - but than again i get a reverse z_order for the pictures and of course the whole javascript move/rotate/scale goes crazy... ;-)

Mouse in Rect: - well that's derivated from a QC Button example. I was using this for faking Mouse events like Klick and Double Klick etc with TUIO... Anyone an idea how this could be done a little bit easyer (maybe a nice JS???)

I will keep this thread running and post my results (if any)...

Cheers,

PreviewAttachmentSize
xLIGHTBOX_TEST.zip98.32 KB
depthtesting_off.jpg
depthtesting_off.jpg73.99 KB
depthtesting_on.jpg
depthtesting_on.jpg67.84 KB