Objets/Documentation
projecteur29.py
Conditionnels communs et contrôles · projecteur29.py
Télécharger ↓"""One-parameter projection on a chosen pair of affine supporting planes. Requires SymPy."""
from itertools import combinations
from collections import Counter
import sympy as S
from projection28 import t
R=S.Rational
def determinants(group):
M=S.Matrix([list(h[:3]) for h in group]);rhs=S.Matrix([-h[3] for h in group])
D=M.det();nums=[]
for j in range(3):
N=M.copy();N[:,j]=rhs;nums.append(N.det())
return D,*nums
def project(pair,others):
factors={};identities=[];tests=Counter()
def add(expr,kind,indices=()):
p=S.Poly(expr,t,domain=S.QQ);tests[kind]+=1