Triangles Program (Processing Language)

I coded the following program in Processing Language. The program will create colorful triangles on the screen, depending on where the screen is touched.

Please page down to see the coding, and please click here to see (and hear) a video of the execution of this program.

import ddf.minim.*;

Minim minim;
AudioPlayer player;

float rise1;
float rise2;
float run1;
float run2;

int count = 1;
float[] tri= {0, 0, 0, 0, 0, 0, 0};

void setup() {
  fullScreen();
  textSize(20);
  minim = new Minim(this);
  player = minim.loadFile("water-droplet-1.mp3");
}

void draw() {
}

void mouseClicked() {
  if (count == 1) {
      tri[1] = mouseX;
      tri[2] = mouseY;
      fill(0);
      text(("a(" + round(tri[1]) + " , " + round(tri[2]) + ")"), tri[1], tri[2]);
      count++;
  }
  else if (count == 2) {
      tri[3] = mouseX;
      tri[4] = mouseY;
      line(tri[1], tri[2], tri[3], tri[4]);
      text(("b(" + round(tri[3]) + " , " + round(tri[4]) + ")"), tri[3], tri[4]);
      count++;
      rise1 = tri[4]-tri[2];
      run1 = tri[3]-tri[1];
  }
  else if (count == 3) {
      tri[5] = mouseX;
      tri[6] = mouseY;
      count = 1;
      fill(random(255), random(255), random(255), 100);
      triangle(tri[1], tri[2], tri[3], tri[4], tri[5], tri[6]);
      fill(0);
      text(("c(" + round(tri[5]) + " , " + round(tri[6]) + ")"), tri[5], tri[6]);
      displayArea();
      player.play();
      player.rewind();
  }
}

float areaTriangle(float x1, float y1, float x2, float y2, float x3, float y3) {// with trig
  float area = (x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2))/2;
  return area;
}

void displayArea() { //gotta get the centroid!
  float cX = (tri[1] + tri[3] + tri[5])/3;
  float cY = (tri[2] + tri[4] + tri[6])/3;
  float valArea = areaTriangle(tri[1], tri[2], tri[3], tri[4], tri[5], tri[6]);
  String area = str(abs(valArea));
  text("A=" + (area), cX, cY);
}

void getDistance(float x1, float x2, float y1, float y2) {
  float distance = sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));
}