How to calculate the mirror point along a line?

前端 未结 8 1678
灰色年华
灰色年华 2020-12-31 18:09

In 2D plane, I have a point and a line. How to get the mirror point along this line?

8条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-31 18:40

    Compute the closest point on the line to the point in question. Then invert the direction of the vector between those points and add it to the closest point on the line. Voilà, you have found the mirror point.

提交回复
热议问题