code: public float[] getNormal(int index) {
      	float[] current = getPoint(index);
      	float[] prev = getPoint(index - 1 < 0 ? getPointCount() - 1 : index - 1);
      	float[] next = getPoint(index + 1 >= getPointCount() ? 0 : index + 1);
      	
      	float[] t1 = getNormal(prev, current);
      	float[] t2 = getNormal(current, next);
      	
      	if ((index == 0) && (!closed())) {
      		return t2;
      	}
      	if ((index == getPointCount()-1) && (!closed())) {
      		return t1;
      	}
      	
      	float tx = (t1[0]+t2[0])/2;
      	float ty = (t1[1]+t2[1])/2;
      	float len = (float) Math.sqrt((tx*tx)+(ty*ty));
      	return new float[] {tx/len,ty/len};
      }
docs: Get the combine normal of a given point
  
  @param index The index of the point whose normal should be retrieved
  @return The combined normal of a given point