Atelier des rouesLab FR
Objects/Documentation

projection28.py

Shared conditionals and checks · projection28.py

Download ↓
"""Symbolic projection budgets and an explicit four-plane coincidence on pair BC."""
from itertools import product,combinations
from fractions import Fraction as F
from contacts27 import TRIPLE
import sympy as S,json
t=S.symbols('t')
def planes(laws,u,v):
    for row in laws:
        lower=[(0,0,-1,0,0)];upper=[(0,0,1,0,1)]
        for i,j,k,l in product((0,1),repeat=4):
            a,b,c=i-j,l-k,j-l;d,h=l-k,sum(x*y for x,y in zip((i,j,k,l),row))+t-l
            sign=a*u+b*v+c
            if sign<0:lower.append((a,b,c,d,h))
            elif sign>0:upper.append((a,b,c,d,h))
            elif d or h!=0:yield (0,d,0,h)
        for a,b,c,d,h in lower:

Read in context

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.