[OS X TeX] Using the new version of asymptote (v. 1.44)
Martin Costabel
costabel at wanadoo.fr
Sun Oct 12 23:42:28 CEST 2008
Benoit RIVET wrote:
[]
> Here's an example which compiles fine with asymptote 1.43, but doesn't
> with asymptote 1.44 :
With the following diff, it compiles with 1.44 for me; not on 1.43
though. The incompatibilities between 1.43 and 1.44 hit both ways.
Tough luck.
--- asytst_ori.tex 2008-10-12 23:27:21.000000000 +0200
+++ asytst.tex 2008-10-12 23:30:33.000000000 +0200
@@ -8,5 +8,5 @@
import graph3;
-path p;
-path q;
-pair M;
+path3 p;
+path3 q;
+triple M;
@@ -22,9 +22,8 @@
-add(surface(f,(0,0),(2*pi,pi),20,20,meshpen=black));
+draw(surface(f,(0,0),(2*pi,pi),20,20),meshpen=black);
size(80mm,0);
draw((-1.5,-1.5,0)--(1.5,-1.5,0)--(1.5,1.5,0)--(-1.5,1.5,0)--cycle);
-bbox3 b=limits(O,1.25(1,1,1));
-xaxis(Label(scale(0.8)*("$ x$"),1),b,Arrow);
-yaxis(Label(scale(0.8)*("$ y$"),1),b,Arrow);
-zaxis(Label(scale(0.8)*("$ z$"),1),b,Arrow);
+xaxis3(Label(scale(0.8)*("$ x$"),1),0,1.25,Arrow3);
+yaxis3(Label(scale(0.8)*("$ y$"),1),0,1.25,Arrow3);
+zaxis3(Label(scale(0.8)*("$ z$"),1),0,1.25,Arrow3);
--
Martin
>
> \documentclass{article}
> \usepackage{asymptote}
>
> \begin{document}
>
> \begin{center}
> \begin{asy}
> import graph3;
> path p;
> path q;
> pair M;
>
> triple f(pair t) {
> real u=t.x;
> real v=t.y;
> real r=0.75;
> real x=r*cos(u)*sin(v);
> real y=r*sin(u)*sin(v);
> real z=r*cos(v);
> return (x,y,z);
> }
>
> add(surface(f,(0,0),(2*pi,pi),20,20,meshpen=black));
> size(80mm,0);
> draw((-1.5,-1.5,0)--(1.5,-1.5,0)--(1.5,1.5,0)--(-1.5,1.5,0)--cycle);
> bbox3 b=limits(O,1.25(1,1,1));
> xaxis(Label(scale(0.8)*("$ x$"),1),b,Arrow);
> yaxis(Label(scale(0.8)*("$ y$"),1),b,Arrow);
> zaxis(Label(scale(0.8)*("$ z$"),1),b,Arrow);
>
> p=(-0.1,0.1,0.85)--(0.85,-0.85,-0.10);
> q=(0.75*sqrt(2)/2,-0.75*sqrt(2)/2,0)..(0.75*1/2,-0.75*1/2,0.75*sqrt(2)/2)..(0,0,0.75);
>
> M=intersectionpoint(p,q);
> draw(p);
>
> label(scale(0.8)*("$ M$"),M,W);
> dot(M);
> label(scale(0.8)*("$ p(M)$"),(0.75,-0.75,0),W);
> dot((0.75,-0.75,0));
>
> label(scale(0.8)*("$ N$"),(0,0,0.75),N);
> dot((0,0,0.75));
> label(scale(0.8)*("$ S$"),(0,0,-0.75),S);
> dot((0,0,-0.75));
> \end{asy}
> \end{center}
>
> \end{document}
More information about the macostex-archives
mailing list