排版三角剖分

排版三角剖分

第 49 页这些笔记出现以下圆环三角剖分图:

在此处输入图片描述

注意到我在 LyX 工作,

  1. 谁能提供代码来重现这个漂亮的图表?
  2. 在哪里可以学习如何制作这样的图表?

添加:

我也非常喜欢可以生成以下图表的代码: 在此处输入图片描述

答案1

这是开胃菜元帖子,向您展示一种使用相关子元素来组织绘图的方法。

在此处输入图片描述

prologues := 3;
outputtemplate := "%j%c.eps";

beginfig(1);

picture t[], c;

z0 = origin;
z1 = 55 right rotated -5;
z2 = 60 right rotated 60;
z3 = 65 right rotated 20;

c = image(fill fullcircle scaled 3 withcolor background; draw fullcircle scaled 3;);
t1 = image(draw c shifted z1;);
t2 = image(
  draw z1--z2; 
  draw c shifted z1; 
  draw c shifted z2;
);
t3 = image(
  fill z0--z1--z2--cycle withcolor .9[red,white];
  draw z0--z1--z2--cycle;
  draw c shifted z0; 
  draw c shifted z1; 
  draw c shifted z2;
);
t4 = image(
  fill z0--z1--z2--cycle withcolor .9[red,white];
  fill z3--z1--z2--cycle withcolor .7[red,white];
  draw z0--z3 dashed withdots scaled .3 withcolor .7 white;
  draw z0--z1--z2--cycle; draw z1--z3--z2;
  draw c shifted z0; 
  draw c shifted z1; 
  draw c shifted z2;
  draw c shifted z3;
  );

for i=1 upto 4:
  draw t[i] shifted(80i-80,0);
endfor

endfig;
end.

相关内容