diff options
author | Karl Berry <karl@freefriends.org> | 2014-04-20 22:56:10 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-04-20 22:56:10 +0000 |
commit | ce5dd4137c8f88f9449e78ea4e02081bb589432e (patch) | |
tree | 1482a78c9484fb143211d3c1bb56d6c95f8393a1 /Build/source/utils/asymptote/examples | |
parent | d7e9f3fbc05b16e08afeb5b2569cb39a9b03e661 (diff) |
asy 2.25 sources
git-svn-id: svn://tug.org/texlive/trunk@33565 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/examples')
4 files changed, 71 insertions, 3 deletions
diff --git a/Build/source/utils/asymptote/examples/RiemannSphere.asy b/Build/source/utils/asymptote/examples/RiemannSphere.asy new file mode 100644 index 00000000000..ec1ab7586a9 --- /dev/null +++ b/Build/source/utils/asymptote/examples/RiemannSphere.asy @@ -0,0 +1,47 @@ +import graph3; +import solids; + +currentlight=White; +defaultrender.merge=true; + +size(10cm,0); + +pair k=(1,0.2); +real r=abs(k); +real theta=angle(k); + +real x(real t) { return r^t*cos(t*theta); } +real y(real t) { return r^t*sin(t*theta); } +real z(real t) { return 0; } + +real u(real t) { return x(t)/(x(t)^2+y(t)^2+1); } +real v(real t) { return y(t)/(x(t)^2+y(t)^2+1); } +real w(real t) { return (x(t)^2+y(t)^2)/(x(t)^2+y(t)^2+1); } + +real nb=3; +for (int i=0; i<12; ++i) draw((0,0,0)--nb*(Cos(i*30),Sin(i*30),0),yellow); +for (int i=0; i<=nb; ++i) draw(circle((0,0,0),i),lightgreen+white); + + +path3 p=graph(x,y,z,-200,40,operator ..); +path3 q=graph(u,v,w,-200,40,operator ..); + +revolution sph=sphere((0,0,0.5),0.5); +draw(surface(sph),green+white+opacity(0.5)); + +draw(p,1bp+heavyred); +draw(q,1bp+heavyblue); + +triple + A=(0,0,1), + B=(u(40),v(40),w(40)), + C=(x(40),y(40),z(40)); + +path3 L=A--C; +draw(L,1bp+black); + +pen p=fontsize(8pt); + +dot("$(0,0,1)$",A,N,p); +dot("$(u,v,w)$",B,E,p); +dot("$(x,y,0)$",C,E,p); diff --git a/Build/source/utils/asymptote/examples/circumcircle.asy b/Build/source/utils/asymptote/examples/circumcircle.asy new file mode 100644 index 00000000000..96b3bdd82a0 --- /dev/null +++ b/Build/source/utils/asymptote/examples/circumcircle.asy @@ -0,0 +1,9 @@ +unitsize(1inch); + +path tri=(0,0)--(1,0)--(2,1)--cycle; +pair p1=point(tri,0.5); +pair p2=point(tri,1.5); +pair z0=extension(p1,p1+I*dir(tri,0.5),p2,p2+I*dir(tri,1.5)); +dot(z0); +draw(circle(z0,abs(z0-point(tri,0)))); +draw(tri,red); diff --git a/Build/source/utils/asymptote/examples/refs.bib b/Build/source/utils/asymptote/examples/refs.bib new file mode 100644 index 00000000000..5fde126a050 --- /dev/null +++ b/Build/source/utils/asymptote/examples/refs.bib @@ -0,0 +1,15 @@ +@ARTICLE{Hobby86, + AUTHOR = "John D. Hobby", + TITLE = "Smooth, Easy to Compute Interpolating Splines", + JOURNAL = "Discrete Comput. Geom.", + YEAR = 1986, + VOLUME = 1, + PAGES = "123-140"} + +@BOOK{Knuth86b, + AUTHOR = "Donald E. Knuth", + TITLE = "The \MF{}book", + PUBLISHER = "Addison-Wesley", + YEAR = 1986, + ADDRESS = "Reading, Massachusetts"} + diff --git a/Build/source/utils/asymptote/examples/sqrtx01y1.asy b/Build/source/utils/asymptote/examples/sqrtx01y1.asy index dcb247f572e..0bb7dd52162 100644 --- a/Build/source/utils/asymptote/examples/sqrtx01y1.asy +++ b/Build/source/utils/asymptote/examples/sqrtx01y1.asy @@ -15,9 +15,6 @@ revolution a=revolution(p3,Y,0,360); draw(surface(a),green,render(compression=Low,merge=true)); draw(p3,blue); -xtick((0,0,0)); -xtick((1,0,0)); - xaxis3(Label("$x$",1),Arrow3); yaxis3(Label("$y$",1),ymax=1.5,dashed,Arrow3); dot(Label("$(1,1)$"),(1,1,0)); |