Objects/Documentation
rencontres33.py
Where decoder boundary rays meet · rencontres33.py
Download ↓"""Trace the first exact event along every boundary ray of the four decoder fans."""
from fractions import Fraction as F
from pathlib import Path
import json
from voisins30 import ray
from faces25 import vertices,load,table
from jeu24 import faithful
def study():
source=json.loads(Path(__file__).with_name('secteurs32.json').read_bytes())
laws=table(load('raccord27')['laws']);out=[]
for origin,z in enumerate(source):
p=tuple(map(F,z['vertex']))
for sector in z['sectors']:
direction=sector['start'];d=ray(laws,p,*map(F,direction))
limit=d.get('until',F(0));dest=tuple(k+limit*h for k,h in zip(p,direction))
moved=[*laws[:2],[x+y for x,y in zip(laws[2],(dest[0],-dest[0],dest[1],-dest[1]))]]