summaryrefslogtreecommitdiff
path: root/graphics/asymptote/doc
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-01-03 03:01:59 +0000
committerNorbert Preining <norbert@preining.info>2022-01-03 03:01:59 +0000
commit682f8522246e030fbbdea7391dce107754c485d3 (patch)
treed6acc984092fdb35e6525203c6b2ab7ccefaf749 /graphics/asymptote/doc
parent699dd7db121d61d809020fe9dbc0321c3e937745 (diff)
CTAN sync 202201030301
Diffstat (limited to 'graphics/asymptote/doc')
-rw-r--r--graphics/asymptote/doc/CAD.pdfbin198824 -> 198829 bytes
-rw-r--r--graphics/asymptote/doc/FAQ/asy-faq.info2
-rw-r--r--graphics/asymptote/doc/TeXShopAndAsymptote.pdfbin81162 -> 81043 bytes
-rw-r--r--graphics/asymptote/doc/asy-latex.dtx4
-rw-r--r--graphics/asymptote/doc/asy-latex.pdfbin206973 -> 207102 bytes
-rw-r--r--graphics/asymptote/doc/asyRefCard.pdfbin121145 -> 121145 bytes
-rw-r--r--graphics/asymptote/doc/asymptote.pdfbin1241553 -> 1313429 bytes
-rw-r--r--graphics/asymptote/doc/asymptote.sty4
-rw-r--r--graphics/asymptote/doc/asymptote.texi41
-rw-r--r--graphics/asymptote/doc/fillcontour.asy41
-rw-r--r--graphics/asymptote/doc/imagecontour.asy15
-rw-r--r--graphics/asymptote/doc/png/asymptote.info161
12 files changed, 183 insertions, 85 deletions
diff --git a/graphics/asymptote/doc/CAD.pdf b/graphics/asymptote/doc/CAD.pdf
index 5154e96903..b79020dd5b 100644
--- a/graphics/asymptote/doc/CAD.pdf
+++ b/graphics/asymptote/doc/CAD.pdf
Binary files differ
diff --git a/graphics/asymptote/doc/FAQ/asy-faq.info b/graphics/asymptote/doc/FAQ/asy-faq.info
index 9e1d3239ad..47018f683a 100644
--- a/graphics/asymptote/doc/FAQ/asy-faq.info
+++ b/graphics/asymptote/doc/FAQ/asy-faq.info
@@ -10,7 +10,7 @@ END-INFO-DIR-ENTRY
File: asy-faq.info, Node: Top, Next: Question 1.1, Up: (dir)
ASYMPTOTE FREQUENTLY ASKED QUESTIONS
- 2021-12-28
+ 2022-01-01
This is the list of Frequently Asked Questions about Asymptote (asy).
diff --git a/graphics/asymptote/doc/TeXShopAndAsymptote.pdf b/graphics/asymptote/doc/TeXShopAndAsymptote.pdf
index 3a71f1f16a..f6ffa2599b 100644
--- a/graphics/asymptote/doc/TeXShopAndAsymptote.pdf
+++ b/graphics/asymptote/doc/TeXShopAndAsymptote.pdf
Binary files differ
diff --git a/graphics/asymptote/doc/asy-latex.dtx b/graphics/asymptote/doc/asy-latex.dtx
index 7cdc5c5771..211ad202b1 100644
--- a/graphics/asymptote/doc/asy-latex.dtx
+++ b/graphics/asymptote/doc/asy-latex.dtx
@@ -38,7 +38,7 @@ Licence: GPL2+
%</driver>
%<pkg>\ProvidesPackage{asymptote}
%<*pkg>
- [2021/02/06 v1.36 Asymptote style file for LaTeX]
+ [2021/12/29 v1.37 Asymptote style file for LaTeX]
%</pkg>
%
%<*driver>
@@ -195,7 +195,7 @@ Licence: GPL2+
% \begin{macrocode}
\RequirePackage{keyval}
\RequirePackage{ifthen}
-\RequirePackage{color,graphicx}
+\RequirePackage{graphicx}
% \end{macrocode}
%
% \paragraph{Emulating packages}
diff --git a/graphics/asymptote/doc/asy-latex.pdf b/graphics/asymptote/doc/asy-latex.pdf
index d4883f473b..1806d3333d 100644
--- a/graphics/asymptote/doc/asy-latex.pdf
+++ b/graphics/asymptote/doc/asy-latex.pdf
Binary files differ
diff --git a/graphics/asymptote/doc/asyRefCard.pdf b/graphics/asymptote/doc/asyRefCard.pdf
index c98ebc9cb7..19366aaa29 100644
--- a/graphics/asymptote/doc/asyRefCard.pdf
+++ b/graphics/asymptote/doc/asyRefCard.pdf
Binary files differ
diff --git a/graphics/asymptote/doc/asymptote.pdf b/graphics/asymptote/doc/asymptote.pdf
index d6d333db9e..8afc6292ae 100644
--- a/graphics/asymptote/doc/asymptote.pdf
+++ b/graphics/asymptote/doc/asymptote.pdf
Binary files differ
diff --git a/graphics/asymptote/doc/asymptote.sty b/graphics/asymptote/doc/asymptote.sty
index 17a05d68a3..2deb265a80 100644
--- a/graphics/asymptote/doc/asymptote.sty
+++ b/graphics/asymptote/doc/asymptote.sty
@@ -17,7 +17,7 @@
%% Licence: GPL2+
%%
\ProvidesPackage{asymptote}
- [2021/02/06 v1.36 Asymptote style file for LaTeX]
+ [2021/12/29 v1.37 Asymptote style file for LaTeX]
\def\Asymptote{{\tt Asymptote}}
\InputIfFileExists{\jobname.pre}{}{}
\newbox\ASYbox
@@ -31,7 +31,7 @@
\ASYkeepAspecttrue
\RequirePackage{keyval}
\RequirePackage{ifthen}
-\RequirePackage{color,graphicx}
+\RequirePackage{graphicx}
\IfFileExists{ifpdf.sty}{
\RequirePackage{ifpdf}
}{
diff --git a/graphics/asymptote/doc/asymptote.texi b/graphics/asymptote/doc/asymptote.texi
index bd9784f470..085cc77b0c 100644
--- a/graphics/asymptote/doc/asymptote.texi
+++ b/graphics/asymptote/doc/asymptote.texi
@@ -1385,7 +1385,7 @@ void radialshade(picture pic=currentpicture, path g, bool stroke=false,
The boolean parameters @code{extenda} and @code{extendb} indicate
whether the shading should extend beyond the radii @code{a} and @code{b}.
Illustrations of radial shading are provided in the example files
-@code{@uref{https://asymptote.sourceforge.io/gallery/shade.svg,,shade}@uref{https://asymptote.sourceforge.io/gallery/shade.asy,,.asy}}, @code{@uref{https://asymptote.sourceforge.io/gallery/ring.pdf,,ring}@uref{https://asymptote.sourceforge.io/gallery/ring.asy,,.asy}}, and @code{@uref{https://asymptote.sourceforge.io/gallery/shadestroke.pdf,,shadestroke}@uref{https://asymptote.sourceforge.io/gallery/shadestroke.asy,,.asy}}.
+@code{@uref{https://asymptote.sourceforge.io/gallery/shade.svg,,shade}@uref{https://asymptote.sourceforge.io/gallery/shade.asy,,.asy}}, @code{@uref{https://asymptote.sourceforge.io/gallery/PDFs/ring.pdf,,ring}@uref{https://asymptote.sourceforge.io/gallery/PDFs/ring.asy,,.asy}}, and @code{@uref{https://asymptote.sourceforge.io/gallery/PDFs/shadestroke.pdf,,shadestroke}@uref{https://asymptote.sourceforge.io/gallery/PDFs/shadestroke.asy,,.asy}}.
@cindex @code{gouraudshade}
Gouraud shading using fill rule @code{fillrule} and the vertex colors in the
@@ -1402,7 +1402,7 @@ void gouraudshade(picture pic=currentpicture, path g, bool stroke=false,
In the second form, the elements of @code{z} are taken to be successive
nodes of path @code{g}. The pens in @code{p} must belong to the same
color space. Illustrations of Gouraud shading are provided in the example file
-@code{@uref{https://asymptote.sourceforge.io/gallery/Gouraud.pdf,,Gouraud}@uref{https://asymptote.sourceforge.io/gallery/Gouraud.asy,,.asy}}.
+@code{@uref{https://asymptote.sourceforge.io/gallery/PDFs/Gouraud.pdf,,Gouraud}@uref{https://asymptote.sourceforge.io/gallery/PDFs/Gouraud.asy,,.asy}}.
The edge flags used in Gouraud shading are documented here:
@quotation
@url{https://www.adobe.com/content/dam/acom/en/devnet/postscript/pdfs/TN5600.SmoothShading.pdf}
@@ -1440,8 +1440,8 @@ void draw(picture pic=currentpicture, pen fillrule=currentpen, path[] g,
@end verbatim
@noindent
Illustrations of tensor product and Coons shading are provided in the
-example files @code{@uref{https://asymptote.sourceforge.io/gallery/tensor.pdf,,tensor}@uref{https://asymptote.sourceforge.io/gallery/tensor.asy,,.asy}}, @code{@uref{https://asymptote.sourceforge.io/gallery/Coons.pdf,,Coons}@uref{https://asymptote.sourceforge.io/gallery/Coons.asy,,.asy}}, @code{@uref{https://asymptote.sourceforge.io/gallery/3Dwebgl/BezierPatch.pdf,,BezierPatch}@uref{https://asymptote.sourceforge.io/gallery/3Dwebgl/BezierPatch.asy,,.asy}},
-and @code{@uref{https://asymptote.sourceforge.io/gallery/rainbow.pdf,,rainbow}@uref{https://asymptote.sourceforge.io/gallery/rainbow.asy,,.asy}}.
+example files @code{@uref{https://asymptote.sourceforge.io/gallery/PDFs/tensor.pdf,,tensor}@uref{https://asymptote.sourceforge.io/gallery/PDFs/tensor.asy,,.asy}}, @code{@uref{https://asymptote.sourceforge.io/gallery/PDFs/Coons.pdf,,Coons}@uref{https://asymptote.sourceforge.io/gallery/PDFs/Coons.asy,,.asy}}, @code{@uref{https://asymptote.sourceforge.io/gallery/3Dwebgl/BezierPatch.html,,BezierPatch}@uref{https://asymptote.sourceforge.io/gallery/3Dwebgl/BezierPatch.asy,,.asy}},
+and @code{@uref{https://asymptote.sourceforge.io/gallery/PDFs/rainbow.pdf,,rainbow}@uref{https://asymptote.sourceforge.io/gallery/PDFs/rainbow.asy,,.asy}}.
@cindex Function shading
@cindex function shading
@@ -1457,7 +1457,7 @@ shades on picture @code{pic} the interior of path @code{g} according
to fill rule @code{fillrule} using the @code{PostScript} calculator routine
specified by the string @code{shader}; this routine takes 2 arguments,
each in [0,1], and returns @code{colors(fillrule).length} color components.
-Function shading is illustrated in the example @code{@uref{https://asymptote.sourceforge.io/gallery/functionshading.pdf,,functionshading}@uref{https://asymptote.sourceforge.io/gallery/functionshading.asy,,.asy}}.
+Function shading is illustrated in the example @code{@uref{https://asymptote.sourceforge.io/gallery/PDFs/functionshading.pdf,,functionshading}@uref{https://asymptote.sourceforge.io/gallery/PDFs/functionshading.asy,,.asy}}.
@cindex unfill
The following routine uses @code{evenodd} clipping together with the
@@ -6849,7 +6849,7 @@ void annotate(picture pic=currentpicture, string title, string text,
pair position);
@end verbatim
@noindent
-Annotations are illustrated in the example file @code{@uref{https://asymptote.sourceforge.io/gallery/annotation.pdf,,annotation}@uref{https://asymptote.sourceforge.io/gallery/annotation.asy,,.asy}}.
+Annotations are illustrated in the example file @code{@uref{https://asymptote.sourceforge.io/gallery/PDFs/annotation.pdf,,annotation}@uref{https://asymptote.sourceforge.io/gallery/PDFs/annotation.asy,,.asy}}.
Currently, annotations are only implemented for the @code{latex}
(default) and @code{tex} @TeX{} engines.
@@ -7728,14 +7728,17 @@ a function @code{f}(@math{x},@math{y}) and added to a picture @code{pic}:
@verbatim
bounds image(picture pic=currentpicture, real f(real, real),
range range=Full, pair initial, pair final,
- int nx=ngraph, int ny=nx, pen[] palette, bool antialias=false)
+ int nx=ngraph, int ny=nx, pen[] palette, int divs=0,
+ bool antialias=false)
@end verbatim
The function @code{f} will be sampled at @code{nx} and @code{ny}
evenly spaced points over a rectangle defined by the points
@code{initial} and @code{final}, respecting the current graphical
scaling of @code{pic}. The color space is scaled according to the
-@math{z} axis scaling (@pxref{automatic scaling}). A bounds structure
+@math{z} axis scaling (@pxref{automatic scaling}). If @math{@code{divs} > 1},
+the palette is quantized to @math{@code{divs}-1} values. A @code{bounds} structure
for the function values is returned:
+@cindex @code{bounds}
@verbatim
struct bounds {
real min;
@@ -7752,15 +7755,19 @@ or an explicit range @code{Range(real min, real max)}.
Here @code{Full} specifies a range varying from the
minimum to maximum values of the function over the sampling interval,
while @code{Automatic} selects "nice" limits.
-The example @code{@uref{https://asymptote.sourceforge.io/gallery/2Dgraphs/imagecontour.svg,,imagecontour}@uref{https://asymptote.sourceforge.io/gallery/2Dgraphs/imagecontour.asy,,.asy}} illustrates how level sets
-(contour lines) can be drawn on a color density plot (@pxref{contour}).
+The examples
+@code{@uref{https://asymptote.sourceforge.io/gallery/2Dgraphs/fillcontour.svg,,fillcontour}@uref{https://asymptote.sourceforge.io/gallery/2Dgraphs/fillcontour.asy,,.asy}}
+and
+@code{@uref{https://asymptote.sourceforge.io/gallery/2Dgraphs/imagecontour.svg,,imagecontour}@uref{https://asymptote.sourceforge.io/gallery/2Dgraphs/imagecontour.asy,,.asy}}
+illustrate how level sets (contour lines) can be drawn on a color
+density plot (@pxref{contour}).
A color density plot can also be generated from an explicit real[][]
array @code{data}:
@cindex @code{image}
@verbatim
bounds image(picture pic=currentpicture, real[][] f, range range=Full,
- pair initial, pair final, pen[] palette,
+ pair initial, pair final, pen[] palette, int divs=0,
bool transpose=(initial.x < final.x && initial.y < final.y),
bool copy=true, bool antialias=false);
@end verbatim
@@ -8175,7 +8182,7 @@ output with the the command-line option and @code{-f html}
3D @acronym{HTML} file can then be viewed directly in any modern desktop or
mobile browser, or even embedded within another web page:
@verbatim
-<iframe src="logo3.html" width="210" height="140" frameborder="0">
+<iframe src="logo3.html" width="561" height="321" frameborder="0">
</iframe>
@end verbatim
@@ -9299,8 +9306,12 @@ pen for negative contours and a solid pen for positive (and zero) contours:
@sp 1
@center @image{./multicontour}
-The next example illustrates how contour lines can be drawn on color
-density images:
+The next examples illustrates how contour lines can be drawn on color
+density images, with and without palette quantization:
+@verbatiminclude fillcontour.asy
+@sp 1
+@center @image{./fillcontour}
+
@verbatiminclude imagecontour.asy
@sp 1
@center @image{./imagecontour}
@@ -9323,7 +9334,7 @@ int[][] triangulate(pair[] z);
@sp 1
@center @image{./triangulate}
-The example @code{@uref{https://asymptote.sourceforge.io/gallery/2Dgraphs/Gouraudcontour.pdf,,Gouraudcontour}@uref{https://asymptote.sourceforge.io/gallery/2Dgraphs/Gouraudcontour.asy,,.asy}} illustrates how to produce color
+The example @code{@uref{https://asymptote.sourceforge.io/gallery/PDFs/Gouraudcontour.pdf,,Gouraudcontour}@uref{https://asymptote.sourceforge.io/gallery/PDFs/Gouraudcontour.asy,,.asy}} illustrates how to produce color
density images over such irregular triangular meshes.
@code{Asymptote} uses a robust version of Paul Bourke's Delaunay triangulation
algorithm based on the public-domain exact arithmetic predicates written by
diff --git a/graphics/asymptote/doc/fillcontour.asy b/graphics/asymptote/doc/fillcontour.asy
new file mode 100644
index 0000000000..b92b65ef46
--- /dev/null
+++ b/graphics/asymptote/doc/fillcontour.asy
@@ -0,0 +1,41 @@
+import graph;
+import palette;
+import contour;
+
+size(10cm,10cm);
+
+pair a=(0,0);
+pair b=(2pi,2pi);
+
+real f(real x, real y) {return cos(x)*sin(y);}
+
+int N=200;
+int Divs=10;
+int divs=1;
+int n=Divs*divs;
+
+defaultpen(1bp);
+pen Tickpen=black;
+pen tickpen=gray+0.5*linewidth(currentpen);
+pen[] Palette=quantize(BWRainbow(),n);
+
+bounds range=image(f,Automatic,a,b,3N,Palette,n);
+
+real[] Cvals=uniform(range.min,range.max,Divs);
+draw(contour(f,a,b,Cvals,N,operator --),Tickpen+squarecap+beveljoin);
+
+// Major contours
+real[] Cvals=uniform(range.min,range.max,Divs);
+draw(contour(f,a,b,Cvals,N,operator --),Tickpen+squarecap+beveljoin);
+
+// Minor contours (if divs > 1)
+real[] cvals;
+for(int i=0; i < Cvals.length-1; ++i)
+ cvals.append(uniform(Cvals[i],Cvals[i+1],divs)[1:divs]);
+draw(contour(f,a,b,cvals,N,operator --),tickpen);
+
+xaxis("$x$",BottomTop,LeftTicks,above=true);
+yaxis("$y$",LeftRight,RightTicks,above=true);
+
+palette("$f(x,y)$",range,point(SE)+(0.5,0),point(NE)+(1,0),Right,Palette,
+ PaletteTicks("$%+#0.1f$",N=Divs,n=divs,Tickpen,tickpen));
diff --git a/graphics/asymptote/doc/imagecontour.asy b/graphics/asymptote/doc/imagecontour.asy
index d61b6148c5..18c4cb772c 100644
--- a/graphics/asymptote/doc/imagecontour.asy
+++ b/graphics/asymptote/doc/imagecontour.asy
@@ -2,7 +2,7 @@ import graph;
import palette;
import contour;
-size(10cm,10cm,IgnoreAspect);
+size(10cm,10cm);
pair a=(0,0);
pair b=(2pi,2pi);
@@ -11,7 +11,7 @@ real f(real x, real y) {return cos(x)*sin(y);}
int N=200;
int Divs=10;
-int divs=2;
+int divs=1;
defaultpen(1bp);
pen Tickpen=black;
@@ -21,18 +21,17 @@ pen[] Palette=BWRainbow();
bounds range=image(f,Automatic,a,b,N,Palette);
// Major contours
-
real[] Cvals=uniform(range.min,range.max,Divs);
-draw(contour(f,a,b,Cvals,N,operator --),Tickpen);
+draw(contour(f,a,b,Cvals,N,operator --),Tickpen+squarecap+beveljoin);
-// Minor contours
+// Minor contours (if divs > 1)
real[] cvals;
for(int i=0; i < Cvals.length-1; ++i)
cvals.append(uniform(Cvals[i],Cvals[i+1],divs)[1:divs]);
-draw(contour(f,a,b,cvals,N,operator --),tickpen);
+draw(contour(f,a,b,cvals,N,operator --),tickpen+squarecap+beveljoin);
xaxis("$x$",BottomTop,LeftTicks,above=true);
yaxis("$y$",LeftRight,RightTicks,above=true);
-palette("$f(x,y)$",range,point(NW)+(0,0.5),point(NE)+(0,1),Top,Palette,
- PaletteTicks(N=Divs,n=divs,Tickpen,tickpen));
+palette("$f(x,y)$",range,point(SE)+(0.5,0),point(NE)+(1,0),Right,Palette,
+ PaletteTicks("$%+#0.1f$",N=Divs,n=divs,Tickpen,tickpen));
diff --git a/graphics/asymptote/doc/png/asymptote.info b/graphics/asymptote/doc/png/asymptote.info
index c29e943982..5c363d9e89 100644
--- a/graphics/asymptote/doc/png/asymptote.info
+++ b/graphics/asymptote/doc/png/asymptote.info
@@ -1,7 +1,7 @@
This is asymptote.info, produced by makeinfo version 6.7 from
asymptote.texi.
-This file documents 'Asymptote', version 2.73.
+This file documents 'Asymptote', version 2.74.
<https://asymptote.sourceforge.io>
@@ -22,7 +22,7 @@ File: asymptote.info, Node: Top, Next: Description, Prev: (dir), Up: (dir)
Asymptote
*********
-This file documents 'Asymptote', version 2.73.
+This file documents 'Asymptote', version 2.74.
<https://asymptote.sourceforge.io>
@@ -6646,12 +6646,14 @@ these palettes to the CMYK colorspace.
function 'f'(x,y) and added to a picture 'pic':
bounds image(picture pic=currentpicture, real f(real, real),
range range=Full, pair initial, pair final,
- int nx=ngraph, int ny=nx, pen[] palette, bool antialias=false)
+ int nx=ngraph, int ny=nx, pen[] palette, int divs=0,
+ bool antialias=false)
The function 'f' will be sampled at 'nx' and 'ny' evenly spaced
points over a rectangle defined by the points 'initial' and 'final',
respecting the current graphical scaling of 'pic'. The color space is
-scaled according to the z axis scaling (*note automatic scaling::). A
-bounds structure for the function values is returned:
+scaled according to the z axis scaling (*note automatic scaling::). If
+'divs' > 1, the palette is quantized to 'divs'-1 values. A 'bounds'
+structure for the function values is returned:
struct bounds {
real min;
real max;
@@ -6663,14 +6665,15 @@ The palette color space corresponds to a range of values specified by
the argument 'range', which can be 'Full', 'Automatic', or an explicit
range 'Range(real min, real max)'. Here 'Full' specifies a range
varying from the minimum to maximum values of the function over the
-sampling interval, while 'Automatic' selects "nice" limits. The example
-'imagecontour.asy' illustrates how level sets (contour lines) can be
-drawn on a color density plot (*note contour::).
+sampling interval, while 'Automatic' selects "nice" limits. The
+examples 'fillcontour.asy' and 'imagecontour.asy' illustrate how level
+sets (contour lines) can be drawn on a color density plot (*note
+contour::).
A color density plot can also be generated from an explicit real[][]
array 'data':
bounds image(picture pic=currentpicture, real[][] f, range range=Full,
- pair initial, pair final, pen[] palette,
+ pair initial, pair final, pen[] palette, int divs=0,
bool transpose=(initial.x < final.x && initial.y < final.y),
bool copy=true, bool antialias=false);
If the initial point is to the left and below the final point, by
@@ -7058,7 +7061,7 @@ There are six choices for viewing 3D 'Asymptote' output:
'outformat="html"'). The resulting 3D HTML file can then be viewed
directly in any modern desktop or mobile browser, or even embedded
within another web page:
- <iframe src="logo3.html" width="210" height="140" frameborder="0">
+ <iframe src="logo3.html" width="561" height="321" frameborder="0">
</iframe>
Normally, 'WebGL' files generated by 'Asymptote' are dynamically
@@ -7999,13 +8002,57 @@ draw(Labels,contour(f,(-1,-1),(1,1),c),p);
[./multicontour]
- The next example illustrates how contour lines can be drawn on color
-density images:
+ The next examples illustrates how contour lines can be drawn on color
+density images, with and without palette quantization:
import graph;
import palette;
import contour;
-size(10cm,10cm,IgnoreAspect);
+size(10cm,10cm);
+
+pair a=(0,0);
+pair b=(2pi,2pi);
+
+real f(real x, real y) {return cos(x)*sin(y);}
+
+int N=200;
+int Divs=10;
+int divs=1;
+int n=Divs*divs;
+
+defaultpen(1bp);
+pen Tickpen=black;
+pen tickpen=gray+0.5*linewidth(currentpen);
+pen[] Palette=quantize(BWRainbow(),n);
+
+bounds range=image(f,Automatic,a,b,3N,Palette,n);
+
+real[] Cvals=uniform(range.min,range.max,Divs);
+draw(contour(f,a,b,Cvals,N,operator --),Tickpen+squarecap+beveljoin);
+
+// Major contours
+real[] Cvals=uniform(range.min,range.max,Divs);
+draw(contour(f,a,b,Cvals,N,operator --),Tickpen+squarecap+beveljoin);
+
+// Minor contours (if divs > 1)
+real[] cvals;
+for(int i=0; i < Cvals.length-1; ++i)
+ cvals.append(uniform(Cvals[i],Cvals[i+1],divs)[1:divs]);
+draw(contour(f,a,b,cvals,N,operator --),tickpen);
+
+xaxis("$x$",BottomTop,LeftTicks,above=true);
+yaxis("$y$",LeftRight,RightTicks,above=true);
+
+palette("$f(x,y)$",range,point(SE)+(0.5,0),point(NE)+(1,0),Right,Palette,
+ PaletteTicks("$%+#0.1f$",N=Divs,n=divs,Tickpen,tickpen));
+
+ [./fillcontour]
+
+import graph;
+import palette;
+import contour;
+
+size(10cm,10cm);
pair a=(0,0);
pair b=(2pi,2pi);
@@ -8014,7 +8061,7 @@ real f(real x, real y) {return cos(x)*sin(y);}
int N=200;
int Divs=10;
-int divs=2;
+int divs=1;
defaultpen(1bp);
pen Tickpen=black;
@@ -8024,21 +8071,20 @@ pen[] Palette=BWRainbow();
bounds range=image(f,Automatic,a,b,N,Palette);
// Major contours
-
real[] Cvals=uniform(range.min,range.max,Divs);
-draw(contour(f,a,b,Cvals,N,operator --),Tickpen);
+draw(contour(f,a,b,Cvals,N,operator --),Tickpen+squarecap+beveljoin);
-// Minor contours
+// Minor contours (if divs > 1)
real[] cvals;
for(int i=0; i < Cvals.length-1; ++i)
cvals.append(uniform(Cvals[i],Cvals[i+1],divs)[1:divs]);
-draw(contour(f,a,b,cvals,N,operator --),tickpen);
+draw(contour(f,a,b,cvals,N,operator --),tickpen+squarecap+beveljoin);
xaxis("$x$",BottomTop,LeftTicks,above=true);
yaxis("$y$",LeftRight,RightTicks,above=true);
-palette("$f(x,y)$",range,point(NW)+(0,0.5),point(NE)+(0,1),Top,Palette,
- PaletteTicks(N=Divs,n=divs,Tickpen,tickpen));
+palette("$f(x,y)$",range,point(SE)+(0.5,0),point(NE)+(1,0),Right,Palette,
+ PaletteTicks("$%+#0.1f$",N=Divs,n=divs,Tickpen,tickpen));
[./imagecontour]
@@ -9114,6 +9160,7 @@ Index
* BottomView: three. (line 439)
* bounding box: Frames and pictures.
(line 180)
+* bounds: palette. (line 43)
* Bounds: graph3. (line 21)
* box: Frames and pictures.
(line 25)
@@ -9557,7 +9604,7 @@ Index
* IgnoreAspect: Frames and pictures.
(line 63)
* image: palette. (line 33)
-* image <1>: palette. (line 58)
+* image <1>: palette. (line 61)
* image-based lighting: three. (line 104)
* ImageMagick: Configuring. (line 74)
* ImageMagick <1>: animation. (line 6)
@@ -10300,7 +10347,7 @@ Index
* trembling: trembling. (line 6)
* triangle: geometry. (line 6)
* triangles: three. (line 154)
-* triangulate: contour. (line 149)
+* triangulate: contour. (line 192)
* tridiagonal: Arrays. (line 278)
* trigonometric integrals: Mathematical functions.
(line 48)
@@ -10568,41 +10615,41 @@ Ref: errorbars245871
Ref: automatic scaling251000
Node: palette262710
Ref: images262828
-Ref: image267002
-Ref: logimage267523
-Ref: penimage268629
-Ref: penfunctionimage268892
-Node: three269664
-Ref: PostScript3D299799
-Node: obj301537
-Node: graph3301786
-Ref: GaussianSurface307068
-Node: grid3308218
-Node: solids309003
-Node: tube309995
-Node: flowchart312225
-Node: contour316868
-Node: contour3322183
-Node: smoothcontour3322495
-Node: slopefield324214
-Node: ode325703
-Node: Options325960
-Ref: configuration file333448
-Ref: settings333448
-Ref: texengines334712
-Ref: convert334712
-Node: Interactive mode338155
-Ref: history340304
-Node: GUI341607
-Node: GUI installation342157
-Node: GUI usage342890
-Node: Command-Line Interface343953
-Node: Language server protocol345395
-Node: PostScript to Asymptote346820
-Node: Help347598
-Node: Debugger349272
-Node: Credits351028
-Node: Index352205
+Ref: image267124
+Ref: logimage267645
+Ref: penimage268751
+Ref: penfunctionimage269014
+Node: three269786
+Ref: PostScript3D299921
+Node: obj301659
+Node: graph3301908
+Ref: GaussianSurface307190
+Node: grid3308340
+Node: solids309125
+Node: tube310117
+Node: flowchart312347
+Node: contour316990
+Node: contour3323498
+Node: smoothcontour3323810
+Node: slopefield325529
+Node: ode327018
+Node: Options327275
+Ref: configuration file334763
+Ref: settings334763
+Ref: texengines336027
+Ref: convert336027
+Node: Interactive mode339470
+Ref: history341619
+Node: GUI342922
+Node: GUI installation343472
+Node: GUI usage344205
+Node: Command-Line Interface345268
+Node: Language server protocol346710
+Node: PostScript to Asymptote348135
+Node: Help348913
+Node: Debugger350587
+Node: Credits352343
+Node: Index353520

End Tag Table