Texture Module

reconstruction.texture.cartesian2barycentric_slow_test()

Given a triangle spanned by three cartesion points r1, r2, r2, and point r, return the barycentric weights l1, l2, l3.

Returns:
ndarray (of dim 3) weights of the barycentric coordinates
reconstruction.texture.cartesian2barycentric_test()
lambda_1 = (y_2 - y_3)(x - x_3) + (x_3 - x_2)(y - y_3) /
(y_2-y_3)(x_1-x_3)+(x_3-x_2)(y_1-y_3)
lambda_2 = (y_3 - y_1)(x - x_3) + (x_1 - x_3)(y - y_3) /
(y_2-y_3)(x_1-x_3)+(x_3-x_2)(y_1-y_3)

lambda_3 = 1 lambda_1 - lambda_2

Returns:
ndarray (of dim 3) weights of the barycentric coordinates
reconstruction.texture.fill_triangle()

Fill a triangle by applying the Barycentric Algorithm for deciding if a point lies inside or outside a triangle.

reconstruction.texture.fill_triangle_src_dst()

Fill a triangle by applying the Barycentric Algorithm for deciding if a point lies inside or outside a triangle.