Multi-touch gear for navigation

@Alhugen
If you place code below above the snippet of your code I posted above; the arrow will point to the top of your isosceles triangle, no matter the sequence of the touches.
Of course you also have to change to
float dx = touches[top].x - centreX;
float dy = touches[top].y - centreY;

      md = min((int)dist1, (int)dist2, (int)dist3);
      if((int) dist1 > md) b_dist1 = true;
      if((int) dist2 > md) b_dist2 = true;
      if((int) dist3 > md) b_dist3 = true;
      if(b_dist1 && b_dist2) top = 0;
      if(b_dist1 && b_dist3) top = 1;
      if(b_dist2 && b_dist3) top = 2;
      b_dist1 = false;
      b_dist2 = false;
      b_dist3 = false;
/*
Of course you need to declare the global vaiables
boolean b_dist1, b_dist2, b_dist3;
int top;
float md;
*/