def construct(self): LabelLargeSquare.construct(self) points = np.array([ 2 * UP + 2 * LEFT, UP + 2 * LEFT, 2 * DOWN + 2 * LEFT, 2 * DOWN + LEFT, 2 * DOWN + 2 * RIGHT, DOWN + 2 * RIGHT, 2 * UP + 2 * RIGHT, RIGHT + 2 * UP ]) for triplet in [[0, 1, 7], [2, 3, 1], [4, 5, 3], [6, 7, 5]]: triplet.append(triplet[0]) self.highlight_region(region_from_line_boundary( *[[points[i], points[j]] for i, j in zip(triplet, triplet[1:])]), color=DARK_BLUE) vertices = points[[1, 3, 5, 7, 1]] self.highlight_region(region_from_line_boundary( *[[p1, p2] for p1, p2 in zip(vertices, vertices[1:])]), color=YELLOW)
def construct(self): LabelLargeSquare.construct(self) vertices = [ 2 * (DOWN + LEFT), 2 * (DOWN + RIGHT), 2 * (UP + RIGHT), 2 * (UP + LEFT) ] vertices.append(vertices[0]) pairs = zip(vertices, vertices[1:]) self.highlight_region(region_from_line_boundary(*pairs), color=BLUE)
def construct(self): LabelLargeSquare.construct(self) points = np.array([ 2*UP+2*LEFT, UP+2*LEFT, 2*DOWN+2*LEFT, 2*DOWN+LEFT, 2*DOWN+2*RIGHT, DOWN+2*RIGHT, 2*UP+2*RIGHT, RIGHT+2*UP ]) for triplet in [[0, 1, 7], [2, 3, 1], [4, 5, 3], [6, 7, 5]]: triplet.append(triplet[0]) self.highlight_region(region_from_line_boundary(*[ [points[i], points[j]] for i, j in zip(triplet, triplet[1:]) ]), color = DARK_BLUE) vertices = points[[1, 3, 5, 7, 1]] self.highlight_region(region_from_line_boundary(*[ [p1, p2] for p1, p2 in zip(vertices, vertices[1:]) ]), color = YELLOW)
def construct(self): LabelLargeSquare.construct(self) vertices = [2*(DOWN+LEFT), 2*(DOWN+RIGHT), 2*(UP+RIGHT), 2*(UP+LEFT)] vertices.append(vertices[0]) pairs = zip(vertices, vertices[1:]) self.highlight_region(region_from_line_boundary(*pairs), color = BLUE)