#NEWLINE# def test_line_intersection( ) : #NEWLINE# #INDENT# assert ( asa ( 120 , 8 , 52 ) == Triangle ( Point ( 0 , 0 ) , Point ( 8 , 0 ) , Point ( ( ( ( - 4 ) * cos ( ( ( 19 * pi ) / 90 ) ) ) / sin ( ( ( 2 * pi ) / 45 ) ) ) , ( ( ( 4 * sqrt ( 3 ) ) * cos ( ( ( 19 * pi ) / 90 ) ) ) / sin ( ( ( 2 * pi ) / 45 ) ) ) ) ) ) #NEWLINE# assert ( Line ( ( 0 , 0 ) , ( 1 , 1 ) ) . intersection ( Ray ( ( 1 , 0 ) , ( 1 , 2 ) ) ) == [ Point ( 1 , 1 ) ] ) #NEWLINE# assert ( Line ( ( 0 , 0 ) , ( 1 , 1 ) ) . intersection ( Segment ( ( 1 , 0 ) , ( 1 , 2 ) ) ) == [ Point ( 1 , 1 ) ] ) #NEWLINE# assert ( Ray ( ( 0 , 0 ) , ( 1 , 1 ) ) . intersection ( Ray ( ( 1 , 0 ) , ( 1 , 2 ) ) ) == [ Point ( 1 , 1 ) ] ) #NEWLINE# assert ( Ray ( ( 0 , 0 ) , ( 1 , 1 ) ) . intersection ( Segment ( ( 1 , 0 ) , ( 1 , 2 ) ) ) == [ Point ( 1 , 1 ) ] ) #NEWLINE# assert ( Ray ( ( 0 , 0 ) , ( 10 , 10 ) ) . contains ( Segment ( ( 1 , 1 ) , ( 2 , 2 ) ) ) is True ) #NEWLINE# assert ( Segment ( ( 1 , 1 ) , ( 2 , 2 ) ) in Line ( ( 0 , 0 ) , ( 10 , 10 ) ) ) #NEWLINE# x = ( ( 8 * tan ( ( ( 13 * pi ) / 45 ) ) ) / ( tan ( ( ( 13 * pi ) / 45 ) ) + sqrt ( 3 ) ) ) #NEWLINE# y = ( ( ( ( ( - 8 ) * sqrt ( 3 ) ) * ( tan ( ( ( 13 * pi ) / 45 ) ) ** 2 ) ) + ( 24 * tan ( ( ( 13 * pi ) / 45 ) ) ) ) / ( ( - 3 ) + ( tan ( ( ( 13 * pi ) / 45 ) ) ** 2 ) ) ) #NEWLINE# assert ( Line ( Point ( 0 , 0 ) , Point ( 1 , ( - sqrt ( 3 ) ) ) ) . contains ( Point ( y , y ) ) is True )