Update fillTriangle to improve performace