HDU 5476 Explore Track of point geometric problem--2015 ACM/ICPC Asia regional Shanghai algorithm

Source: Internet
Author: User
Tags apc pow

Title See Hdu 5476

The Isosceles abc,ab=ac,m is given as the midpoint of BC. The P-point is the maximum point within the triangle that makes MIN{∠MPB+∠APC,∠MPC+∠APB}. Ask for P point trajectory.
It is easy to find the P points on the centerline am satisfied so that ∠MPB=∠MPC,∠APC=∠APB, then ∠mpb+∠apc=∠mpc+∠apb=180°
So the trajectory contains midline am.
And all satisfied P points should be satisfied: ∠mpb+∠apc=∠mpc+∠apb=180°

Take a bit of p on the midline, you can find a corresponding point q, make ∠MQB=∠MPB, and ∠AQC=∠APC, then ∠mqb+∠aqc=180° set up, so Q point form another sliver trajectory.
Q Point of Practice:

The intersection of ΔBPM and ΔAPC circumcircle. The other intersection is the P point. (This can prove that there is no other redundant trajectory) Arc BM, ac corresponding to the ∠MQB=∠MPB on the circle, and ∠AQC=∠APC.

when P and Q coincide, both are in ΔABC's heart.

The proof: p and Q coincide, namely ΔBPM and ΔAPC circumcircle tangent. For tangential PD, then:
∠DPM=∠APE=∠ACP (Dianding equal, Sinche equal) ... [1]
and ∠amb=∠bpd=90°.
Then ∠cpm=∠bpm=∠pdb (symmetrical, Yuce San, etc.)
Then ∠PCM=∠DPM (grazing equal, equal to vertex) ... [2]
From [1][2] get ∠ACP=∠PCM that the PC is the angle of the equal line, and the AP also for the angle of the line, so at this point P point for the heart of ΔABC.

Guess Q's trajectory is an arc.
have proved O (^▽^) O look at the passage behind the code
This is a guess, not yet proven. However, we can try to prove that ∠BQC is a constant and that the trajectory of Q is an arc.
Guess based on: the trajectory about am symmetrical, and through the heart of ΔABC is the highest point.

arcs are part of the circumcircle of the ΔBCI
The front has proved that Q's trajectory is over ΔABC's heart. From the center of the symmetry to the extension of AM, now directly to the position of the center.

Calculation process:
From three point coordinates to get ab distance of B,BC for the distance of 2a,am is high as H, then the radius of the inner circle r=2ah/c=2ah/(2a+2b) =ah/(a+b)
The circumcircle radius of the ΔBCI is r and the distance from M to the center of the circle is X, a2+x2= (r+x) 2 a^2+x^2= (r+x) ^2, then x=a2−r22r x={a^2-r^2\over 2r},r=r+x
Arc bic angle of 2β=2arcsin (A/R)
The Arc bic length is 2rβ

Attached code:

#include <cstdio>
#include <iostream>
#include <cstring>
#include <queue>
#include <algorithm>
#include <cmath>
using namespace std;
struct node
{
    double x, y;
} A, B, C, M;
Double Dis (Node A, Node B)
{return
    sqrt (POW (a.x-b.x, 2) +pow (A.Y-B.Y, 2));
int main ()
{
    int T, o = 0;
    scanf ("%d", &t);
    while (t--)
    {
        scanf ("%lf%lf%lf%lf%lf%lf", &a.x, &a.y, &b.x, &b.y, &c.x, &c.y);
        M.x = (b.x+c.x)/2, m.y = (B.Y+C.Y)/2;
        Double A = dis (b, C)/2, B = dis (a, b), h = dis (a,m);
        Double r = a*h/(a+b);
        Double R = (a*a-r*r)/r/2+r;
        Double ans = 2*r*asin (A/R);
        printf ("%f%f%f%f%f%f\n", A, B, H, R, R, ans);
        ans = h;
        printf ("Case #%d:%.4f\n", ++o, ans);
    }
    return 0;
}
Supplementary Proof

Re-describe the problem again

On the outside of the circle O as a tangent ab, ac,m for BC Midpoint, even am intersection o in P, F. Take a little q on the 劣弧 BC, and extend the AG to a circle o to D.
Verification: P is the heart of ΔABC, ∠bqm+∠aqc=180°
Proof: You can learn a little bit about the harmonic dots and the harmonic wiring harness .
Because APMF is the harmonic point column, so CA, CP, CB, CF is the harmonic wiring harness.
CP is perpendicular to CF, the CP is equally ∠acb.
And AP equally ∠bac, then P is Δabc's heart.

Because APMF is a harmonic point column, so da, DP, DM, DF for harmonic wiring harness.
DP is perpendicular to DF, then the DP is divided into ∠ADM. ∠ADP=∠MDP.
and ∠CDP=∠BDP, then ∠CDQ=∠BDM
and ∠CQD=∠CBQ, then ∠BDM=∠CBQ ... [3]

Because the CA, CP, CB, CF for the harmonic wiring harness, so aqed for the harmonic point column, so Ma, MQ, ME, MD for harmonic wiring harness.
Ma is perpendicular to MC, then the MC is equally ∠qmd.
Then the ∠QMC=∠DMC, and by [3], the ∠BQM=∠MBD=∠CQD

Then ∠bqm+∠aqc=∠cqd+∠aqc=180°

Certificate of Completion #

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.