diff options
author | Karl Berry <karl@freefriends.org> | 2010-06-19 21:53:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-06-19 21:53:18 +0000 |
commit | ff7dc2bdbd29efcbe2ac2d32ad4a5c742b10e9f0 (patch) | |
tree | ab0e5d781b94e916de3c1c3ba3ddfc99b433ecff /Master/texmf/doc | |
parent | 8e2fd6e5b54cd27c07a470078019ad68243efbc8 (diff) |
asymptote 1.99
git-svn-id: svn://tug.org/texlive/trunk@19067 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf/doc')
-rw-r--r-- | Master/texmf/doc/asymptote/CAD.pdf | bin | 67565 -> 67565 bytes | |||
-rw-r--r-- | Master/texmf/doc/asymptote/asymptote.pdf | bin | 1691053 -> 1690993 bytes | |||
-rw-r--r-- | Master/texmf/doc/asymptote/examples/animations/torusanimation.asy | 57 | ||||
-rw-r--r-- | Master/texmf/doc/asymptote/examples/xstitch.asy | 169 | ||||
-rw-r--r-- | Master/texmf/doc/info/asy-faq.info | 2 | ||||
-rw-r--r-- | Master/texmf/doc/info/asymptote.info | 105 | ||||
-rw-r--r-- | Master/texmf/doc/man/man1/asy.1 | 9 | ||||
-rw-r--r-- | Master/texmf/doc/man/man1/asy.man1.pdf | bin | 11358 -> 11385 bytes |
8 files changed, 258 insertions, 84 deletions
diff --git a/Master/texmf/doc/asymptote/CAD.pdf b/Master/texmf/doc/asymptote/CAD.pdf Binary files differindex e5cfb778ea7..1d787c85f52 100644 --- a/Master/texmf/doc/asymptote/CAD.pdf +++ b/Master/texmf/doc/asymptote/CAD.pdf diff --git a/Master/texmf/doc/asymptote/asymptote.pdf b/Master/texmf/doc/asymptote/asymptote.pdf Binary files differindex e0b2b521e80..3056f8acbf0 100644 --- a/Master/texmf/doc/asymptote/asymptote.pdf +++ b/Master/texmf/doc/asymptote/asymptote.pdf diff --git a/Master/texmf/doc/asymptote/examples/animations/torusanimation.asy b/Master/texmf/doc/asymptote/examples/animations/torusanimation.asy index 8370a0c25af..74a5df43278 100644 --- a/Master/texmf/doc/asymptote/examples/animations/torusanimation.asy +++ b/Master/texmf/doc/asymptote/examples/animations/torusanimation.asy @@ -1,44 +1,43 @@ -import graph3; -import animation; +import graph3; +import animation; import solids; -settings.tex="pdflatex"; -settings.prc=false; -settings.render=4; - -currentprojection=orthographic((0,5,2)); -currentlight=(0,5,5); -unitsize(1cm); - -real R=3; -real a=1; -int n=8; +currentprojection=perspective(50,40,20); + +currentlight=(0,5,5); + +real R=3; +real a=1; +int n=8; -path3[] p=new path3[n]; -animation A; +path3[] p=new path3[n]; +animation A; -for(int i=0; i < n; ++i) { - triple g(real s) { - return ((R-a*cos(2*pi*s))*cos(2*pi/(1+i+s)), - (R-a*cos(2*pi*s))*sin(2*pi/(1+i+s)), - -a*sin(2*pi*s)); +for(int i=0; i < n; ++i) { + triple g(real s) { + real twopi=2*pi; + real u=twopi*s; + real v=twopi/(1+i+s); + real cosu=cos(u); + return((R-a*cosu)*cos(v),(R-a*cosu)*sin(v),-a*sin(u)); } - p[i]=graph(g,0,1,operator ..); + p[i]=graph(g,0,1,operator ..); } triple f(pair t) { - return ((R+a*cos(t.y))*cos(t.x),(R+a*cos(t.y))*sin(t.x),a*sin(t.y)); + real costy=cos(t.y); + return((R+a*costy)*cos(t.x),(R+a*costy)*sin(t.x),a*sin(t.y)); } surface s=surface(f,(0,0),(2pi,2pi),8,8,Spline); -for(int i=0; i < n; ++i){ - picture fig; - size3(fig,400); - draw(fig,s,yellow); - for(int j=0;j <= i; ++j) - draw(fig,p[j],blue+linewidth(4)); - A.add(fig); +for(int i=0; i < n; ++i){ + picture fig; + size(fig,20cm); + draw(fig,s,yellow); + for(int j=0; j <= i; ++j) + draw(fig,p[j],blue+linewidth(4)); + A.add(fig); } A.movie(BBox(10,Fill(rgb(0.98,0.98,0.9))),delay=100); diff --git a/Master/texmf/doc/asymptote/examples/xstitch.asy b/Master/texmf/doc/asymptote/examples/xstitch.asy new file mode 100644 index 00000000000..6e692643ae1 --- /dev/null +++ b/Master/texmf/doc/asymptote/examples/xstitch.asy @@ -0,0 +1,169 @@ +pair c=(0,0.8); + +int iters(pair z, int max=160) { + int n=0; + while(abs(z) < 2 && n < max) { + z=z*z+c; + ++n; + } + return n; +} + +int[] cutoffs={12,15,20,30,40,60,200}; +int key(pair z) { + int i=iters(z); + int j=0; + while(cutoffs[j] < i) + ++j; + return j; +} + + +int width=210; +int height=190; + +real zoom=2.5/200; + +int[][] values=new int[width][height]; +int[] histogram; for(int v=0; v < 10; ++v) histogram.push(0); +for(int i=0; i < width; ++i) { + real x=zoom*(i-width/2); + for(int j=0; j < height; ++j) { + real y=zoom*(j-height/2); + int v=key((x,y)); + values[i][j]=v; + ++histogram[v]; + } +} + +// Print out a histogram. +write("histogram: "); +write(histogram); + + +pen linepen(int i, int max) { + real w=i == -1 || i == max+1 ? 2.0 : + i % 10 == 0 || i == max ? 1.0 : + i % 5 == 0 ? 0.8 : + 0.25; + return linewidth(w); +} + +pen xpen(int i) { + return linepen(i,width)+(i == width/2 ? red : + i == 75 || i == width-75 ? dashed : + black); +} + +pen ypen(int i) { + return linepen(i,height)+(i == height/2 ? red : + i == 75 || i == height-75 ? dashed : + black); +} + +// The length of the side of a cross stitch cell. +real cell=2.3mm; +transform t=scale(cell); + + +picture tick; +draw(tick,(0,0)--(1,1)); + +picture ell; +draw(ell,(0,1)--(0,0)--(0.7,0)); + +picture cross; +draw(cross,(0,0)--(1,1)); +draw(cross,(1,0)--(0,1)); + +picture star; +draw(star,(0.15,0.15)--(0.85,0.85)); +draw(star,(0.85,0.15)--(0.15,0.85)); +draw(star,(.5,0)--(.5,1)); +draw(star,(0,.5)--(1,.5)); + +picture triangle; +draw(triangle,(0,0)--(2,0)--(1,1.5)--cycle); + +picture circle; +fill(circle,shift(1,1)*unitcircle); + +picture ocircle; +draw(ocircle,shift(1,1)*unitcircle); + +picture spare; +fill(spare,(0,0)--(1,1)--(0,1)--cycle); + +picture[] pics={tick,ell,cross,star,triangle,circle}; +pen[] colors={black,0.2purple,0.4purple,0.6purple,0.8purple,purple, + 0.8purple+0.2white}; + +frame[] icons; +icons.push(newframe); +for(picture pic : pics) { + // Scaling factor, so that we don't need weird line widths. + real X=1.0; + frame f=pic.fit(.8X*cell,.8X*cell,Aspect); + f=scale(1/X)*f; + + // Center the icon in the cell. + f=shift((cell/2,cell/2)-0.5(max(f)-min(f)))*f; + + icons.push(f); +} + +void drawSection(int xmin, int xmax, int ymin, int ymax) { + static int shipoutNumber=0; + + // Draw directly to a frame for speed reasons. + frame pic; + + for(int i=xmin; i <= xmax; ++i) { + draw(pic,t*((i,ymin)--(i,ymax)),xpen(i)); + if(i%10 == 0) { + label(pic,string(i),t*(i,ymin),align=S); + label(pic,string(i),t*(i,ymax),align=N); + } + } + for(int j=ymin; j <= ymax; ++j) { + draw(pic,t*((xmin,j)--(xmax,j)),ypen(j)); + if(j%10 == 0) { + label(pic,string(j),t*(xmin,j),align=W); + label(pic,string(j),t*(xmax,j),align=E); + } + } + + if(xmin < 0) + xmin=0; + if(xmax >= width) + xmax=width-1; + if(ymin < 0) + ymin=0; + if(ymax >= height) + ymax=height-1; + + int stitchCount=0; + path box=scale(cell) *((0,0)--(1,0)--(1,1)--(0,1)--cycle); + for(int i=xmin; i < xmax; ++i) + for(int j=ymin; j < ymax; ++j) { + int v=values[i][j]; + add(pic,icons[v],(i*cell,j*cell)); + //fill(pic,shift(i*cell,j*cell)*box,colors[v]); + if(v != 0) + ++stitchCount; + } + + write("stitch count: ",stitchCount); + + shipout("xstitch"+string(shipoutNumber),pic); + ++shipoutNumber; +} + +drawSection(-1,width+1,-1,height+1); + + +//drawSection(-1,80,height-80,height+1); +//drawSection(70,150,height-80,height+1); +drawSection(quotient(width,2)-40,quotient(width,2)+40,quotient(height,2)-40,quotient(height,2)+40); +//drawSection(width-150,width-70,-1,80); +//drawSection(width-80,width+1,-1,80); diff --git a/Master/texmf/doc/info/asy-faq.info b/Master/texmf/doc/info/asy-faq.info index 1664d59845e..61c827ac745 100644 --- a/Master/texmf/doc/info/asy-faq.info +++ b/Master/texmf/doc/info/asy-faq.info @@ -9,7 +9,7 @@ END-INFO-DIR-ENTRY File: $prefix.info, Node: Top, Next: Question 1.1, Up: (dir) ASYMPTOTE FREQUENTLY ASKED QUESTIONS - 14 Jun 2010 + 18 Jun 2010 This is the list of Frequently Asked Questions about Asymptote (asy). diff --git a/Master/texmf/doc/info/asymptote.info b/Master/texmf/doc/info/asymptote.info index 481694a9d08..d672a648432 100644 --- a/Master/texmf/doc/info/asymptote.info +++ b/Master/texmf/doc/info/asymptote.info @@ -1,7 +1,7 @@ This is asymptote.info, produced by makeinfo version 4.13 from ../asymptote.texi. -This file documents `Asymptote', version 1.98. +This file documents `Asymptote', version 1.99. `http://asymptote.sourceforge.net' @@ -23,7 +23,7 @@ File: asymptote.info, Node: Top, Next: Description, Up: (dir) Asymptote ********* -This file documents `Asymptote', version 1.98. +This file documents `Asymptote', version 1.99. `http://asymptote.sourceforge.net' @@ -7846,7 +7846,8 @@ Options (negate by replacing - with -no): -embed Embed rendered preview image [true] -exitonEOF Exit interactive mode on EOF [true] -fitscreen Fit rendered image to screen [true] --framerate frames/sec Animation speed [30] +-framedelay ms Additional frame delay [0] +-framerate frames/s Animation speed [30] -globalwrite Allow write to other directory [false] -gray Convert all colors to grayscale [false] -h,-help Show summary of options; command-line only @@ -7886,7 +7887,7 @@ Options (negate by replacing - with -no): -rgb Convert cmyk colors to rgb [false] -safe Disable system call [true] -scroll n Scroll standard output n lines at a time [0] --spinstep deg/sec Spin speed [60] +-spinstep deg/s Spin speed [60] -svgemulation Emulate unimplemented SVG shading [false] -tabcompletion Interactive prompt auto-completion [true] -tex engine latex|pdflatex|xelatex|tex|pdftex|context|none [latex] @@ -8379,9 +8380,9 @@ Index * ---: Bezier curves. (line 83) * -=: Self & prefix operators. (line 6) -* -c: Options. (line 172) -* -l: Options. (line 191) -* -u: Options. (line 182) +* -c: Options. (line 173) +* -l: Options. (line 192) +* -u: Options. (line 183) * -V <1>: Tutorial. (line 19) * -V: Configuring. (line 6) * ..: Tutorial. (line 125) @@ -8444,7 +8445,7 @@ Index (line 48) * alias <1>: Arrays. (line 182) * alias: Structures. (line 52) -* align: Options. (line 166) +* align: Options. (line 167) * Align: label. (line 12) * all: Arrays. (line 330) * Allow: Pens. (line 327) @@ -8457,7 +8458,7 @@ Index * animate: Configuring. (line 67) * animation: animation. (line 6) * annotate: annotate. (line 6) -* antialias <1>: Options. (line 141) +* antialias <1>: Options. (line 142) * antialias: three. (line 210) * antialiasing: Compiling from UNIX source. (line 16) @@ -8503,7 +8504,7 @@ Index * asy.vim: Editing modes. (line 33) * asymptote.sty: LaTeX usage. (line 6) * asymptote.xml: Editing modes. (line 49) -* ASYMPTOTE_CONFIG: Options. (line 113) +* ASYMPTOTE_CONFIG: Options. (line 114) * aTan: Mathematical functions. (line 20) * atan: Mathematical functions. @@ -8516,7 +8517,7 @@ Index * attach <1>: graph. (line 415) * attach: LaTeX usage. (line 31) * autoadjust: three. (line 354) -* autoimport: Options. (line 109) +* autoimport: Options. (line 110) * automatic scaling: graph. (line 682) * axialshade: fill. (line 43) * axis <1>: graph3. (line 66) @@ -8652,13 +8653,13 @@ Index * conditional <1>: Arithmetic & logical. (line 73) * conditional: Programming. (line 8) -* config: Options. (line 113) -* configuration file <1>: Options. (line 113) +* config: Options. (line 114) +* configuration file <1>: Options. (line 114) * configuration file: Configuring. (line 23) * configuring: Configuring. (line 6) * conj: Data types. (line 57) * constructors: Structures. (line 91) -* context: Options. (line 141) +* context: Options. (line 142) * continue <1>: Debugger. (line 31) * continue: Programming. (line 29) * contour: contour. (line 9) @@ -8666,11 +8667,11 @@ Index * controls <1>: three. (line 6) * controls: Bezier curves. (line 45) * controlSpecifier: Paths and guides. (line 379) -* convert <1>: Options. (line 141) +* convert <1>: Options. (line 142) * convert <2>: animation. (line 6) * convert <3>: Files. (line 150) * convert: Configuring. (line 67) -* convertOptions: Options. (line 128) +* convertOptions: Options. (line 129) * Coons shading: fill. (line 74) * copy: Arrays. (line 169) * Cos: Mathematical functions. @@ -8761,7 +8762,7 @@ Index * drawline: math. (line 9) * drawtree: drawtree. (line 9) * dvips: Configuring. (line 67) -* dvipsOptions: Options. (line 128) +* dvipsOptions: Options. (line 129) * dvisvgm: Configuring. (line 67) * E <1>: Mathematical functions. (line 48) @@ -8799,7 +8800,7 @@ Index * eof: Files. (line 88) * eol <1>: Arrays. (line 345) * eol: Files. (line 88) -* EPS <1>: Options. (line 141) +* EPS <1>: Options. (line 142) * EPS: label. (line 80) * erase <1>: Frames and pictures. (line 7) * erase <2>: Data types. (line 239) @@ -8874,7 +8875,7 @@ Index * fontcommand: Pens. (line 207) * fontsize: Pens. (line 178) * for: Programming. (line 8) -* format <1>: Options. (line 141) +* format <1>: Options. (line 142) * format: Data types. (line 267) * forum: Help. (line 6) * frame: Frames and pictures. (line 7) @@ -8899,7 +8900,7 @@ Index * getreal: Files. (line 113) * getstring: Files. (line 113) * gettriple: Files. (line 113) -* glOptions <1>: Options. (line 128) +* glOptions <1>: Options. (line 129) * glOptions: three. (line 210) * GNU Scientific Library: Mathematical functions. (line 48) @@ -8921,7 +8922,7 @@ Index (line 48) * GSL: Compiling from UNIX source. (line 58) -* gsOptions: Options. (line 128) +* gsOptions: Options. (line 129) * GUI: GUI. (line 6) * GUI installation: GUI installation. (line 6) * GUI usage: GUI usage. (line 6) @@ -8947,7 +8948,7 @@ Index * HookHead: draw. (line 26) * HookHead3: three. (line 543) * Horizontal: flowchart. (line 81) -* hyperrefOptions: Options. (line 128) +* hyperrefOptions: Options. (line 129) * hypot: Mathematical functions. (line 6) * I: Mathematical functions. @@ -8963,7 +8964,7 @@ Index * if: Programming. (line 8) * IgnoreAspect: Frames and pictures. (line 58) * image: palette. (line 34) -* ImageMagick <1>: Options. (line 141) +* ImageMagick <1>: Options. (line 142) * ImageMagick <2>: animation. (line 6) * ImageMagick: Configuring. (line 67) * images: palette. (line 6) @@ -9037,7 +9038,7 @@ Index * Landscape: Frames and pictures. (line 95) * lastcut: Paths and guides. (line 251) * lasy-mode: Editing modes. (line 6) -* latex: Options. (line 141) +* latex: Options. (line 142) * LaTeX fonts: Pens. (line 192) * LaTeX usage: LaTeX usage. (line 6) * latin1: latin1. (line 6) @@ -9168,7 +9169,7 @@ Index * none: Files. (line 58) * None: draw. (line 19) * normal: three. (line 488) -* nosafe: Options. (line 161) +* nosafe: Options. (line 162) * NOT: Arithmetic & logical. (line 80) * NoTicks: graph. (line 161) @@ -9184,7 +9185,7 @@ Index * obliqueY: three. (line 334) * obliqueZ: three. (line 319) * ode: ode. (line 9) -* offset <1>: Options. (line 166) +* offset <1>: Options. (line 167) * offset: Pens. (line 115) * OmitTick: graph. (line 239) * OmitTickInterval: graph. (line 239) @@ -9210,7 +9211,7 @@ Index * orthographic: three. (line 338) * outformat: three. (line 127) * outprefix: Frames and pictures. (line 83) -* output <1>: Options. (line 141) +* output <1>: Options. (line 142) * output: Files. (line 35) * OutTicks: graph3. (line 34) * overloading functions: Functions. (line 44) @@ -9238,10 +9239,10 @@ Index * path[]: Tutorial. (line 132) * patterns <1>: patterns. (line 6) * patterns: Pens. (line 238) -* PDF: Options. (line 141) -* pdflatex: Options. (line 141) +* PDF: Options. (line 142) +* pdflatex: Options. (line 142) * pdfviewer: Configuring. (line 6) -* pdfviewerOptions: Options. (line 128) +* pdfviewerOptions: Options. (line 129) * pen: Pens. (line 6) * PenMargin: draw. (line 42) * PenMargin2: three. (line 559) @@ -9288,7 +9289,7 @@ Index (line 6) * psview: Microsoft Windows. (line 16) * psviewer: Configuring. (line 6) -* psviewerOptions: Options. (line 128) +* psviewerOptions: Options. (line 129) * pt: Tutorial. (line 61) * public: Structures. (line 6) * push: Arrays. (line 39) @@ -9332,7 +9333,7 @@ Index * remainder: Mathematical functions. (line 6) * rename: Files. (line 147) -* render <1>: Options. (line 141) +* render <1>: Options. (line 142) * render: three. (line 47) * replace: Data types. (line 252) * resetdefaultpen: Pens. (line 353) @@ -9367,7 +9368,7 @@ Index * runtime imports: Import. (line 98) * Russian: unicode. (line 7) * S: Tutorial. (line 104) -* safe: Options. (line 161) +* safe: Options. (line 162) * save: Frames and pictures. (line 262) * saveline: Files. (line 130) * scale: three. (line 452) @@ -9394,7 +9395,7 @@ Index * self operators: Self & prefix operators. (line 6) * sequence: Arrays. (line 127) -* settings <1>: Options. (line 113) +* settings <1>: Options. (line 114) * settings: Configuring. (line 23) * sgn: Mathematical functions. (line 26) @@ -9424,7 +9425,7 @@ Index * SixViews: three. (line 396) * SixViewsFR: three. (line 396) * SixViewsUS: three. (line 396) -* size <1>: Options. (line 141) +* size <1>: Options. (line 142) * size <2>: three. (line 502) * size <3>: Frames and pictures. (line 43) * size: Paths and guides. (line 70) @@ -9479,9 +9480,9 @@ Index * SuppressQuiet: Pens. (line 335) * surface <1>: graph3. (line 100) * surface: three. (line 47) -* SVG: Options. (line 141) +* SVG: Options. (line 142) * SVN: Subversion. (line 6) -* system <1>: Options. (line 161) +* system <1>: Options. (line 162) * system: Files. (line 155) * syzygy: syzygy. (line 6) * tab: Files. (line 58) @@ -9499,7 +9500,7 @@ Index * tensionSpecifier: Paths and guides. (line 385) * tensor product shading: fill. (line 74) * tensorshade: fill. (line 74) -* tex <1>: Options. (line 141) +* tex <1>: Options. (line 142) * tex: Frames and pictures. (line 278) * TeX fonts: Pens. (line 201) * TeX string: Data types. (line 179) @@ -9615,7 +9616,7 @@ Index * X: three. (line 274) * xasy: GUI. (line 6) * xaxis3: graph3. (line 7) -* xelatex <1>: Options. (line 141) +* xelatex <1>: Options. (line 142) * xelatex: embed. (line 10) * xequals: graph. (line 294) * XEquals: graph. (line 280) @@ -9805,18 +9806,18 @@ Node: contour3300228 Node: slopefield300535 Node: ode301972 Node: Options302232 -Ref: configuration file308028 -Ref: settings308028 -Ref: convert309229 -Node: Interactive mode312196 -Ref: history314349 -Node: GUI315654 -Node: GUI installation316157 -Node: GUI usage317287 -Node: PostScript to Asymptote318190 -Node: Help318946 -Node: Debugger320682 -Node: Credits322467 -Node: Index323399 +Ref: configuration file308077 +Ref: settings308077 +Ref: convert309278 +Node: Interactive mode312245 +Ref: history314398 +Node: GUI315703 +Node: GUI installation316206 +Node: GUI usage317336 +Node: PostScript to Asymptote318239 +Node: Help318995 +Node: Debugger320731 +Node: Credits322516 +Node: Index323448 End Tag Table diff --git a/Master/texmf/doc/man/man1/asy.1 b/Master/texmf/doc/man/man1/asy.1 index e5ff5977db3..d9e680befc7 100644 --- a/Master/texmf/doc/man/man1/asy.1 +++ b/Master/texmf/doc/man/man1/asy.1 @@ -95,7 +95,12 @@ Exit interactive mode on EOF [true]. .TP .B \-fitscreen Fit rendered image to screen [true]. --framerate frames/sec Animation speed [30] +.TP +.B \-framedelay ms +Additional frame delay [0]. +.TP +.B \-framerate frames/s +Animation speed [30]. .TP .B \-globalwrite Allow write to other directory [false]. @@ -214,7 +219,7 @@ Disable system call [true]. .B \-scroll n Scroll standard output n lines at a time [0]. .TP -.B \-spinstep deg/sec +.B \-spinstep deg/s Spin speed [60]. .TP .B \-svgemulation diff --git a/Master/texmf/doc/man/man1/asy.man1.pdf b/Master/texmf/doc/man/man1/asy.man1.pdf Binary files differindex a86ed83a3ab..a074b219c54 100644 --- a/Master/texmf/doc/man/man1/asy.man1.pdf +++ b/Master/texmf/doc/man/man1/asy.man1.pdf |