为什么直角不适合 90 + 15 的旋转角度?
\documentclass[border=5mm]{standalone}
\usepackage{luatex85}
\usepackage{luamplib}
\begin{document}
\mplibtextextlabel{enable}
\begin{mplibcode}
beginfig(1);
numeric u;
u = 1cm;
path cercle, sq, circle;
cercle = halfcircle rotated 15 scaled 7u;
sq = unitsquare scaled 6;
z0 = point 0 of cercle;
z1 = point 6 of cercle;
z2 = point 2.5 of cercle;
circle = cercle reflectedabout(z0,z1);
draw z0 -- z1;
draw z0 -- z2;
draw z1 -- z2;
draw sq shifted z2 rotatedaround(z2,-105);
draw cercle;
draw circle;
dotlabel.top("$I$",origin);
dotlabel.ulft("$M$",z2);
dotlabel.urt("$B$",z0);
dotlabel.lft("$A$",z1);
label.urt("$(C)$", point 1.5 of cercle);
endfig;
\end{mplibcode}
\end{document}
答案1
我不明白为什么应该是 -105(我认为应该是 -108.75,但也许不自己进行计算会更容易)。让我添加一些您想要的操作方式,其中 MetaPost 会为您执行这些操作。
numeric u;
u = 1cm;
path cercle, sq, circle;
circle = fullcircle scaled 7u ;
z0 = point 0 of circle rotated 15 ;
z1 = point 4 of circle rotated 15 ;
z2 = point 2.5 of circle rotated 15 ;
draw circle ;
draw z0--z1--z2--cycle ;
path rangle ;
rangle := (6,0)--(6,6)--(0,6) ;
draw rangle rotated angle(z1 - z2) shifted z2 ;
dotlabel.top("$I$",origin);
dotlabel.ulft("$M$",z2);
dotlabel.urt("$B$",z0);
dotlabel.lft("$A$",z1);
label.urt("$(C)$", point 1.5 of circle);
看起来像这样:
答案2
这只是一条注释,是 Asymptote 的一种开发方式,其开发灵感来自 MetaPost。Asymptote 模块geometry.asy
提供了很多欧几里得几何中常见任务的例程,例如markrightangle
。
// http://asymptote.ualberta.ca/
unitsize(1cm);
import geometry; // for markrightangle
real u=3;
path cercle =scale(u)*unitcircle;
//path cercle =circle((0,0),u); // an alternative
pair B = u*dir(20);
pair A = -B;
pair M = u*dir(130);
markrightangle(A,M,B);
draw("$(\mathcal{C})$",cercle,blue);
draw(B--A--M--cycle,magenta);
dot(Label("$I$",align=S),(0,0));
dot("$M$",align=NW,M);
dot("$B$",align=E,B);
dot("$A$",align=W,A);
//label("$(\mathcal{C})$", (u+.3)*dir(75),blue);
shipout(bbox(5mm,invisible));