text: Calculate displacements along axes
code: dx = ( l / math . sqrt ( 1 + ( m * m ) ) ) * 0.5 NEW_LINE dy = m * dx NEW_LINE a . x = p . x - dx NEW_LINE a . y = p . y - dy NEW_LINE d . x = p . x + dx NEW_LINE d . y = p . y + dy NEW_LINE b . x = q . x - dx NEW_LINE b . y = q . y - dy NEW_LINE c . x = q . x + dx NEW_LINE c . y = q . y + dy NEW_LINE print ( int ( a . x ) , " , ▁ " , int ( a . y ) , sep = " " ) NEW_LINE print ( int ( b . x ) , " , ▁ " , int ( b . y ) , sep = " " ) NEW_LINE print ( int ( c . x ) , " , ▁ " , int ( c . y ) , sep = " " ) NEW_LINE print ( int ( d . x ) , " , ▁ " , int ( d . y ) , sep = " " ) NEW_LINE print ( ) NEW_LINE