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:
parent
b5ae4b5463
commit
0f60c717f0
1 changed files with 5 additions and 29 deletions
|
@ -148,26 +148,6 @@ def rot_z(vert):
|
|||
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 compose2(fun1, fun2):
|
||||
return lambda x: fun1(fun2(x))
|
||||
|
@ -183,14 +163,10 @@ def all_transforms():
|
|||
for num_rx in range(4):
|
||||
for num_ry in range(4):
|
||||
for num_rz in range(4):
|
||||
for syms in range(8):
|
||||
cur = compose(
|
||||
funcpow(rot_x, num_rx),
|
||||
funcpow(rot_y, num_ry),
|
||||
funcpow(rot_z, num_rz),
|
||||
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)
|
||||
funcpow(rot_z, num_rz))
|
||||
output.append(cur)
|
||||
return output
|
||||
|
||||
|
|
Loading…
Reference in a new issue