a
  /|
b - c已知 a坐标 c坐标 和 ab 与 ac 夹角 , bc 与 ac 的夹角是90度
怎么求出b点的坐标
先谢谢过了!!!

解决方案 »

  1.   

    b点的纵坐标和c点的一样
    |b点的横坐标 - c点的横坐标| = |a点的纵坐标 - c点的纵坐标| * tan(ab 与 ac 夹角)
      

  2.   

    高中知识
    点A(a1, a2)  点B(b1, b2)  点c(c1, c2)
    AB和AC的向量积
    (b1 - a1) * (c1 - a1) + (b2 - a2) * (c2 - a2) 等于 |AB| * |AC| * cos(AB和AC的夹角)
    上述等式右边都是些已知量或是能很容易算出的,总之是个关于b1, b2的二元一次方程
    向量CB和CA垂直,向量积为0
    (b1 - c1) * (a1 - c1) + (b2 - c2) * (a2 - c2) = 0
    又是一个关于b1, b2的二元一次方程
    两个二元一次方程很容易解的
      

  3.   

    1, 由a,c两点坐标求出ac的长度和角度。
    2, 由ac长度和ab/ac夹角,利用三角函数求出bc长度Lbc
    3, 利用ac角度和bc长度,求出ac上长度为Lbc的点c'
    4, 以c为中心,将c'旋转90或者-90度,得到的坐标就是b点坐标代码
    #define DISTANCE_ZERO 0.001 
    #define PI       acos(-1)class AcGePoint2d
    {
    public:
    double  x;
    double  y;
    public:
    AcGePoint2d();
    AcGePoint2d(double ox, double oy);
    ~AcGePoint2d();

    friend AcGePoint2d  operator-(const AcGePoint2d& pnt1,const AcGePoint2d& pnt2); double angleTo(const AcGePoint2d& pnt);
    double distanceTo(const AcGePoint2d& pnt);
    AcGePoint2d rotate(const AcGePoint2d& basePos, const double angle) ;
    };//
    // for class AcGePoint2d;
    //
    AcGePoint2d::AcGePoint2d() 
    {
    x = y = z = 0.;
    } AcGePoint2d::AcGePoint2d(double ox, double oy)
    {
    x = ox, y = oy;
    }
    AcGePoint2d::~AcGePoint2d()
    {
    }
    AcGePoint2d operator-(const AcGePoint2d& pnt1,const AcGePoint2d& pnt2)
    {
    AcGePoint2d p( pnt1.x - pnt2.x, pnt1.y - pnt2.y );
    return p;
    }double AcGePoint2d::distanceTo(const AcGePoint2d& pnt)
    {
    double dist = sqrt( ( x - pnt.x ) * ( x - pnt.x ) + ( y - pnt.y ) * ( y - pnt.y ) );
    return dist;
    }AcGePoint3d AcGePoint2d::rotate(const AcGePoint2d& basePos, const double angle)
    {
    AcGePoint2d p;
    double cosv = cos( angle ) ; // cos value
    double sinv = sin( angle ) ;
    double xc = x ;
    double yc = y ;
    p.x = xc * cosv - yc * sinv + (1.- cosv) * basePos.x + basePos.y * sinv ;
    p.y = sinv * xc + cosv * yc + (1.- cosv) * basePos.y - sinv * basePos.x ;
    return p;
    }double AcGePoint2d::angleTo(const AcGePoint2d& pnt)
    {
    AcGePoint2d pos1( x, y);
    double len = pos1.distanceTo(pnt) ;
    if(len < DISTANCE_ZERO)return 0 ;
    AcGePoint2d dp = pnt - pos1;
    double cosv = dp.x/len ;
    double sinv = dp.y/len ;
    double dAngle = 0;
    if(sinv >= 0)dAngle = acos(cosv) ;
    else if(sinv < 0)dAngle = 2.*PI-acos(cosv) ;
    if( fabs( dAngle - 2 * PI ) <= 0.001 )dAngle = 0;
    return dAngle ;
    }void ads_polar(AcGePoint2d pc, double dAngle, double dRad, AcGePoint2d& pe)
    {
    if( fabs( dAngle - PI / 2 ) <= 0.0001 )
    {
    pe.x = pc.x;
    pe.y = pc.y + dRad;
    }
    else if( fabs( dAngle - PI * 1.5 ) <= 0.0001 )
    {
    pe.x = pc.x;
    pe.y = pc.y - dRad;
    }
    else
    {
    pe.x = pc.x + dRad * cos( dAngle );
    pe.y = pc.y + dRad * sin( dAngle );
    }
    }AcGePoint2d pnt1(xa, ya), pnt2(xc, yc), pnt3, pntB;
    double dLenAC = pnt1.distance( pnt2);
    double dAngleAC = pnt1.angleTo( pnt2 );
    double dLenBC = dLenAC * atan( dACAB );   //dACAB单位为弧度
    ads_polar( pnt2, dAngleAC, dLenBC, pnt3 );
    pntB = pnt3.rotate( pnt2, PI / 2 );       //求得b点坐标
      

  4.   

    a(m0,m2),b(m3,m1),c(m0,m1),"@"表示角度,则(m3-m0 / m2-m1) = tan@.