找回密码
 欢迎注册
查看: 13001|回复: 9

[原创] Asymptote 精美图集

[复制链接]
发表于 2011-1-24 00:36:02 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?欢迎注册

×
用Asymptote 做科学领域的图形,放在论文里,那绝对是最佳选择。
http://asymptote.sourceforge.net/
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2011-1-24 00:39:21 | 显示全部楼层
阴阳鱼:
Screenshot-yingyang.eps.png
  1. size(0,25cm);
  2. guide center=(0,1){W}..tension 0.8..(0,0){(1,-.5)}..tension 0.8..{W}(0,-1);

  3. draw((0,1)..(-1,0)..(0,-1));
  4. filldraw(center{E}..{N}(1,0)..{W}cycle);
  5. unfill(circle((0,0.5),0.125));
  6. fill(circle((0,-0.5),0.125));
复制代码
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2011-1-24 00:42:15 | 显示全部楼层
经典图形:

Screenshot.png
  1. import graph3;
  2. import grid3;
  3. import palette;
  4. currentprojection=orthographic(0.8,1,1);
  5. size(400,300,IgnoreAspect);
  6. defaultrender.merge=true;
  7. real f(pair z) {return cos(2*pi*z.x)*sin(2*pi*z.y);}
  8. surface s=surface(f,(-1/2,-1/2),(1/2,1/2),50,Spline);
  9. draw(s,mean(palette(s.map(zpart),Rainbow())),black);
  10. grid3(XYZgrid);
复制代码
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2011-1-24 00:52:08 | 显示全部楼层
这种区域的着色有什么软件能胜任呢?
Screenshot-1.png
  1. size(200);

  2. real w=1.35;
  3. path[] p;
  4. for(int k=0; k < 2; ++k) {
  5.   int i=2+2*k;
  6.   int ii=i^2;
  7.   p[k]=(w/ii,1){1,-ii}::(w/i,1/i)::(w,1/ii){ii,-1};
  8. }
  9. path q0=(0,0)--(w,0.5);
  10. path q1=(0,0)--(w,1.5);
  11. draw(q0); draw(p[0]); draw(q1); draw(p[1]);
  12. path s=buildcycle(q0,p[0],q1,p[1]);
  13. fill(s,mediumgrey);
  14. label("$P$",intersectionpoint(p[0],q0),N);
  15. label("$Q$",intersectionpoint(p[0],q1),E);
  16. label("$R$",intersectionpoint(p[1],q1),W);
  17. label("$S$",intersectionpoint(p[1],q0),S);
  18. label("$f > 0$",0.5*(min(s)+max(s)),UnFill);
复制代码
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2011-1-24 00:54:38 | 显示全部楼层
标签文字还可以三维环绕:
Screenshot-2.png
  1. size(200);
  2. import labelpath3;
  3. path3 g=(1,0,0)..(0,1,1)..(-1,0,0)..(0,-1,1)..cycle;
  4. path3 g2=shift(-Z)*reverse(unitcircle3);
  5. string txt1="\hbox{This is \emph{wayne} 3D labels in
  6. \textbf{Asymptote} (implemented with {\tt texpath}).}";
  7. string txt2="Hello.world,I am wayne, this is http://bbs.emath.ac.cn.";
  8. draw(surface(g),paleblue+opacity(0.5));
  9. draw(labelpath(txt1,subpath(g,0,reltime(g,0.95)),angle=-90),orange);
  10. draw(g2,1bp+red);
  11. draw(labelpath(txt2,subpath(g2,0,3.9),angle=180,optional=rotate(-70,X)*Z));
复制代码
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2011-1-24 01:05:00 | 显示全部楼层
与时俱进,看我怎么玩转 东北狼版主的求和公式
Screenshot-3.png
  1. import three;
  2. currentprojection=perspective(100,100,200,up=Y);
  3. draw(scale3(4)*extrude("$\displaystyle\sum_{n=1}^{+\infty}
  4. \frac{1}{k n^2-1}=\frac{1}{2}-\frac{\pi\cot (\frac{\pi }{\sqrt{k}})}{2 \sqrt{k}}$",2Z),blue);
复制代码
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2011-1-24 01:09:40 | 显示全部楼层
还可以作动画的哦:
cube.gif


wheel.gif

cube.asy

946 Bytes, 下载次数: 0, 下载积分: 金币 -1 枚, 经验 1 点, 下载 1 次

wheel.asy

872 Bytes, 下载次数: 0, 下载积分: 金币 -1 枚, 经验 1 点, 下载 1 次

毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2011-1-24 01:15:21 | 显示全部楼层
不知道还有没有人记得我以前发的那个Klein瓶子的图哦,
http://bbs.emath.ac.cn/thread-1758-1-4.html

评分

参与人数 1贡献 +2 收起 理由
数学星空 + 2 绝对有技术含量... 学习了

查看全部评分

毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2011-2-8 14:37:23 | 显示全部楼层
也推荐个隐函数作图器:
隐函数作图器IMPLICIT2D.EXE
隐函数作图器IMPLICIT3D.EXE

搜索一下就能找到,图形很精美。国产的。
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2011-2-14 10:20:27 | 显示全部楼层
9# forcal
难得啊,国内的软件。
只可惜也是要注册码的那种。

还是国外的好,放在网站上,用户直接下载,直接使用,没那么多恼人的限制
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
您需要登录后才可以回帖 登录 | 欢迎注册

本版积分规则

小黑屋|手机版|数学研发网 ( 苏ICP备07505100号 )

GMT+8, 2024-4-20 03:41 , Processed in 0.050967 second(s), 20 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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