Example usage:Difference of vectors:

vexpr {1 1 1} {2 2 2} - > 1.0 1.0 1.0 vexpr {2 2 2} {1 1 1} - > -1.0 -1.0 -1.0The robot arm with 3 degrees of freedom:

# Positions of the joints set A_pos {0.0 0.0 0.0} set B_pos {1.0 0.0 0.0} set C_pos {2.0 0.0 0.0} # Rotations of the joints set A_rot {0 0 45} set B_rot {0 0 45} set b_transform [vexpr $A_pos $B_pos - affine_translate $A_rot radiens affine_rotate affine_multiply] set b_real [vexpr $B_pos $b_transform vector_transform] set c_transform [vexpr $C_pos $B_real - affine_translate load affine_multiply $B_rot radiens affine_rotate affine_multiply] set c_real [vexpr $C_pos $c_transform vector_transform] > 0.0 2.0 0.0