Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
这样算角度不行么?大家帮忙看下。scanf("%lf %lf",&po[0].x,&po[0].y); for(i=1;i<=n;i++) { scanf("%lf %lf %lf",&po[i].x,&po[i].y,&po[i].r); l=dis(po[0],po[i]); a=asin((po[i].x-po[0].x)/l)*180/pi; b=asin(po[i].r/l)*180/pi; //直接转换为角度。下面计算的时候求角度的tan值。 po[i].left=po[0].x+tan(a-b)*po[0].y; po[i].right=po[0].x+tan(a+b)*po[0].y; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator