Stack Input/Output:

3D case: [[b1, b2, b3], Y, Z, T | L]-> XEQ A ->[[x, y, z], Y, Z, T | [b1, b2, b3]]Variables:

2D case: [[b1, b2, b3], Y, Z, T | L]-> XEQ A ->[[x, y], Y, Z, T | [b1, b2, b3]]

Reads:

K : First vertex (3D vector), in 3D case. Populated by the T program.Program:

L : Second vertex (3D vector), in 3D case. Populated by the T program.

M : Third vertex (3D vector), in 3D case. Populated by the T program.

U : First vertex of triangle projected to 2D (2D vector), in 2D case. Populated by the T program.

V : Second vertex of triangle projected to 2D (2D vector), in 2D case. Populated by the T program.

W : Third vertex of triangle projected to 2D (2D vector), in 2D case. Populated by the T program.

A001 LBL AComments:

A002 ABS

A003 RDN

A004 FS? 2

A005 GTO A008

A006 eq Kx([1,0,0]xLASTX)+Lx([0,1,0]xLASTX)+Mx([0,0,1]xLASTX)

A007 RTN

A008 eq Ux([1,0,0]xLASTX)+Vx([0,1,0]xLASTX)+Wx([0,0,1]xLASTX)

A009 RTN

Terms of use.

Mnemonics: None realy, but letter is left to B, the program label for Barycentric to Cartesian conversion.

If we are working in 2D (flag 2 set) we are applying the weights (barycentric coordinates) to the 2D coordinate's of the projected triangle (line A008) else applying the weights to the vertexes 3D coordinates (line A006).

## No comments:

Post a Comment