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 |
原来是这样的,平面几何多直观啊,非要我折腾解析几何,我最头疼这个In Reply To:FT,这个算的是什么? Posted by:js05 at 2005-06-05 11:05:31 double x, y, r, a, t, xl, xr; scanf("%lf %lf %lf", &x, &y, &r); a = atan2(y - Y, x - X); t = asin(r / hypot(x - X, y - Y)); xl = X - Y * safe_cot(a - t); xr = X - Y * safe_cot(a + t); rec[2 * i].x = xl; rec[2 * i].sign = 1; rec[2 * i + 1].x = xr; rec[2 * i + 1].sign = -1; Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator