texlive[72416] Master/texmf-dist/doc/latex/asy-overview: asy-overview

commits+karl at tug.org commits+karl at tug.org
Mon Sep 30 22:08:48 CEST 2024


Revision: 72416
          https://tug.org/svn/texlive?view=revision&revision=72416
Author:   karl
Date:     2024-09-30 22:08:48 +0200 (Mon, 30 Sep 2024)
Log Message:
-----------
asy-overview (30sep24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/asy-overview/asy/jh.asy
    trunk/Master/texmf-dist/doc/latex/asy-overview/asy_overview.pdf
    trunk/Master/texmf-dist/doc/latex/asy-overview/src/appendix/appendix.tex
    trunk/Master/texmf-dist/doc/latex/asy-overview/src/asy_tut.tex
    trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter1/chapter1.tex
    trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter1/main.tex
    trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter2/asy/cos.asy
    trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter2/asy/exponential.asy
    trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter2/asy/plot.asy
    trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter2/asy/plot_after.asy
    trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter2/chapter2.tex
    trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter3/asy/integral.asy
    trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter3/asy/zoom.asy
    trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter3/asy/zoom_iterate.asy
    trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter3/asy/zoom_times.asy
    trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter3/chapter3.tex
    trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter4/asy/planes.asy
    trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter4/asy/vectors.asy
    trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter4/asy/washer.asy
    trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter4/chapter4.tex
    trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter4/main_3d.tex
    trunk/Master/texmf-dist/doc/latex/asy-overview/src/preface/preface.tex

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/asy/jh.asy
===================================================================
--- trunk/Master/texmf-dist/doc/latex/asy-overview/asy/jh.asy	2024-09-30 20:08:33 UTC (rev 72415)
+++ trunk/Master/texmf-dist/doc/latex/asy-overview/asy/jh.asy	2024-09-30 20:08:48 UTC (rev 72416)
@@ -1,15 +1,12 @@
 // Common definitions for asy_tut
 
-// Function to call the texpreamble() function
-void define_texpreamble() {
-  texpreamble("\usepackage{mathtools}
-	      \usepackage[utf8]{inputenc}
-	      \usepackage[osf,scaled=.92,loosest]{heuristica}
-	      \usepackage[heuristica,vvarbb,bigdelims]{newtxmath}
-	      \usepackage[T1]{fontenc}
-	      \renewcommand*\oldstylenums[1]{\textosf{#1}}");
-}
-
+// Set up LaTeX for each label
+texpreamble("\usepackage{mathtools}
+             \usepackage[utf8]{inputenc}
+             \usepackage[osf,scaled=.92,loosest]{heuristica}
+             \usepackage[heuristica,vvarbb,bigdelims]{newtxmath}
+             \usepackage[T1]{fontenc}
+             \renewcommand*\oldstylenums[1]{\textosf{#1}}");
 // Change default size of fonts
 import fontsize;
 defaultpen(fontsize(9pt));  // Like LaTeX \small

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/asy_overview.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/src/appendix/appendix.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/asy-overview/src/appendix/appendix.tex	2024-09-30 20:08:33 UTC (rev 72415)
+++ trunk/Master/texmf-dist/doc/latex/asy-overview/src/appendix/appendix.tex	2024-09-30 20:08:48 UTC (rev 72416)
@@ -4,19 +4,20 @@
 we can put them in a separate file and import them.
 In the earlier \Asy{} sources the lines
 \begin{minted}{Asymptote}
-cd("../../../asy"); import jh; cd(""); define_texpreamble();  
+import "../../../asy/jh.asy" as jh;  
 \end{minted}
-will first run the commands in the file \path{../../../asy/jh.asy},
-and then run the function defined in that file.
+will run the commands in the file \path{../../../asy/jh.asy}
+and also make available the routines and data defined there.
 
-Here is the file.
-Its first few lines define the command to set the fonts,
+Here is the file's contents.
+First, it sets the fonts
 and changes the default font size.
-(This change leaves more room for graphic elements and
-also helps the graphics have a visually cohesive identity.)
+(The smaller size leaves more room for graphic elements and
+also helps the graphics have a visually cohesive identity distinct from 
+the document's body.)
 Then it defines a color scheme.\footnote{%
-  Thank you to \protect\texttt{color.adobe.com} user Michelle Delapenha.}
-Lastly, it defines the 
+  Credit to \protect\texttt{color.adobe.com} user Michelle Delapenha for this scheme.}
+Last, it gives the 
 \mintinline{Asymptote}{material} defaults
 for 3D graphics.
 \begin{center}

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/src/asy_tut.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/asy-overview/src/asy_tut.tex	2024-09-30 20:08:33 UTC (rev 72415)
+++ trunk/Master/texmf-dist/doc/latex/asy-overview/src/asy_tut.tex	2024-09-30 20:08:48 UTC (rev 72416)
@@ -5,8 +5,8 @@
 % See: https://github.com/vectorgraphics/asymptote/blob/master/doc/externalprc.tex
 % Compile .asy files with asy -inlineimage <fn>
 \RequirePackage{asymptote}
-\def\asydir{chapter4/asy/}
-\graphicspath{{asy/}}
+\def\asydir{chapter4/asy}
+\graphicspath{ {asy/} {chapter4/asy/} }
 % uncomment for 3D graphics: 
 \input chapter4/asy/vectors.pre
 \input chapter4/asy/planes.pre

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter1/chapter1.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter1/chapter1.tex	2024-09-30 20:08:33 UTC (rev 72415)
+++ trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter1/chapter1.tex	2024-09-30 20:08:48 UTC (rev 72416)
@@ -3,7 +3,7 @@
 Making an \Asy{} input file is like making a \LaTeX{} input file,
 so you already have a feel for the basics.
 To start, 
-in your favorite editor open an \Asy{} input file \path{asy/unit_circle.asy}.
+use your favorite editor to open a file \path{asy/unit_circle.asy}.
 \begin{minted}{Bash}
 jim at millstone:~/Documents/asy_tut/src$ cd asy
 jim at millstone:~/Documents/asy_tut/src/asy$ emacs unit_circle.asy  
@@ -88,7 +88,7 @@
 
 Second, the dot showing the generic point on the unit circle is too big.
 In the revised source below we've adjusted the size by inserting
-\mintinline{Asymptote}{dotfactor = 4} in line~23
+\mintinline{Asymptote}{dotfactor = 4} in line~22
 (the default factor is $6$).
 
 Finally, the $(\cos\theta,\sin\theta)$ label is in a different font than

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter1/main.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter1/main.tex	2024-09-30 20:08:33 UTC (rev 72415)
+++ trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter1/main.tex	2024-09-30 20:08:48 UTC (rev 72416)
@@ -11,6 +11,6 @@
   \includegraphics{asy/unit_circle_after.pdf}
   % Can instead include the .asy source in the text body.
   % \asyinclude{asy/unit_circle_after.asy} 
-  % There is also an environment where you type the .asy source directly.
+  % There is also an environment where you type the Asy source directly.
 \end{center}
 \end{document}

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter2/asy/cos.asy
===================================================================
--- trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter2/asy/cos.asy	2024-09-30 20:08:33 UTC (rev 72415)
+++ trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter2/asy/cos.asy	2024-09-30 20:08:48 UTC (rev 72416)
@@ -1,6 +1,6 @@
 // cos.asy
 settings.outformat="pdf";
-cd("../../../asy"); import jh; cd(""); define_texpreamble();
+import "../../../asy/jh.asy" as jh;
 
 import graph; 
 

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter2/asy/exponential.asy
===================================================================
--- trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter2/asy/exponential.asy	2024-09-30 20:08:33 UTC (rev 72415)
+++ trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter2/asy/exponential.asy	2024-09-30 20:08:48 UTC (rev 72416)
@@ -1,6 +1,6 @@
 // exponential.asy
 settings.outformat="pdf";
-cd("../../../asy"); import jh; cd(""); define_texpreamble();
+import "../../../asy/jh.asy" as jh;
 
 import graph; 
 
@@ -25,7 +25,7 @@
 
 // Axes making graph paper
 pen GRAPHPAPERPEN=(0.25*LIGHT_COLOR+0.75*white)
-  +squarecap;  // Make graph paper lines
+  +squarecap;  // For graph paper lines
 
 xaxis(axis=YEquals(ymax+0.2),
       xmin=xmin-0.5, xmax=xmax+0.5,

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter2/asy/plot.asy
===================================================================
--- trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter2/asy/plot.asy	2024-09-30 20:08:33 UTC (rev 72415)
+++ trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter2/asy/plot.asy	2024-09-30 20:08:48 UTC (rev 72416)
@@ -7,7 +7,7 @@
   \usepackage[T1]{fontenc}
   \renewcommand*\oldstylenums[1]{\textosf{#1}}");
 
-import graph; // Access plotting routines
+import graph; 
 
 // Function to be plotted
 real fcn(real x) {

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter2/asy/plot_after.asy
===================================================================
--- trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter2/asy/plot_after.asy	2024-09-30 20:08:33 UTC (rev 72415)
+++ trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter2/asy/plot_after.asy	2024-09-30 20:08:48 UTC (rev 72416)
@@ -1,7 +1,8 @@
 // plot_after.asy
-cd("../../../asy"); import jh; cd(""); define_texpreamble();
+settings.outformat="pdf";
+import "../../../asy/jh.asy" as jh;
 
-import graph; // Access plotting routines
+import graph;
 
 // Function to be plotted
 real fcn(real x) {

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter2/chapter2.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter2/chapter2.tex	2024-09-30 20:08:33 UTC (rev 72415)
+++ trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter2/chapter2.tex	2024-09-30 20:08:48 UTC (rev 72416)
@@ -9,8 +9,8 @@
 We will instead plot the $x$'s where the associated $y$'s 
 are between $-5$ and~$5$. 
 To find these
-we can use \textit{Sage} to solve
-$5=x+(1/(x-1))$ and $-5=x+(1/(x-1))$.
+we can use a computer algebra system such as \textit{Sage} to solve
+$5=x+1/(x-1)$ and $-5=x+1/(x-1)$.
 \begin{minted}{Python}
 sage: x = var('x')
 sage: solve( [5==x+(1/(x-1))], x )
@@ -51,24 +51,25 @@
 \begin{minted}{Asymptote}
 scale(Linear, Linear(0.5))
 \end{minted}
-(the \mintinline{Asymptote}{Linear} is in contrast with
-\mintinline{Asymptote}{Logarithmic}).
+(\mintinline{Asymptote}{Linear} is in contrast with a 
+\mintinline{Asymptote}{Logarithmic} scale).
 The axes and graph now come out rescaled but
 we must also adjust the location
 of points, the ones defining the vertical asymptote line, using for example 
-line~29's \mintinline{Asymptote}{Scale((1,ymin))}.
+line~26's \mintinline{Asymptote}{Scale((1,ymin))}.
 
-That tweak of the $y$~axis causes the tick labels to be scrunched together,
-so we arrange that \Asy{} lists only every fifth label. 
+That tweak of the $y$~axis causes its tick labels to be scrunched together,
+so we arrange that \Asy{} labels only every fifth tick
+(the labeled ones are called major ticks and the others are minor ticks). 
 \begin{minted}{Asymptote}
   yaxis(ymin=ymin-0.4, ymax=ymax+0.4,
       LeftTicks(Step=5, step=1, OmitTick(0), Size=3pt, size=2pt),
       Arrows(TeXHead));
 \end{minted}
-That command also sets the length of the major and minor ticks.
+That command also sets the length of these major and minor ticks.
 
-Here is \path{asy/plot_after.asy} 
-(more on the first couple of lines in the next section).
+Here is \path{asy/plot_after.asy}. 
+An explanation of line~3 is in the next section.
 \begin{center}
   \inputminted{Asymptote}{chapter2/asy/plot_after.asy}
 \end{center}
@@ -82,11 +83,18 @@
 \section{Defaults}
 Rather than copy and paste elements common across graphics 
 such as the font commands or colors,
-we can put them in a separate file \path{jh.asy} and import them,
-as in the prior source's line~2.
-That file's source is in the Appendix.
+we can put them in a separate file and import them,
+as in the prior source's line~3.
+The source of that file, \path{jh.asy}, is in the Appendix.
+(About the
+\mintinline{Asymptote}{"../../../asy/"} 
+directory stuff:~usually we set up \Asy{} with a directory for common files
+and then just say \mintinline{Asymptote}{import jh}.
+But for this document we want that a user can compile without setup
+so the relative path is in the source.)
 
 
+
 \section{Ticks}
 With plot ticks you often want something other
 than the default.
@@ -108,10 +116,10 @@
 the $3\pi/2$ northwest of its tick. 
 
 Our other tick example has a graph paper effect, 
-where ticks  in a light color extending across the graph.
+with lines  in a light color extending across the graph.
 (I sometimes use this for lectures; here, 
-to estimate by eye that the slope of the tangent line 
-at $y=2$ is $2$.)
+to estimate by eye that at $y=2$ the slope of the tangent line 
+is~$2$.)
 \begin{center}
   \includegraphics{chapter2/asy/exponential.pdf}
 \end{center}
@@ -120,28 +128,32 @@
 \begin{center}
   \inputminted{Asymptote}{chapter2/asy/exponential.asy}
 \end{center}
-The graph paper effect is due to the input in lines 30 through~46.
+The graph paper effect is due to the input in lines 26 through~46.
 The horizontal lines are a little clearer so we will cover them.
-They are created by the first two \mintinline{Asymptote}{yaxis(..)} commands,
-which produce two vertical axes, one on the left and one on the right, 
-These are drawn with a \mintinline{Asymptote}{nullpen} so we don't see 
-vertical black lines at those locations.
+They are created by the \mintinline{Asymptote}{yaxis(..)} commands
+in lines 39--46.
+These two vertical axes, one on the left and one on the right, 
+are drawn with a \mintinline{Asymptote}{nullpen} so we don't see 
+vertical black lines at \mintinline{Asymptote}{xmin-0.2}
+and \mintinline{Asymptote}{xmax+0.2}.
 What we do see are
-the ticks extending back and forth between them in the color given by 
+the ticks for those axes,
+extending back and forth between them in the color given by 
 \mintinline{Asymptote}{GRAPHPAPERPEN}, because of 
 the \mintinline{Asymptote}{extend=true}.
 These ticks have a null label because of the 
 \LaTeX{} comment character~\mintinline{Asymptote}{"%"}.
-(The $y$~axis on the left produces the horizontal 
+The $y$~axis on the left produces the horizontal 
 graph paper marks between
-$x=\text{\mintinline{Asymptote}{xmin-0.2}}$ and the third $y$~axis at
+$x=\text{\mintinline{Asymptote}{xmin-0.2}}$ and
 $x=0$, while the one on the right generates the marks 
-from $x=0$ to $x=\text{\mintinline{Asymptote}{xmax+0.2}}$.)
+from $x=0$ to $x=\text{\mintinline{Asymptote}{xmax+0.2}}$.
+(The $x=0$ comes from the $y$~axis in lines 52--54.)
 
-The commands from line~49 to the end produce the black line axes.
+The commands from line~49 to the end produce the axes shown in black.
 % Note that \mintinline{Asymptote}{yaxis(..)} produces only one arrow.
 
-This is a long file but we will discuss a few finer points.
+This is a long file but we will discuss a few fine points.
 One is that the $(\ln(2),2)$ label has a white background
 obscuring some of the graph paper lines, from the
 \mintinline{Asymptote}{Label("$(\ln(2),2)$",filltype=Fill(white))}
@@ -152,7 +164,7 @@
 evaluate 
 \mintinline{Asymptote}{fcn}
 at a finite number of points, and the default was too small so that
-the graphic had jaggies on the left.
+the graphic had visible jaggies.
 
 Finally, lines 18 and~19 as well as lines 27 and~28 make clear that
 essential to understanding \Asy{} is understanding the ideas of  

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter3/asy/integral.asy
===================================================================
--- trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter3/asy/integral.asy	2024-09-30 20:08:33 UTC (rev 72415)
+++ trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter3/asy/integral.asy	2024-09-30 20:08:48 UTC (rev 72416)
@@ -1,6 +1,6 @@
 // integral.asy
 settings.outformat="pdf";
-cd("../../../asy"); import jh; cd(""); define_texpreamble();
+import "../../../asy/jh.asy" as jh;
 
 import graph; 
 

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter3/asy/zoom.asy
===================================================================
--- trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter3/asy/zoom.asy	2024-09-30 20:08:33 UTC (rev 72415)
+++ trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter3/asy/zoom.asy	2024-09-30 20:08:48 UTC (rev 72416)
@@ -1,6 +1,6 @@
 // zoom.asy
 settings.outformat="pdf";
-cd("../../../asy"); import jh; cd(""); define_texpreamble();
+import "../../../asy/jh.asy" as jh;
 
 import graph; 
 

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter3/asy/zoom_iterate.asy
===================================================================
--- trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter3/asy/zoom_iterate.asy	2024-09-30 20:08:33 UTC (rev 72415)
+++ trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter3/asy/zoom_iterate.asy	2024-09-30 20:08:48 UTC (rev 72416)
@@ -1,6 +1,6 @@
 // zoom_iterate.asy
 settings.outformat="pdf";
-cd("../../../asy"); import jh; cd(""); define_texpreamble();
+import "../../../asy/jh.asy" as jh;
 
 import graph; 
 
@@ -7,6 +7,12 @@
 path f = GENERIC_FCN_PLOT;  // Shorter to type 
 real c = 3.1;
 
+// Find f(c) on f and get f'(c)
+real c_time = times(f, c)[0];
+pair c_point = point(f,c_time);
+pair d = dir(f, c_time);
+real t_line_fcn(real x) { return (d.y/d.x)*(x-c_point.x) + c_point.y; }
+
 string OUTPUT_FN = "zoom_iterate%03d";
 for (int i=0; i<4; ++i) {
   picture pic;  // Generate a new picture    
@@ -16,20 +22,14 @@
   real delta = 1/2^(i);
   real xmin = c-delta; real xmax = c+delta;  
 
-  // Find f(c) on f, and get f'(c) as a pair
-  real c_time = times(f, c)[0];
-  pair c_point = point(f,c_time);
-  pair d = dir(f, c_time);
-  real t_line_fcn(real x) { return (d.y/d.x)*(x-c_point.x) + c_point.y; }
-  path t_line = graph(t_line_fcn, xmin, xmax);
-
-  // Limits of f to show
+  // Limits of f and tangent line to show
   real left_time = times(f, xmin)[0];
   real right_time = times(f, xmax)[0];
   path f_shown = subpath(f, left_time, right_time);
+  path t_line = graph(t_line_fcn, xmin, xmax);
 
-  // Draw f and tangent line   
-  transform f_trans = shift(0, 0.5*delta)*shift(0, -1*c_point.y); // Shift f close to axis 
+  // Shift f and tangent line close to x-axis, then draw   
+  transform f_trans = shift(0, 0.5*delta)*shift(0, -1*c_point.y);
   draw(pic, f_trans*f_shown, BOLD_COLOR);
   draw(pic, f_trans*t_line, HIGHLIGHT_COLOR);
   dotfactor = 3;

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter3/asy/zoom_times.asy
===================================================================
--- trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter3/asy/zoom_times.asy	2024-09-30 20:08:33 UTC (rev 72415)
+++ trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter3/asy/zoom_times.asy	2024-09-30 20:08:48 UTC (rev 72416)
@@ -1,6 +1,6 @@
 // zoom_times.asy
 settings.outformat="pdf";
-cd("../../../asy"); import jh; cd(""); define_texpreamble();
+import "../../../asy/jh.asy" as jh;
 
 import graph; 
 

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter3/chapter3.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter3/chapter3.tex	2024-09-30 20:08:33 UTC (rev 72415)
+++ trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter3/chapter3.tex	2024-09-30 20:08:48 UTC (rev 72416)
@@ -2,12 +2,13 @@
 \chapter{Paths and pens}
 
 \section{Paths}
-This plots a function that is generic in that it isn't $f(x)=x^2$ or some
-other function derived from a simple expression.
-We will use this it for the classic Calculus 
-lesson of zooming in on a point of tangency to
-illustrate that
-the curve is locally well-approximated by the line.
+This plots a function that is generic in that it isn't 
+derived from a simple expression such as $\cos x$ or $x+(1/(x-1))$.
+We will use it for the classic Calculus 
+lesson
+illustrating that
+the curve is locally well-approximated by the line,
+by zooming in on a point of tangency.
 \begin{center}
   \includegraphics{chapter3/asy/zoom.pdf}
 \end{center}
@@ -24,6 +25,7 @@
 as \mintinline{Asymptote}{GENERIC_FCN_PLOT}.)
 Earlier, when we drew a vertical asymptote line we instead connected two
 points with a \mintinline{Asymptote}{--} operator, which gives a line segment.
+There are other connectors but these two are the most common.
 
 In line~17, \Asy's 
 \mintinline{Asymptote}{dir(..)} command gives the direction of the
@@ -40,7 +42,7 @@
 just as \MF{} and \MP{} do. 
 These curves are
 parametrized by a variable called `time'.
-By definition, the initial point $(0,-25)$ is at time~$0$, the next point 
+By definition, the initial point $(0,-0.25)$ is at time~$0$, the next point 
 $(1,0.35)$ is at time~$1$, etc.
 (To forestall any confusion:~the time has nothing to do with the
 first coordinate, it comes from when the point is specified in the
@@ -51,7 +53,7 @@
   \includegraphics{chapter3/asy/zoom_times.pdf}
 \end{center}
 The \mintinline{Asymptote}{times(..)} command returns an array of times
-where the path it intersects the vertical line 
+where the path intersects the vertical line 
 $x=\text{\mintinline{Asymptote}{c}}$.
 We extract the first one (in this case the only one) with the 
 \mintinline{Asymptote}{[0]}.
@@ -66,11 +68,11 @@
 \begin{center}
   \inputminted{Asymptote}{chapter3/asy/zoom_times.asy}
 \end{center}
-The first aspect is in line~19.
+The first of those is in line~19.
 The \mintinline{Asymptote}{format("$%0.02f$",t)} 
 turns the floating point number~$t$ into the string used in the label.
 
-A larger point is in lines~17 through~20, where the code has an iteration.
+The other is in lines~17 through~20, where the code has an iteration.
 One strength of \Asy{} is that it is a standard programming language,
 with clean constructs that are like those you use in other languages
 in your daily work.
@@ -98,8 +100,8 @@
 One reason is that this one file produces four pictures, 
 so that we needn't maintain
 four separate \path{.asy} files with lots of overlap.
-The four output files are produced in the loop between lines~11 and~47.
-Line~12 creates a new 
+The four output files are produced in the loop between lines~17 and~47.
+Line~18 creates a new 
 \mintinline{Asymptote}{picture}
 and line~46 outputs it.
 The files are named 
@@ -112,15 +114,15 @@
 
 Besides using a single input to create multiple output files,
 there are two other things that are new here.
-One is line~13's
+One is line~19's
 \mintinline{Asymptote}{size(pic, 3cm, 0)}.
-This makes each output graphic be three centimeters wide, and as tall as
+This makes each output graphic be three centimeters wide and as tall as
 required, setting the size of the $x$ and~$y$ units as needed to 
 get that width.
 The result is a zooming-in on successively shorter intervals of the $x$~axis.
 
 The other new thing 
-is that when the $x$~axis interval is small, rescaling the units to make the
+is that rescaling the units to make the
 entire figure three centimeters wide
 would put the plotted function very far above the
 $x$~axis.
@@ -128,8 +130,8 @@
 This transformation applies not just to the function but also to the tangent
 line and to the point $(c,f(c))$, so we have broken this
 transformation out as a separate thing,
-line~32's   
-\mintinline{Asymptote}{transform f_trans = shift(0,0.5*delta)*shift(0,-1*c_point.y)}.
+in line~32.   
+%\mintinline{Asymptote}{transform f_trans = shift(0,0.5*delta)*shift(0,-1*c_point.y)}.
 Transformations are applied with the star operator, 
 as on lines~33, 34, and~36.
 
@@ -158,8 +160,8 @@
 The    
 \mintinline{Asymptote}{buildcycle(left_side, f, right_side, bottom)}
 on line~20 is new.
-It takes the paths surrounding the region of interest and
-constructs the path that is its boundary.
+It takes paths surrounding the region of interest and
+constructs the path that is the region's boundary.
 (A more common way to make a cyclic path is to end with 
 \mintinline{Asymptote}{cycle}, as with 
 \mintinline{Asymptote}{path triangle = (0,0)--(0,1)--(1,0)--cycle}.)
@@ -167,7 +169,7 @@
 Then line~23's \mintinline{Asymptote}{fill(region, NEUTRAL_COLOR+opacity(0.5))} 
 covers the region using a pen that, in addition to
 its color, allows some of the material behind it to show through.
-Note that some PDF viewers have trouble with opacity so your results may vary,
+Note that some PDF viewers have trouble with opacity so your results may vary
 but one viewer that gives good results is Adobe's Reader.
 
 The \Asy{} reference gives many options for pens.

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter4/asy/planes.asy
===================================================================
--- trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter4/asy/planes.asy	2024-09-30 20:08:33 UTC (rev 72415)
+++ trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter4/asy/planes.asy	2024-09-30 20:08:48 UTC (rev 72416)
@@ -3,7 +3,7 @@
 settings.tex="pdflatex";  
 settings.prc = true;
 settings.render = 0;
-cd("../../../asy"); import jh; cd(""); define_texpreamble();
+import "../../../asy/jh.asy" as jh;
 
 import graph3;
 projection default_projection = orthographic(3,1.5,0.5,up=Z);

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter4/asy/vectors.asy
===================================================================
--- trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter4/asy/vectors.asy	2024-09-30 20:08:33 UTC (rev 72415)
+++ trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter4/asy/vectors.asy	2024-09-30 20:08:48 UTC (rev 72416)
@@ -3,7 +3,7 @@
 settings.tex = "pdflatex";  // For compiling in-pic text
 settings.prc = true;  // Manipulable in a PDF file
 settings.render = 0;  // Needed for "poster" image, i.e., picture to click on
-cd("../../../asy"); import jh; cd(""); define_texpreamble();
+import "../../../asy/jh.asy" as jh;
 
 import fontsize;
 

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter4/asy/washer.asy
===================================================================
--- trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter4/asy/washer.asy	2024-09-30 20:08:33 UTC (rev 72415)
+++ trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter4/asy/washer.asy	2024-09-30 20:08:48 UTC (rev 72416)
@@ -3,7 +3,7 @@
 settings.outformat = "pdf";
 settings.render = 8;  // Tweaked this until poster pic looked better
 settings.prc = true;
-cd("../../../asy"); import jh; cd(""); define_texpreamble();
+import "../../../asy/jh.asy" as jh;
 
 import graph3;
 projection default_projection = orthographic(3,1.5,0.5,up=Z);

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter4/chapter4.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter4/chapter4.tex	2024-09-30 20:08:33 UTC (rev 72415)
+++ trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter4/chapter4.tex	2024-09-30 20:08:48 UTC (rev 72416)
@@ -1,9 +1,10 @@
 % Chapter 4 from Asymptote tutorial Jim Hefferon
-\def\asydir{chapter4/asy/}
+\def\asydir{chapter4/asy}
 \chapter{3D}
 
 A strength of \Asy{} is its ability in three dimensions.
-It can easily draw what you want to draw, including
+It can easily draw what you want to draw.
+That includes 
 % that it extends  to three dimensions constructs for good-looking paths
 % that come from two-dimensional \MF{} and \MP.
 doing projections, which can be tricky to get right by eye.
@@ -11,16 +12,15 @@
 In addition, you can choose to make these graphics manipulable, so that you can 
 use your mouse to turn them around or peek under them, and in 
 general have an explore.
-This is great for a Calculus lecture so its what I'm showing here.
-
-Note that only some PDF viewers let you manipulate.
-For instance, Adobe's Reader works but the readers embedded in web
+This is great for a Calculus lecture so it is what I'm showing here.
+(Note that only some PDF viewers let you manipulate.
+For instance, Adobe's Reader works but the ones embedded in web
 browsers do not.
 To test your reader just click on the graphic below.
-(You may be asked to let the reader 
+You may be asked to let the reader 
 run the code that does the manipulation.)
 
-We start with a picture showing the vector of displacements $(2,1,1)$ at a 
+We start with a picture showing the displacement vector $(2,1,1)$ at a 
 number of initial points.
 % \begin{center}
 %   \asyinclude{chapter4/asy/vectors}
@@ -29,8 +29,8 @@
   \input chapter4/asy/vectors.tex
 \end{center}  
 
-The input code has two different things going on.
-First, so that the vectors are scattered about,
+The input code shows two new things.
+First, to scatter the vectors about,
 in lines 34--36 they get a randomly-chosen initial point.
 The randomization uses the seed from line~24.
 To find that number I uncommented lines 21--23 and commented out line~24,
@@ -43,7 +43,7 @@
 \begin{center}
   \inputminted{Asymptote}{chapter4/asy/vectors.asy}
 \end{center}
-The other thing in the code is the 3D stuff.
+However, the really new stuff is the 3D stuff.
 It is surprisingly like the 2D constructs that we have seen.
 Line~10's 
 \mintinline{Asymptote}{import graph3} gives access to 
@@ -57,10 +57,15 @@
 you say 
 \mintinline{Asymptote}{xaxis3(..)}.
 But much of it is at least similar.
+(Lines~11 and~12 give the projection,
+essentially setting the location of the camera
+that is taking this picture.
+Even if we use a reader that allows us to manipulate the image,
+we still need a starting view.)
 
-The next graphic shows surfaces, 
-which are genuinely different than what we saw in 2D.
-It illustrates that the angle between two 
+We next see something 
+genuinely different from a 2D context, surfaces.
+This graphic illustrates that the angle between two 
 intersecting planes is the same as the angle between their normal
 vectors. 
 % \begin{center}
@@ -69,15 +74,11 @@
 \begin{center}
   \vcenteredhbox{\input chapter4/asy/planes.tex }%
 \end{center}  
-We can imagine that lines~19 and~20 set the location of the camera
-that is taking this picture.
-Even if we use a reader where the image is manipulable,
-we need a starting view.
 \begin{center}
   \inputminted{Asymptote}{chapter4/asy/planes.asy}
 \end{center}
 
-This graphic's code 
+This code 
 spotlights the power of transforms.
 We don't have to give the equations of the planes or specify their normals.
 Instead, in line~17 we define the edge of 
@@ -91,12 +92,12 @@
 then comes from applying that transform
 to the horizontal plane, its edge, and its normal.
 
-To color the surfaces, in lines~24 and~26 we use 
-\mintinline{Asymptote}{figure material}.
-We will reuse these later so the definition is in \path{jh.sty};
-see lines~28--35 in the Appendix.
-This coloring involves \mintinline{Asymptote}{opacity(..)} and 
-note that you can indeed see through the planes to some extent. 
+In lines~24 and~26 we use 
+\mintinline{Asymptote}{figure_material} to give the surfaces color.
+We will reuse this later so the definition is in \path{jh.sty};
+see lines~26--32 in the Appendix.
+This involves \mintinline{Asymptote}{opacity(..)} and 
+note that you can indeed see through the planes. 
 
 Finally, in lines~40--46 we take advantage of one of \Asy's many helper functions
 to find and draw the arc of the angle between the planes and the normals.
@@ -144,8 +145,9 @@
   \framebox{\includegraphics[page=1,scale=0.325,trim=0.25in 5in 0.25in 0.25in]{chapter4/main_3d.pdf}}
 \end{center}
 In that output PDF, 
-you should be able to click on the graphic and move it around
-(of course, your reader must supports this). 
+you should be able to click on the poster graphic to bring up
+the manipulable graphic,
+if your reader supports that. 
 
 
 

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter4/main_3d.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter4/main_3d.tex	2024-09-30 20:08:33 UTC (rev 72415)
+++ trunk/Master/texmf-dist/doc/latex/asy-overview/src/chapter4/main_3d.tex	2024-09-30 20:08:48 UTC (rev 72416)
@@ -1,14 +1,15 @@
 % main_3d.tex  LaTeX demonstraton file showing Asymptote 3D, Jim Hefferon
 \documentclass{article}
 \usepackage{graphicx}
-\graphicspath{ {asy/} }  % Trailing slash, dirs in curly braces 
+\graphicspath{ {asy/} }  % Path to poster graphic; dirs in curly braces,  trailing slash  
 \usepackage{asymptote}  
 \def\asydir{asy}  % No trailing slash
 % For non-manipulable 3D figures, just compile with "asy vectors" and
 % include the PDF output as with 2D figures.
 % For manipulable 3D figures: 
-% (1) Compile .asy file with "asy -inlineimage vectors". 
-% It outputs a number of files, including .tex and .pre files. 
+% (1) Compile the .asy file with "asy -inlineimage vectors". 
+% It outputs a number of files, including .tex and .pre files, 
+% and the .pdf "poster" that you click on to start the manipulation. 
 % (2) Include the .pre line here along with one of the lines in center below
 \input asy/vectors.pre
 
@@ -19,6 +20,6 @@
   \input asy/vectors.tex %
 \end{center}  
 If you use the commented-out way then run 
-\texttt{asy -inlinimage <latex-fn>-1}
+\texttt{asy -inlineimage <latex-fn>-1}
 between a pair of \LaTeX{} runs of this file.
 \end{document}

Modified: trunk/Master/texmf-dist/doc/latex/asy-overview/src/preface/preface.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/asy-overview/src/preface/preface.tex	2024-09-30 20:08:33 UTC (rev 72415)
+++ trunk/Master/texmf-dist/doc/latex/asy-overview/src/preface/preface.tex	2024-09-30 20:08:48 UTC (rev 72416)
@@ -49,5 +49,5 @@
 \begin{flushleft}
 Jim Hef{}feron  \\
 University of Vermont \\
-2024-May-26
+2024-Sep-29
 \end{flushleft}
\ No newline at end of file



More information about the tex-live-commits mailing list.