3 # This example is inspired from a math question in the French baccalauréat 2014
4 # consisting in computing the intersection of a plane with a line.
6 from linpy
import Eq
, symbols
8 x
, y
, z
= symbols('x y z')
9 plane
= Eq(x
, y
) & Eq(z
, 6 - 2*x
)
10 line
= Eq(x
+ y
- 2*z
, 0)
12 if __name__
== '__main__':
13 print('plane: ', plane
)
15 print('intersection:', plane
& line
)