March gen: symmetries do not seem to be needed

This would be backed by the base cases 10 and 15 being the same up to
planar symmetry with a plane of normal vector x.
This commit is contained in:
Théophile Bastian 2018-02-09 01:39:49 +01:00
parent b5ae4b5463
commit 0f60c717f0

View file

@ -148,26 +148,6 @@ def rot_z(vert):
return rot_general(vert, 2, 0, 1) return rot_general(vert, 2, 0, 1)
def sym_general(vert, normal):
return (
vert[0] if normal != 0 else 1-vert[0],
vert[1] if normal != 1 else 1-vert[1],
vert[2] if normal != 2 else 1-vert[2]
)
def sym_x(vert):
return sym_general(vert, 0)
def sym_y(vert):
return sym_general(vert, 1)
def sym_z(vert):
return sym_general(vert, 2)
def all_transforms(): def all_transforms():
def compose2(fun1, fun2): def compose2(fun1, fun2):
return lambda x: fun1(fun2(x)) return lambda x: fun1(fun2(x))
@ -183,15 +163,11 @@ def all_transforms():
for num_rx in range(4): for num_rx in range(4):
for num_ry in range(4): for num_ry in range(4):
for num_rz in range(4): for num_rz in range(4):
for syms in range(8): cur = compose(
cur = compose( funcpow(rot_x, num_rx),
funcpow(rot_x, num_rx), funcpow(rot_y, num_ry),
funcpow(rot_y, num_ry), funcpow(rot_z, num_rz))
funcpow(rot_z, num_rz), output.append(cur)
sym_x if (syms & 0x1) else lambda x: x,
sym_y if (syms & 0x2) else lambda x: x,
sym_z if (syms & 0x4) else lambda x: x)
output.append(cur)
return output return output