summaryrefslogtreecommitdiff
path: root/graphics/asymptote/doc/png/asymptote.info
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/doc/png/asymptote.info')
-rw-r--r--graphics/asymptote/doc/png/asymptote.info161
1 files changed, 104 insertions, 57 deletions
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