distance from given point to given ellipse

后端 未结 7 1927
抹茶落季
抹茶落季 2021-02-05 08:07

I have an ellipse, defined by Center Point, radiusX and radiusY, and I have a Point. I want to find the point on the ellipse that is closest to the given point. In the illustrat

7条回答
  •  隐瞒了意图╮
    2021-02-05 08:38

    You just need to calculate the intersection of the line [P1,P0] to your elipse which is S1.

    If the line equeation is:

    enter image description here

    and the elipse equesion is:

    elipse equesion

    than the values of S1 will be:

    enter image description here

    Now you just need to calculate the distance between S1 to P1 , the formula (for A,B points) is: distance

提交回复
热议问题