我想学习如何绘制 IMO 等数学竞赛中出现的几何图形,您有什么建议吗?例如,像这张图片:
答案1
清楚的元帖子拥有绘制此类优雅几何图表所需的所有工具。
prologues := 3;
outputtemplate := "%j%c.eps";
beginfig(1);
% define the radius
r = 100;
% define four points spaced arbitrarily on a circle of radius r;
z1 = (r,0) rotated 140;
z2 = (r,0) rotated 72;
z3 = (r,0) rotated 3;
z4 = (r,0) rotated -120;
% define the points on the circle half way between these points
% do this by finding the angle of the vector sum of the two points
z11 = (r,0) rotated angle (z1 + z2);
z12 = (r,0) rotated angle (z2 + z3);
z13 = (r,0) rotated angle (z3 + z4);
z14 = (r,0) rotated angle (z4 + z1);
% find the intersection of the lines between opposite mid points
z0 = (z11--z13) intersectionpoint (z12--z14);
% draw the circle in grey
draw fullcircle scaled 2r withcolor .7 white;
% draw some radius lines and a chord in pink
drawoptions(withcolor withcolor .37 red + .5 white);
forsuffixes $=11,12,13,14:
draw origin -- z$;
endfor
draw z11 -- z14;
drawoptions();
% mark the right angle
draw unitsquare scaled 5 rotated angle (z12-z14) shifted z0 withcolor .7 white;
% draw A-B-C-D and P-R and S-Q
draw z11 -- z13; draw z12 -- z14;
draw z1 -- z2 -- z3 -- z4 -- cycle;
% label the points, the "scaled" trick works because everything is centred at origin
s = 13/12;
label("A", z1 scaled s);
label("B", z2 scaled s);
label("C", z3 scaled s);
label("D", z4 scaled s);
label("P", z11 scaled s);
label("Q", z12 scaled s);
label("R", z13 scaled s);
label("S", z14 scaled s);
label("I",z0 shifted (7,-3));
endfig;
end.
答案2
此讲义Evan Chen 的这篇文章描述了两种可能的工作流程,一种使用 GeoGebra,另一种使用 Asymptote。还有一个详尽的工作示例。我尝试了 GeoGebra 工作流程,它对我来说很有效,但 Asymptote 甚至更好,因为它与 TeX 集成;然而,它似乎稍微耗时一些。