找回密码
 快速注册
搜索
查看: 47|回复: 0

regular map

[复制链接]

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

hbghlyj 发表于 2023-5-2 07:43 |阅读模式
以Dodecahedron(正十二面体) 为例, 投影到XY平面
  1. PolyhedronData["Dodecahedron", "Points"] /. Point -> (#[[1 ;; 2]] &) //N
  2. PolyhedronData["Dodecahedron", "FaceIndices"]
复制代码

注意Mathematica的列表index是从1开始的,导入Asymptote需注意p=p--Points[i-1];
unitsize(3cm);
pair[] Points={(-1.37638,0),(1.37638,0),(-0.425325,-1.30902),(-0.425325,1.30902),(1.11352,-0.809017),(1.11352,0.809017),(-0.262866,-0.809017),(-0.262866,0.809017),(-0.688191,-0.5),(-0.688191,0.5),(0.688191,-0.5),(0.688191,0.5),(0.850651,0),(-1.11352,-0.809017),(-1.11352,0.809017),(-0.850651,0),(0.262866,-0.809017),(0.262866,0.809017),(0.425325,-1.30902),(0.425325,1.30902)};
int[][] FaceIndices={{15,10,9,14,1},{2,6,12,11,5},{5,11,7,3,19},{11,12,8,16,7},{12,6,20,4,8},{6,2,13,18,20},{2,5,19,17,13},{4,20,18,10,15},{18,13,17,9,10},{17,19,3,14,9},{3,7,16,1,14},{16,8,4,15,1}};
for(int[] face:FaceIndices){
  guide p;
  for(int i:face){
    p=p--Points[i-1];
  }
  draw(p--cycle);
}
for(pair i:Points){
  dot(i,red);
}
可以与Wikipedia的regular map图对比: The projection of the regular dodecahedron on the H3 Coxeter plane.

主要的代码可以重复使用:
  1. for(int[] face:FaceIndices){
  2.   guide p;
  3.   for(int i:face){
  4.     p=p--Points[i-1];
  5.   }
  6.   draw(p--cycle);
  7. }
  8. for(pair i:Points){
  9.   dot(i,red);
  10. }
复制代码

手机版|悠闲数学娱乐论坛(第3版)

GMT+8, 2025-3-4 12:33

Powered by Discuz!

× 快速回复 返回顶部 返回列表