解决方法
Line-Line Intersection One of the most common tasks you will find in geometry problems is line intersection. Despite the fact that it is so common,a lot of coders still have trouble with it. The first question is,what form are we given our lines in,and what form would we like them in? Ideally,each of our lines will be in the form Ax+By=C,where A,B and C are the numbers which define the line. However,we are rarely given lines in this format,but we can easily generate such an equation from two points. Say we are given two different points,(x1,y1) and (x2,y2),and want to find A,B and C for the equation above. We can do so by setting A = y2-y1 B = x1-x2 C = A*x1+B*y1
原文地址:https://www.jb51.cc/csharp/100307.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。