平面坐标中 直角三角形 已知两点坐标和邻边与斜边夹角 求另一点坐标! a /|b - c已知 a坐标 c坐标 和 ab 与 ac 夹角 , bc 与 ac 的夹角是90度怎么求出b点的坐标先谢谢过了!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 b点的纵坐标和c点的一样|b点的横坐标 - c点的横坐标| = |a点的纵坐标 - c点的纵坐标| * tan(ab 与 ac 夹角) 高中知识点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的二元一次方程两个二元一次方程很容易解的 1, 由a,c两点坐标求出ac的长度和角度。2, 由ac长度和ab/ac夹角,利用三角函数求出bc长度Lbc3, 利用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点坐标 a(m0,m2),b(m3,m1),c(m0,m1),"@"表示角度,则(m3-m0 / m2-m1) = tan@. DLL怎么加载DLL的lib库,比如curl Richedit通过ole对象插入图片后怎么更新。 父窗口如何得知子窗口有鼠标消息? 怎么让主窗体可以处理对话框中control的消息? 请将用过InnoSetup来生成自己的安装程序的? 我用ADO作嵌套查询,但是在catch中为什么说'Error_code1' : undeclared identifier? 项目经理,在夹缝中生存! 关于按钮贴图问题 如何得到某进程的线程ID? 急在线等 为什么无法列出网络资源 在深入浅出MFC中的一个例子,为什么出错。 CSplitterWnd 如何控件分割条(颜色.宽度.放个按钮)?自绘方式?
|b点的横坐标 - c点的横坐标| = |a点的纵坐标 - c点的纵坐标| * tan(ab 与 ac 夹角)
点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的二元一次方程
两个二元一次方程很容易解的
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点坐标