Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

这样算角度不行么?大家帮忙看下。

Posted by bsshanghai at 2011-08-29 19:44:33 on Problem 1375
                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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator