def alpha_for_triangle(points, m, n):
 alpha = zeros((m, n))
 for i in range(min(points[0]), max(points[0])):
  for j in range(min(points[1]), max(points[1])):
   x = linalg.solve(points, [i, j, 1])
   if (min(x) > 0):
    alpha[(i, j)] = 1
 return alpha

def alpha_for_triangle ( points , m , n ) : alpha = zeros ( ( m , n ) ) for i in range ( min ( points [ 0 ] ) , max ( points [ 0 ] ) ) : for j in range ( min ( points [ 1 ] ) , max ( points [ 1 ] ) ) : x = linalg . solve ( points , [ i , j , 1 ] ) if ( min ( x ) > 0 ) : alpha [ ( i , j ) ] = 1 return alpha
creates alpha map of size for a triangle with corners defined by points .