求出两条直线的交点
已知一条直线两个点(x1,y1),(x2,y2);另外一条直线有两个点(x3,y3),(x4,y4),两条直线的交点为(x0,y0)(排除平行的情况);求出这个交点(x0...
已知一条直线两个点(x1,y1),(x2,y2);另外一条直线有两个点(x3,y3),(x4,y4),两条直线的交点为(x0,y0)(排除平行的情况);
求出这个交点(x0,y0)。x0=?y0=?
我也知道求解方程可以解决,就是比较麻烦,谁能帮忙下,麻烦了。1L,2L貌似没考虑到x2=x1或者x3=x4的情况? 展开
求出这个交点(x0,y0)。x0=?y0=?
我也知道求解方程可以解决,就是比较麻烦,谁能帮忙下,麻烦了。1L,2L貌似没考虑到x2=x1或者x3=x4的情况? 展开
2个回答
展开全部
因(x0,y0)在过两个点(x1,y1),(x2,y2)的直线上,所以三点在一直线上,
(y0-y1)/(x0-x1)=(y1-y2)/(x1-x2)
又因(x0,y0)在过两个点(x3,y3),(x4,y4)的直线上,所以三点在一直线上,
(y0-y3)/(x0-x3)=(y3-y4)/(x3-x4)
y0-y1=[(y1-y2)/(x1-x2)](x0-x1)=[(y1-y2)/(x1-x2)]x0-[(y1-y2)/(x1-x2)]x1
y0-y3=[(y3-y4)/(x3-x4)](x0-x3)=[(y3-y4)/(x3-x4)]x0-[(y3-y4)/(x3-x4)]x3
[(y1-y2)/(x1-x2)-(y3-y4)/(x3-x4)]x0=[(y1-y2)/(x1-x2)]x1-[(y3-y4)/(x3-x4)]x3+y3-y1
x0=[(y1-y2)x1/(x1-x2)-(y3-y4)x3/(x3-x4)+y3-y1]/[(y1-y2)/(x1-x2)-(y3-y4)/(x3-x4)]
=[(y1-y2)x1(x3-x4)-(y3-y4)x3(x1-x2)+(y3-y1)(x1-x2)(x3-x4)]/[(y1-y2)(x3-x4)-(y3-y4)(x1-x2)]
y0=
(y0-y1)/(x0-x1)=(y1-y2)/(x1-x2)
又因(x0,y0)在过两个点(x3,y3),(x4,y4)的直线上,所以三点在一直线上,
(y0-y3)/(x0-x3)=(y3-y4)/(x3-x4)
y0-y1=[(y1-y2)/(x1-x2)](x0-x1)=[(y1-y2)/(x1-x2)]x0-[(y1-y2)/(x1-x2)]x1
y0-y3=[(y3-y4)/(x3-x4)](x0-x3)=[(y3-y4)/(x3-x4)]x0-[(y3-y4)/(x3-x4)]x3
[(y1-y2)/(x1-x2)-(y3-y4)/(x3-x4)]x0=[(y1-y2)/(x1-x2)]x1-[(y3-y4)/(x3-x4)]x3+y3-y1
x0=[(y1-y2)x1/(x1-x2)-(y3-y4)x3/(x3-x4)+y3-y1]/[(y1-y2)/(x1-x2)-(y3-y4)/(x3-x4)]
=[(y1-y2)x1(x3-x4)-(y3-y4)x3(x1-x2)+(y3-y1)(x1-x2)(x3-x4)]/[(y1-y2)(x3-x4)-(y3-y4)(x1-x2)]
y0=
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询