weolar2008-06-04 00:02:10
#include
#include
#include
#define Pi 3.1415926535898
//两线段交点
void GetCrossPoint(double *x, double *y, double x1, double y1, double x2,
double y2, double x3, double y3, double x4, double y4) //四点交点坐标
{
//1 3 一条直线,2,4一条
double x_,y_;
/*
if (x1==x3)
{
x_=x1;
y_=(x1-x4)*(y2-y4)/(x2-x4)+y4;
}
if (x1==x3)
{
x_=x2;
y_=(x2-x1)*(y3-y1)/(x3-x1)+y1;
}
else
{
x_ = ((y1 - y2) - x1 *(y3 - y1) / (x3 - x1) + x2 *(y4 -