I wrotea program based ontuiodemo.on the sideof the fiducial, I have avolume.volumefunctionworks withtcur.getY();tcur.getY() workswith the height ofthewindowof the program. (0 at the top and 1 at the bottom of screen) if I putthe finger ontop of the screen, the circle go tothe top of thearc,if I putmy fingeron downof the screen,the circle go to the bottom ofthe arc. tcur.getY();must work with theheight of the arcnext tothe fiducial Soif I putthe fingeron the top of thearc, the circle mustgo tothe top of thearc and if Ishouldput thefinger on the bottom ofthe arc, the circle mustgo tothe bottom of thearc
look the problem with TUIO simulator
Thx
this is the code;
import TUIO.*;
TuioProcessing tuioClient;
// these are some helper variables which are used
// to create scalable graphical feedback
int circlex=25;
int circley=-2;
int circleSize = 60;
int SIZE = 69;
float tobjAngle;
float xpos,ypos;
float yposTcur, yposTcur1,yposTcur2;
float circleX, circleY;
float angle,angle1;
float BPM = 120;
float millisPerBeat = 1000/(BPM/60.0);
float cursor_size = 15;
float object_size = 60;
float table_size = 760;
float scale_factor = 1;
PFont font;
void setup()
{
//size(screen.width,screen.height);
size(640,480);
noStroke();
smooth();
loop();
hint(ENABLE_NATIVE_FONTS);
font = createFont("Arial", 18);
scale_factor = height/table_size;
// we create an instance of the TuioProcessing client
// since we add "this" class as an argument the TuioProcessing class expects
// an implementation of the TUIO callback methods (see below)
tuioClient = new TuioProcessing(this);
}
// within the draw method we retrieve a Vector (List) of TuioObject and TuioCursor (polling)
// from the TuioProcessing client and then loop over both lists to draw the graphical feedback.
void draw()
{
background(125,125,255);
textFont(font,18*scale_factor);
Tobject();
}
// these callback methods are called whenever a TUIO event occurs
hi guy's
I have a problem, maybe someone can help me.
I have made an ellipse who slide on an arc with a tcur fonction in Tuio library
but it work with the height of the screen but I want to work with the height of de fiducial
How can I do this