我正在使用 Metafun 的anglebetween
宏在 ConTeXt 中制作一些三角形。但是,有些角度看起来很糟糕,尤其是当它们较大时。
\starttext
\startuseMPgraphic{name}
u := 4cm;
pair A, B, C, D, P;
path AB, BC, AC, BD, BP;
A = (0,0); C = (cosd 50 + cosd 80, 0)*u; B = (cosd 80, sind 80)*u;
P = (cosd 80, 0)*(u); D = P*2;
AB = A -- B; AC = A -- C; BC = B -- C;
BD = B -- D; BP = B -- P;
draw AB; draw BC; draw AC;
draw BD; draw BP;
draw anglebetween(A--B, A--C, "$8x$");
draw anglebetween(C--B, C--A, "$5x$");
draw anglebetween(B--D, B--A, "$2x$");
label.llft("{\tfx\ss A}", A);
label.urt("{\tfx\ss B}", B);
label.lrt("{\tfx\ss C}", C);
label.bot("{\tfx\ss P}", P);
label.bot("{\tfx\ss D}", D);
\stopuseMPgraphic
\useMPgraphic{name}
\stoptext
显而易见,标记为 8x 和 5x 的角度看起来太大。scaled
结果很奇怪。如何调整角度以使其半径更小?
答案1
以下是如何使用普通 MP 工具来实现此目的。通过“自己动手”,您可以灵活地适当调整弧线尺寸。
\starttext
\startuseMPgraphic{name}
pair A, B, C, D, P;
A = origin;
B = 6cm * dir 80;
ypart C = 0;
B - C = whatever * dir 130;
P = (xpart B, ypart A);
D = A reflectedabout(P, B);
path arc[];
arc1 = fullcircle rotated angle (C-A) scaled 21 shifted A cutafter (A--B);
arc2 = fullcircle rotated angle (B-C) scaled 32 shifted C cutafter (C--A);
arc3 = fullcircle rotated angle (A-B) scaled 42 shifted B cutafter (B--D);
drawoptions(withcolor 2/3 red);
draw arc1; label.urt("$8x$", point 1 of arc1);
draw arc2; label.ulft("$5x$", point 0.7 of arc2);
draw arc3; label.lft("$2x$", point 0 of arc3);
drawoptions();
draw A -- B -- C -- cycle;
draw P -- B -- D;
label.llft("{\tfx\ss A}", A);
label.top("{\tfx\ss B}", B);
label.lrt("{\tfx\ss C}", C);
label.bot("{\tfx\ss P}", P);
label.bot("{\tfx\ss D}", D);
\stopuseMPgraphic
\useMPgraphic{name}
\stoptext
答案2
只是为了好玩。
使用以下方式编译渐近线。 :-)
unitsize(1cm);
pair A=(0,0),B=4.5*dir(80),C=(5.2,0),
P=(B.x,A.y),D=reflect(P,B)*A;
draw(A--B--C--cycle^^B--P^^B--D);
draw(scale(.7)*Label("$2x$",Relative(0)),arc(B,0.4,degrees(dir(A-B)),degrees(dir(D-B))));
draw(scale(.7)*"$5x$",arc(C,0.3,degrees(dir(B-C)),degrees(dir(A-C))));
draw(scale(.7)*"$8x$",arc(A,0.3,0,80));
label("$A$",A,dir(-135));
label("$B$",B,dir(90));
label("$C$",C,dir(-45));
label("$P$",P,dir(-90));
label("$D$",D,dir(-90));