在垂直点与直线相交的地方找到x和y坐标 [英] Find x and y coordinates where a perpendicular point crosses a straight line

查看:175
本文介绍了在垂直点与直线相交的地方找到x和y坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是对此以下图为例:

我所知道的:

    DEP
  • xy坐标.
  • 因此,我也知道D-E线的斜率和截距
  • x and y coordinates of points D, E, and P.
  • Therefore, I also know slope and intercept of D-E line

我想知道的事情:

    Q
  • xy坐标. (这是穿过D-E线的点).
  • x and y coordinates of point Q. (This is the point which crosses the D-E line).

推荐答案

符号P=[px,py], D=[dx,dy], E=[ex,ey], Q=[qx,qy]

第一:

R=P-D=[px-dx, py-dy]=[rx,ry]

K=E-D=[ex-dx, ey-dy]=[kx, ky]

然后

z=dot(R,K)/dot(K,K)=(rx*kx+ry*ky) / (kx*kx+ky*ky)

最后

Q=D+z*K=[dx+z*kx, dy+z*ky]

R是从D点开始到K点的向量,K是从D点开始到E点的向量.使用此方法,我们进行了标量投影来计算结果Q.有关概念此处

The R is vector which start on point D and ends on point K, the K is vector which start on point D and ends on point E. Using this we made scalar projection to calculate result Q. More info about concept here

这篇关于在垂直点与直线相交的地方找到x和y坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆