X-Git-Url: https://svn.cri.ensmp.fr/git/linpy.git/blobdiff_plain/d4b772a5d2f29c4f54564ea09f5b65289cadcaa1..1695c920d030869b3a842736fe5bcf963f2ffc52:/examples/diamond.py?ds=inline diff --git a/examples/diamond.py b/examples/diamond.py index 5d0de4e..e82581e 100755 --- a/examples/diamond.py +++ b/examples/diamond.py @@ -2,7 +2,17 @@ from pypol import * -x, y = symbols('x y') +x, y, z = symbols('x y z') diam = Ge(y, x - 1) & Le(y, x + 1) & Ge(y, -x - 1) & Le(y, -x + 1) print('diamond:', diam) -print('projected on x:', diam.project([y])) +print() +rhom1 = Le(0, x) & Le(x, 3) & Le(0, y) & Le(y, 3) & Le(0, z) & Le(z, 3) \ +& Le(z - 2, x) & Ge(z + 2, x) & Ge(z - 1, -x) & Le(z - 5, -x) \ +& Le(z - 2, y) & Ge(z + 2, y) & Ge(z - 1, -y) & Le(z - 5, -y) \ +& Le(y - 2, x) & Ge(y + 2, x) & Ge(y - 1, -x) & Le(y - 5, -x) +rhom1.plot() +rhom2 = rhom1 & Le(x + y + z, 7) & Ge(-2, -x - y - z ) \ +& Le(x + y - z, 4) & Ge(x + y - z, -1) \ +& Le(x - y + z, 4) & Ge(x - y + z, -1) \ +& Le(-x + y + z, 4) & Ge(-x + y + z, -1) +rhom2.plot()