/***假设有两条直线分别为m、n。直线m的直线方程为F(x,y)=a1*x+b1*y+c1=0。设直线m的两端点为(x1,y1)、(x2,y2),代入方程得a1*x1+b1*y1+c1=0,a1*x2+b1*y2+c1=0,联立解可得 a1=y1-y2,b1=x2-x1,c1=x1*y2-x2*y1。设直线n的两端点分别为(x3,y3)、(x4,y4),同理可得a2=y3-y4,b2=x4-x3,c2=x3*y4-x4*y3。又因为两直线相交即 a1*x+b1*y+c1=a2*x+b2*y+c2可解得x=c2*b1-b2*c1/D,y=c1*a2-c2*a1/D (D=a1*b2-a2*b1 Read More
posted @ 2013-03-15 21:37 longlongago Views(695) Comments(0) Diggs(0) Edit