ism3d.maths.geometry.points_in_triangle

ism3d.maths.geometry.points_in_triangle(x1, y1, x2, y2, x3, y3, x_arr, y_arr, count=False, method='path')[source]

count=True will return point number acount and triangle size

x_arr=np.random.rand(10**6) y_arr=np.random.rand(10**6) %lprun -f points_in_triangle points_in_triangle(0,0,0,1,1,1,

x_arr,y_arr,count=True,method=’path’)

%lprun -f points_in_triangle points_in_triangle(0,0,0,1,1,1,

x_arr,y_arr,count=True,method=’area’)

0.035s vs. 0.045s