You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
594 B
Python

6 years ago
from collections import deque
from lib import semicircle_generator
from lib import path_rotate_z
g_steps = 20
g_radius = 20
def path_generator():
assert (g_steps % 4) == 0
halfsteps = int(g_steps/2)
path = semicircle_generator(g_radius, g_steps)
mir_path = deque(path)
mir_path.rotate(halfsteps)
return [
path_rotate_z(path, 45),
path_rotate_z(mir_path, 0),
path_rotate_z(path, 315),
path_rotate_z(mir_path, 225),
path_rotate_z(path, 180),
path_rotate_z(mir_path, 135),
], "shift", 20, (0, halfsteps)