Example #1
0
def mirror_points_line_xy(points, line):
    """Mirror a point about a line.

    Parameters
    ----------
    points : list of point
        List of points to mirror.
    line : tuple
        Two points defining the mirror line.

    Returns
    -------
    list of point
        The mirrored points.

    """
    return [closest_point_on_line_xy(point, line) for point in points]
Example #2
0
def mirror_point_line_xy(point, line):
    """Mirror a point about a line.

    Parameters
    ----------
    point : list of float
        XY(Z) coordinates of the point to mirror.
    line : tuple
        Two points defining the line.
        XY(Z) coordinates of the two points defining the mirror line.

    Returns
    -------
    list of float
        The mirrored point, with Z=0.

    """
    closest = closest_point_on_line_xy(point, line)
    return add_vectors_xy(closest, subtract_vectors_xy(closest, point))