Archive

Posts Tagged ‘multitouch’

MTRuler : Applying multitouch In Daily Life

November 1, 2009 Leave a comment

DOWNLOAD : HERE

I was quite busy last few days having to set up a mail server in campus (check mail.bits-goa.ac.in) , had python workshop and had some CSD projects . Anyway for last 2 days i have been making this app and was successful yesterday. The purpose of Human Computer Interaction is to make the interaction between the computer and human more and more natural. So that there remains no difference between the computer literate and illiterate . Both use the computer as they use any other normal daily life machines.

So one day i got an idea that if we can just put anything on the multitouch screen and get its dimensions . Well then i thought we might not always want all dimensions but just few lengths . So i thought of this application . Christain Moore gave me an application which demonstrated this very nicely and I got idea how to start and build it. But then it was just able to measure in pixels which we don’t use in our daily life. So I was more interested in making it measure in Inches and Cms. After a little research i found out that this depends upon the dpi(dots per inches) which depends upon the screen and can not be found by any means with any programming. So I decided finally that the application can be calibrated so that it can show the values of the length in inches and cms.

MTRuler2

P.S : This Application supports 2 touches (as for measurement u can use only two touches ) and 3 touches sometime (like while calibrating ).

So as you click on the application, the app will run in full-screen mode. If this is the first time you are doing this (or if you have never calibrated before) then the scoreboard will show only in pixels results and others (like Inches and Cms) will show N/A . You can try this by just putting two fingers at any two points, between which the distance you want to measure.This is all set if you want to measure in pixels.

Next is to calibrate this to measure even the Inches and Cms . I have made the app so that we only calibrate for Inches and it converts itself into Cms itself (given the conversion that 1 Inch=2.54 cms) . So to calibrate just press the which button which says “Calibrate 6Inch” . That means you can calibrate for 6 inches. So Just press that and the button will move to the middle of the stage. Now put a scale on the screen and touch at 2 places on the screen and adjust so that the two cursors are at 6 Inch distance. After you adjust that just click on the third place on the screen and the button returns to its original place . That means the calibration is done. Now you are all set to go to use it .

Now touch at any two points in the screen and it shows up the distance between the two points in Inches, Cms and pixels.The result box can be dragged anywhere and scaled to any amount (Hail RotatableScalable). This only supports length and distance between two points at the moment. Will try to add more support if i get time in future . Enjoy. In the next post I will discuss about the classes used and how this works . Thanks again to Christian Moore for his guidance .

NUIpad : Multitouch Editor v 0.1

October 13, 2009 Leave a comment

N.B : If you dont want to go through the gossip and just try it please see the end of the post where i have links :P

Well I was away for quite a few days and was out of any work . So i decided to create something simple and got this idea. I don’t know if someone else has done something like this or not but I am quite happy that I was able to do this  :) .I dont tell that this is a great application but as for me as new to Actionscript 3.0 and multitouch world this is great .

So enough boasting :P   . Coming over to the application this is basically an multitouch editor which has an text area where we insert text using a Multitouch Keyboard . this is how it looks NUIPad

Well as you open difference instances of this you will get the MTPad with different colors (because i could not decide which color will be the best i put it random ) . Let me know if you want it to be of a particular color ( give me the uint code of the color if possible ).  In this editor you can change the font size and also the format with which you can write (i.e make it bold or italic or underlined or a combo of all these ) . The information of the text will appear in the textboxes with Grey background ( The ones with containing “A” and 20 in the figure ) . The “Keyboard” key will toggle the visibility of the keyboard . The “X” button at right bottom corner will close (of course) . For now the Caps key will substitute the work of the SHIFT key.The keyboard and the editor can be re-sized to any extent (Hail RotableScalable).the class RotatableScalable may not be bug free(I have to find one yet) but surely is very useful class in AS3 programming in multitouch.It really cuts down your work.

Well for now these are the features yet to be implemented and i know it lacks many features .

Features it does not have yet :

  • Ths shift key in the keyboard is missing. This is because of the bug i discussed in this thread . Well I think i can fix it now . If possible will fix it in next release .
  • some of the combination of keys do not work like “ctrl+A” , “alt+f4″ .
  • A scroller.
  • You can not insert in the middle of any place (There is no work of the up,down,left right key as there is no cursor/carat) .
  • Also we can set the paragraph style which is not implemented yet .
  • Saving into text file . Of course there is no meaning in creating a text file unless until i can save it to somewhere . Well i have implemented (and removed) a system where i can save the file to text file because that needs the mouse interaction (so removed). Till nowi dont understand how to do this . I am thinking of executing a batch file or shell script with the whole text as argument . Well but this will create a number of files  If anyone has any other idea please welcome .(Language : AS3)
  • I am thinking of having an icon of MTPad, which on click we can have multiple instances of this editor running .

Till now I have done this much. I have tried and fixed any bug I found . Still I can not guarantee that this will be bugfree. So any bugs found please let me know . Will try to fix that .

Basically there is something i want to tell you why i chose to keep this name.First i thought i will keep it viMT but then thought well if i do tat half the vi supporter will kill me as it is nothing in front of that . Then i thought the name as MTEdit which sounds quite like gedit (gnome text editor) . But gedit has quite nice facilities  like indenting and highlighting then suddenly i thought of the notepad (Windows notepad) . I think this was a suitable name and so kept it MTPad . Like notepad i can change the text size (of course with much ease). Of course this is not nearer to notepad (given it can select text and replace, save,open and you can change the text color and font) but it surely is closer to notepad. (NO OFFENCE)

Regarding the code part I will share them once i have documented them properly (will require 1 or 2 days at max). But now i surely want to tell that i have made a MTButton class, a MTCustomKeyboard class,a MTFullKeyboard class and an MTEditor class. I have tried to make these classes very configurable . I will discuss about the code and how to use all these classes in your application .

Also i wanted to tell you that the whole application was developed with pure code using FlashDevelop and i never used the flash IDE. FlashDevelop is a great IDE and is very fast compared to flash.I just want to tell everyone who works with flash please try FlashDevelop an opensource and free IDE for ActionScript.

I would like people to try it out on their MT setup if they can as i dont have one till date (Tell me any change i need to make).Please let me know what you feel about the application (may be good or bad ,both are welcome,Also bugs and what more can be done) through comments. Of course your comment will surely be helpful  and encourage me to work harder on it . :)

DOWNLOAD THE APPLICATION

download swf : Need to set the flash player security settings

download exe: Click on free download (wait for 60 secs that sucks).Just run and enjoy

The sourcecode with all the classes will be shared in a day or two after documenting it properly with instruction how to use them properly in your work .

Follow

Get every new post delivered to your Inbox.