diff --git a/books/bookvol10.4.pamphlet b/books/bookvol10.4.pamphlet index 4d10c5c..2808767 100644 --- a/books/bookvol10.4.pamphlet +++ b/books/bookvol10.4.pamphlet @@ -37299,6 +37299,140 @@ GenusZeroIntegration(R, F, L): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package GDRAW GnuDraw} +<>= +)set break resume +)sys rm -f GnuDraw.output +)spool GnuDraw.output +)set message test on +)set message auto off +)clear all +--S 1 of 1 +)show GnuDraw +--R GnuDraw is a package constructor +--R Abbreviation for GnuDraw is GDRAW +--R This constructor is exposed in this frame. +--R Issue )edit bookvol10.4.pamphlet to see algebra source code for GDRAW +--R +--R------------------------------- Operations -------------------------------- +--R gnuDraw : (Expression Float,SegmentBinding Float,String,List DrawOption) -> Void +--R gnuDraw : (Expression Float,SegmentBinding Float,String) -> Void +--R gnuDraw : (Expression Float,SegmentBinding Float,SegmentBinding Float,String,List DrawOption) -> Void +--R gnuDraw : (Expression Float,SegmentBinding Float,SegmentBinding Float,String) -> Void +--R +--E 1 + +)spool +)lisp (bye) +@ +<>= +==================================================================== +GnuDraw examples +==================================================================== + +See Also: +o )show GnuDraw + +@ +\pagehead{GnuDraw}{GDRAW} +\pagepic{ps/v104gnudraw.ps}{GDRAW}{1.00} + +{\bf Exports:}\\ +\cross{GDRAW}{GospersMethod} + +<>= +)abbrev package GDRAW GnuDraw +++ Author: Bill Page and David Cyganski +++ Date: June 25, 2008 +++ Description: +++ This package provides support for gnuplot. These routines +++ generate output files contain gnuplot scripts that may be +++ processed directly by gnuplot. This is especially convenient +++ in the axiom-wiki environment where gnuplot is called from +++ LaTeX via gnuplottex. +GnuDraw(): Exports == Implementation where + + EF ==> Expression Float + SBF ==> SegmentBinding Float + DROP ==> DrawOption + DROP0 ==> DrawOptionFunctions0 + STR ==> String + + Exports ==> with + + gnuDraw:(EF, SBF, STR, List DROP)->Void + ++ \spad{gnuDraw} provides 2d plotting with options + ++ + ++X gnuDraw(D(cos(exp(z))/exp(z^2),z),z=-5..5,"out2d.dat",title=="out2d") + ++X )sys gnuplot -persist out2d.dat + + gnuDraw:(EF, SBF, STR)->Void + ++ \spad{gnuDraw} provides 2d plotting, default options + ++ + ++X gnuDraw(D(cos(exp(z))/exp(z^2),z),z=-5..5,"out2d.dat") + ++X )sys gnuplot -persist out2d.dat + + gnuDraw:(EF, SBF, SBF, STR, List DROP)->Void + ++ \spad{gnuDraw} provides 3d surface plotting with options + ++ + ++X gnuDraw(sin(x)*cos(y),x=-6..4,y=-4..6,"out3d.dat",title=="out3d") + ++X )sys gnuplot -persist out3d.dat + + gnuDraw:(EF, SBF, SBF, STR)->Void + ++ \spad{gnuDraw} provides 3d surface plotting, default options + ++ + ++X gnuDraw(sin(x)*cos(y),x=-6..4,y=-4..6,"out3d.dat") + ++X )sys gnuplot -persist out3d.dat + + Implementation ==> add + -- 2-d plotting + gnuDraw(f:EF,segbind:SBF,filename:STR,opts:List DROP):Void == + import TwoDimensionalViewport, GraphImage, TopLevelDrawFunctions EF + f1:TextFile:=open(filename::FileName,"output") + -- handle optional parameters + writeLine!(f1,concat(["set title _"",title(opts,"")$DROP0,"_""])) + writeLine!(f1,"plot '-' title '' lw 3 with lines") + -- extract data as List List Point DoubleFloat + p2:=pointLists(getGraph(draw(f, segbind),1)); + for p1 in p2 repeat + for p in p1 repeat + writeLine!(f1,concat([unparse(convert(p.1)@InputForm)," ", + unparse(convert(p.2)@InputForm)])) + writeLine!(f1); -- blank line need to mark a "branch" + close! f1 + + -- default title is "" + gnuDraw(f:EF,segbind:SBF,filename:STR):Void == + gnuDraw(f,segbind,filename,[title("")$DROP]) + + -- 3-d plotting + gnuDraw(f:EF,segbind1:SBF,segbind2:SBF,filename:STR,opts:List DROP):Void == + import SubSpace, ThreeSpace DoubleFloat, TopLevelDrawFunctions EF + f1:TextFile:=open(filename::FileName,"output") + -- process optional parameters + writeLine!(f1,concat(["set title _"",title(opts,"")$DROP0,"_""])) + writeLine!(f1,"splot '-' title '' with pm3d") + -- extract data as List List Point DoubleFloat + p2:=mesh(subspace(draw(f, segbind1, segbind2))); + for p1 in p2 repeat + for p in p1 repeat + writeLine!(f1,concat([unparse(convert(p.1)@InputForm)," ", + unparse(convert(p.2)@InputForm)," ", + unparse(convert(p.3)@InputForm)])) + writeLine!(f1); -- blank line need to mark a "branch" + close! f1 + + -- default title is "" + gnuDraw(f:EF,segbind1:SBF, segbind2:SBF, filename:STR):Void == + gnuDraw(f,segbind1,segbind2,filename,[title("")$DROP]) +@ +<>= +"GDRAW" [color="#FF4488",href="bookvol10.4.pdf#nameddest=GDRAW"] +"FS" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FS"] +"GDRAW" -> "FS" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package GOSPER GosperSummationMethod} \pagehead{GosperSummationMethod}{GOSPER} \pagepic{ps/v104gospersummationmethod.ps}{GOSPER}{1.00} diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index f42ecd4..7bca3a7 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -23965,6 +23965,7 @@ otherwise the new algebra won't be loaded by the interpreter when needed. (|GeneralPackageForAlgebraicFunctionField| . GPAFF) (|GeneralUnivariatePowerSeries| . GSERIES) (|GenerateUnivariatePowerSeries| . GENUPS) + (|GnuDraw| . GDRAW) (|GraphicsDefaults| . GRDEF) (|GroebnerPackage| . GB) (|GroebnerFactorizationPackage| . GBF) diff --git a/books/ps/v104gnudraw.ps b/books/ps/v104gnudraw.ps new file mode 100644 index 0000000..0e9317f --- /dev/null +++ b/books/ps/v104gnudraw.ps @@ -0,0 +1,266 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: Graphviz version 2.20.2 (Mon Mar 30 10:09:11 UTC 2009) +%%For: (root) root +%%Title: pic +%%Pages: 1 +%%BoundingBox: 36 36 116 152 +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 116 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 80 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +% GDRAW +gsave +[ /Rect [ 0 72 72 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=GDRAW) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 72 108 moveto +0 108 lineto +0 72 lineto +72 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 72 108 moveto +0 108 lineto +0 72 lineto +72 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14 /Times-Roman set_font +8 85.9 moveto 56 (GDRAW) alignedtext +grestore +% FS +gsave +[ /Rect [ 9 0 63 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=FS) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 63 36 moveto +9 36 lineto +9 0 lineto +63 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 63 36 moveto +9 36 lineto +9 0 lineto +63 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14 /Times-Roman set_font +27.5 13.9 moveto 17 (FS) alignedtext +grestore +% GDRAW->FS +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 36 72 moveto +36 64 36 55 36 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 39.5 46 moveto +36 36 lineto +32.5 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 39.5 46 moveto +36 36 lineto +32.5 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +end +restore +%%EOF diff --git a/changelog b/changelog index fc9f753..cf3b82d 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,8 @@ +20100604 tpd src/axiom-website/patches.html 20100604.08.tpd.patch +20100604 tpd src/algebra/Makefile help and test for GnuDraw +20100604 tpd books/bookvol5 expose GnuDraw package +20100604 tpd books/bookvol10.4 add GnuDraw package +20100604 tpd books/ps/v104gnudraw.ps image for GnuDraw 20100604 tpd src/axiom-website/patches.html 20100604.07.tpd.patch 20100604 tpd books/bookvol10.5 use simple-array, not simple-vector type 20100604 tpd src/axiom-website/patches.html 20100604.06.tpd.patch diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet index 6457c41..af0a39c 100644 --- a/src/algebra/Makefile.pamphlet +++ b/src/algebra/Makefile.pamphlet @@ -12335,6 +12335,7 @@ LAYER17=\ ${OUT}/FLOATCP.o ${OUT}/FORDER.o ${OUT}/FORTRAN.o ${OUT}/FRNAAF2.o \ ${OUT}/FSPRMELT.o ${OUT}/FSRED.o ${OUT}/FSUPFACT.o ${OUT}/FSPECF.o \ ${OUT}/FS2.o ${OUT}/FS2UPS.o ${OUT}/GAUSSFAC.o ${OUT}/GCNAALG.o \ + ${OUT}/GDRAW.o \ ${OUT}/GENUFACT.o ${OUT}/GENUPS.o ${OUT}/GTSET.o ${OUT}/GPOLSET.o \ ${OUT}/IAN.o ${OUT}/INEP.o ${OUT}/INFPROD0.o ${OUT}/INFSP.o \ ${OUT}/INPRODFF.o ${OUT}/INPRODPF.o ${OUT}/INTAF.o ${OUT}/INTALG.o \ @@ -13557,6 +13558,21 @@ LAYER17=\ /*"GCNAALG" -> {"ORDSET-"; "AGG-"; "ELTAGG-"; "SETCAT-"; "BASTYPE-"}*/ /*"GCNAALG" -> "BOOLEAN"*/ +"GDRAW" [color="#FF4488",href="bookvol10.4.pdf#nameddest=GDRAW"] +"GDRAW" -> "FS" +/*"GDRAW" -> {"STRING"; "CHAR"; "SINT"; "OUTFORM"; "LIST"; "INT"; "PRIMARR"}*/ +/*"GDRAW" -> {"A1AGG-"; "ISTRING"; "FPS"; "RNS"; "FIELD"; "EUCDOM"; "PID"}*/ +/*"GDRAW" -> {"GCDDOM"; "INTDOM"; "COMRING"; "RING"; "RNG"; "ABELGRP"}*/ +/*"GDRAW" -> {"CABMON"; "ABELMON"; "ABELSG"; "SETCAT"; "BASTYPE"; "KOERCE"}*/ +/*"GDRAW" -> {"SGROUP"; "MONOID"; "LMODULE"; "BMODULE"; "RMODULE"}*/ +/*"GDRAW" -> {"ALGEBRA"; "MODULE"; "ENTIRER"; "UFD"; "DIVRING"; "ORDRING"}*/ +/*"GDRAW" -> {"OAGROUP"; "OCAMON"; "OAMON"; "OASGP"; "ORDSET"; "REAL"}*/ +/*"GDRAW" -> {"KONVERT"; "RETRACT"; "RADCAT"; "PATMAB"; "CHARZ"; "ES"}*/ +/*"GDRAW" -> {"IEVALAB"; "EVALAB"; "PATAB"; "FPATMAB"; "TYPE"; "FRETRCT"}*/ +/*"GDRAW" -> {"GROUP"; "PDRING"; "FLINEXP"; "LINEXP"; "CHARNZ"; "PI"; "NNI"}*/ +/*"GDRAW" -> {"DIFRING"; "OM"; "TRANFUN"; "TRIGCAT"; "ATRIG"; "HYPCAT"}*/ +/*"GDRAW" -> {"AHYP"; "ELEMFUN"; "DFLOAT"}*/ + "GENUFACT" [color="#FF4488",href="bookvol10.4.pdf#nameddest=GENUFACT"] /*"GENUFACT" -> {"EUCDOM"; "PID"; "GCDDOM"; "INTDOM"; "COMRING"; "RING"}*/ /*"GENUFACT" -> {"RNG"; "ABELGRP"; "CABMON"; "ABELMON"; "ABELSG"; "SETCAT"}*/ @@ -18301,6 +18317,7 @@ SPADHELP=\ ${HELP}/GeneralPolynomialSet.help \ ${HELP}/GeneralTriangularSet.help \ ${HELP}/GeneralUnivariatePowerSeries.help \ + ${HELP}/GnuDraw.help \ ${HELP}/GradedAlgebra.help \ ${HELP}/GradedModule.help \ ${HELP}/GraphImage.help \ @@ -18986,6 +19003,7 @@ REGRESS= \ GeneralPolynomialSet.regress \ GeneralTriangularSet.regress \ GeneralUnivariatePowerSeries.regress \ + GnuDraw.regress \ GradedAlgebra.regress \ GradedModule.regress \ GraphImage.regress \ @@ -22443,6 +22461,18 @@ ${HELP}/GeneralUnivariatePowerSeries.help: ${BOOKS}/bookvol10.3.pamphlet >${INPUT}/GeneralUnivariatePowerSeries.input @echo "GeneralUnivariatePowerSeries (GSERIES)" >>${HELPFILE} +${HELP}/GnuDraw.help: ${BOOKS}/bookvol10.4.pamphlet + @echo 5000 create GnuDraw.help from \ + ${BOOKS}/bookvol10.4.pamphlet + @${TANGLE} -R"GnuDraw.help" \ + ${BOOKS}/bookvol10.4.pamphlet \ + >${HELP}/GnuDraw.help + @cp ${HELP}/GnuDraw.help ${HELP}/GDRAW.help + @${TANGLE} -R"GnuDraw.input" \ + ${BOOKS}/bookvol10.4.pamphlet \ + >${INPUT}/GnuDraw.input + @echo "GnuDraw (GDRAW)" >>${HELPFILE} + ${HELP}/GradedAlgebra.help: ${BOOKS}/bookvol10.2.pamphlet @echo 5000 create GradedAlgebra.help from \ ${BOOKS}/bookvol10.2.pamphlet diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index fc884a4..a6697bc 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -2848,5 +2848,7 @@ books/bookvol5 add Albert D. Rich to credits
src/input/richalgebraic100-199.input rule-based algebraic integration
20100605.07.tpd.patch books/bookvol10.5 use simple-array, not simple-vector type
+20100605.08.tpd.patch +books/bookvol10.4 add GnuDraw package