Algorithm for reflecting a point across a line

前端 未结 9 1962
感动是毒
感动是毒 2020-12-03 03:02

Given a point (x1, y1) and an equation for a line (y=mx+c), I need some pseudocode for determining the point (x2, y2) that is a reflection of the first point across the line

9条回答
  •  清歌不尽
    2020-12-03 03:38

    This link contains an algorithm that is similar to what you are trying to do:

    That is reflect a ray off a normal.

提交回复
热议问题