Fix the triangle bug

the Affine coordinate should be like this:
alpha + beta + gamma = 1

I just calculate the alpha and beta
I also check if the alpha [0,1] gamma [0,1]
But I ignore to check if the sum of alpha and beta
I add the check alpha+beta<=1 to fix this bug