|
在Aops community / Aops blog使用的TeXeR支持的Asymptote, 自动import olympiad.asy和CSE5.asyThe Asymptote CSE5 package is another package that is supported on the AoPS forum 在olympiad中有一个pathticks可以画1#的多重箭头
查看源码- // A picture marking a path g with n ticks spaced spacing apart, with length s in ps points
- // such that the middle tick mark (or one of the two if n is even) is normal to g
- // and located r of the way along path g:
- picture pathticks(path g, int n=1, real r=.5, real spacing=6, real s=8, pen p=currentpen)
- {
- picture pict;
- pair A,B,C,direct;
- real t,l=arclength(g), space=spacing*markscalefactor, halftick=s*markscalefactor/2, startpt;
- if (n>0)
- {
- direct=unit(dir(g,arctime(g,r*l)));
- startpt=r*l-(n-1)/2*space;
- for (int i=0; i<n; ++i)
- {
- t=startpt+i*space;
- B=point(g,arctime(g,t))+(0,1)*halftick*direct;
- C=B+2*(0,-1)*halftick*direct;
- draw(pict,B--C,p);
- }
- }
- return pict;
- }
复制代码
在geometry.asy有一个markangle用来标角, 见tex.stackexchange.com/questions/597937
而在olympiad.asy有anglemark, 应该是功能扩展的. 和rightanglemark用来标直角. 例如
filldraw(anglemark((5,0),(0,0),(3,4)),green,red+linewidth(1));
|
|