Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import geometry;
- point[] common_tangent_to_circle(point o1, real r1, point o2, real r2){
- real d_c, d_r, h, x, new_r1, new_r2;
- d_c = abs(o1-o2);
- d_r = abs(r1-r2);
- h = sqrt(d_c^2 - d_r^2);
- new_r1 = sqrt(r1^2+h^2);
- new_r2 = sqrt(r2^2+h^2);
- point[] A = intersectionpoints(circle(o1, new_r1),circle(o2, r2));
- point[] B = intersectionpoints(circle(o1, r1),circle(o2, new_r2));
- return new point[] {A[0], A[1], B[0], B[1]};
- }
- size(9cm, 0);
- defaultpen(fontsize(10pt));
- dotfactor = 6;
- circle c1,c2,c3,c; real r=2;
- point M,O1,O2,O3,A,B,C;
- M=origin;
- c=circle(M,r);
- O1=point(c, 1/5*length(c));
- O2=point(c, -5/12*length(c));
- O3=point(c, -1/12*length(c));
- c1 = circle(O1, r);
- c2 = circle(O2, r);
- c3 = circle(O3, r);
- point[] P12 = common_tangent_to_circle(c1.C, c1.r, c2.C, c2.r);
- point[] P13 = common_tangent_to_circle(c1.C, c1.r, c3.C, c3.r);
- point[] P23 = common_tangent_to_circle(c2.C, c2.r, c3.C, c3.r);
- line p12=line(P12[1],P12[3]);
- line p13=line(P13[1],P13[3]);
- line p23=line(P23[0],P23[2]);
- A=intersectionpoint(p12,p13);
- B=intersectionpoint(p12,p23);
- C=intersectionpoint(p23,p13);
- triangle T=triangle(A,B,C);
- circle circ = circumcircle(T);
- point[] K1=intersectionpoints(T, c1);
- point[] K2=intersectionpoints(T, c2);
- point[] K3=intersectionpoints(T, c3);
- markrightangle(size=0.3cm, O2, K2[1], B);
- markrightangle(size=0.3cm, C, K3[0], O3);
- markangle(Label("$\alpha$"), radius=0.3cm, B,A,C);
- markangle(radius=0.3cm,n=2, O3,O2,O1, blue);
- markangle(Label("$\gamma$"), n=3, radius=0.3cm, A,C,B);
- markangle(n=3, radius=0.3cm, O1,O3,O2,blue);
- draw(B--O2--K2[1]^^C--O3--K3[0]);
- draw(c1^^c2^^c3^^circ);
- draw(c,blue);
- draw(O1--O2--O3--cycle, blue);
- draw(T); label(T);
- markangle(Label("$\beta$", Fill(white)), radius=0.3cm,n=2, C,B,A);
- dot(K1[0]^^K1[1]^^K2[0]^^K2[1]^^K3[0]^^K3[1], UnFill);
- dot(A^^B^^C^^M^^O1^^O2^^O3, UnFill);
- label("$M$",M,N);
- label("$O_1$",O1,N);
- label("$O_2$",O2,W);
- label("$O_3$",O3,E);
- label(Label("$a$", Relative(0.5)), B--C, 2S);
- label(Label("$x$", Relative(0.5)), O2--K2[1]);
- label(Label("$x$", Relative(0.5)), K3[0]--O3);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement