码迷,mamicode.com
首页 > 其他好文 > 详细

求平面内两条直线的交点

时间:2014-08-21 18:31:04      阅读:189      评论:0      收藏:0      [点我收藏+]

标签:http   os   io   for   ar   cti   amp   line   

The bubuko.com,布布扣 and bubuko.com,布布扣 coordinates of the point of intersection of two non-vertical lines can easily be found using the following substitutions and rearrangements.

Suppose that two lines have the equations bubuko.com,布布扣 and bubuko.com,布布扣 where bubuko.com,布布扣 and bubuko.com,布布扣 are the slopes (gradients) of the lines and where bubuko.com,布布扣 and bubuko.com,布布扣 are the y-intercepts of the lines. At the point where the two lines intersect (if they do), both bubuko.com,布布扣 coordinates will be the same, hence the following equality:

bubuko.com,布布扣.

We can rearrange this expression in order to extract the value of bubuko.com,布布扣,

bubuko.com,布布扣,

and so,

bubuko.com,布布扣.

To find the y coordinate, all we need to do is substitute the value of x into either one of the two line equations, for example, into the first:

bubuko.com,布布扣.

Hence, the point of intersection is

bubuko.com,布布扣.

Note if a = b then the two lines are parallel. If c ≠ d as well, the lines are different and there is no intersection, otherwise the two lines are identical.

求平面内两条直线的交点,布布扣,bubuko.com

求平面内两条直线的交点

标签:http   os   io   for   ar   cti   amp   line   

原文地址:http://www.cnblogs.com/xpvincent/p/3927553.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!