使用VB查找两条线的交点 [英] Finding the intersection point of two lines using VB

查看:152
本文介绍了使用VB查找两条线的交点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好:

我需要帮助解决我在VB中编写函数的问题。 我需要找到两条线的交点。 每条线由线穿过的点(称为[x,y])和线的角度(以弧度表示)定义。 
线条永远不会平行 - 它们总是会在某个时刻交叉。 我可以在相交线上找到的所有材料按照每个线由开始/结束点定义来讨论它们......这对我没有帮助。 任何人都可以给我一些
的建议吗?

I need some help with a problem I'm having trying to write a function in VB.  I need to find the intersection point of two lines.  Each line is defined by a point (call it [x,y]) that the line passes through, and the angle (in radians) of the line.  The lines will never be parallel - they will always cross at some point.  All the material I can find on intersecting lines discusses them in terms of each line being defined by a start/end point...which doesn't help me.  Can anyone give me some advice?

谢谢。

推荐答案


我可以在相交线上找到的所有材料按照由起点/终点定义的每一行来讨论它们......这对我没有帮助。 任何人都可以给我一些建议吗?

All the material I can find on intersecting lines discusses them in terms of each line being defined by a start/end point...which doesn't help me.  Can anyone give me some advice?

您可能搜索不当。交点是根据线方程的标准形式计算的。

You might be searching incorrectly. The intersection is calculated from the standard form for the line equation.

第一个搜索是"如何将一条线的等式从斜率截距形式转换为标准形式"。 然后你可以搜索拦截解决方案。

The first search is "how to convert the equation of a line from slope intercept form to standard form".  Then you can search for the intercept solution.


这篇关于使用VB查找两条线的交点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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