def mirror_point_line(point, line): """Mirror a point about a line. Parameters ---------- point : [float, float, float] | :class:`compas.geometry.Point` XYZ coordinates of the point to mirror. line : [point, point] | :class:`compas.geometry.Line` Two points defining the mirror line. Returns ------- [float, float, float] The mirrored point. """ closest = closest_point_on_line(point, line) return add_vectors(closest, subtract_vectors(closest, point))
def mirror_point_line(point, line): """Mirror a point about a line. Parameters ---------- point : list of float XYZ coordinates of the point to mirror. line : tuple Two points defining the mirror line. Returns ------- list of float The mirrored point. """ closest = closest_point_on_line(point, line) return add_vectors(closest, subtract_vectors(closest, point))