The line crossing a triangle is called a 'traversal'. The applet below has a traversal cutting the triangle ABC at X on BC, Y on AC and Z on AB. The lengths of the directed segments (anti-clockwise) between each vertex and the adjacent intersection of the traversal are given by AZ, ZB, BX, etc. In this applet, you can:

Change the shape of the triangle by moving the vertices

Change the position of the traversal by moving points Z and X