@c ---content LibInfo---
@comment This file was generated by doc2tex.pl from d2t_singular/graphics_lib.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT d2t_singular/graphics_lib.doc INSTEAD
@c library version: (1.10,2001/02/19)
@c library file: ../Singular/LIB/graphics.lib
@cindex graphics.lib
@cindex graphics_lib
@table @asis
@item @strong{Library:}
graphics.lib
@item @strong{Purpose:}
    Procedures to use Graphics with Mathematica
@item @strong{Author:}
Christian Gorzel, gorzelc@@math.uni-muenster.de

@end table

@strong{Procedures:}
@menu
* staircase:: Mathematica text for displaying staircase of I
* mathinit:: string for loading Mathematica's ImplicitPlot
* mplot:: Mathematica text for various plots
@end menu
@c ---end content LibInfo---

@c ------------------- staircase -------------
@node staircase, mathinit,, graphics_lib
@subsubsection staircase
@cindex staircase
@c ---content staircase---
Procedure from library @code{graphics.lib} (@pxref{graphics_lib}).

@table @asis
@item @strong{Usage:}
staircase(s,I); s a string, I ideal in two variables

@item @strong{Return:}
string with Mathematica input for displaying staircase diagrams of an
ideal I, i.e. exponent vectors of the initial ideal of I

@item @strong{Note:}
ideal I should be given by a standard basis. Let s="" and copy and
paste the result into a Mathematica notebook.

@end table
@strong{Example:}
@smallexample
@c skipped computation of example staircase d2t_singular/graphics_lib.doc:46 
LIB "graphics.lib";
ring r0 = 0,(x,y),ls;
ideal I = -1x2y6-1x4y2, 7x6y5+1/2x7y4+6x4y6;
staircase("",std(I));
ring r1 = 0,(x,y),dp;
ideal I = fetch(r0,I);
staircase("",std(I));
ring r2 = 0,(x,y),wp(2,3);
ideal I = fetch(r0,I);
staircase("",std(I));
// Paste the output into a Mathematica notebook
// active evalutation of the cell with SHIFT RETURN
@end smallexample
@c ---end content staircase---

@c ------------------- mathinit -------------
@node mathinit, mplot, staircase, graphics_lib
@subsubsection mathinit
@cindex mathinit
@c ---content mathinit---
Procedure from library @code{graphics.lib} (@pxref{graphics_lib}).

@table @asis
@item @strong{Usage:}
mathinit();

@item @strong{Return:}
initializing string for loading Mathematica's ImplicitPlot

@end table
@strong{Example:}
@smallexample
@c skipped computation of example mathinit d2t_singular/graphics_lib.doc:80 
LIB "graphics.lib";
mathinit();
// Paste the output into a Mathematica notebook
// active evalutation of the cell with SHIFT RETURN
@end smallexample
@c ---end content mathinit---

@c ------------------- mplot -------------
@node mplot,, mathinit, graphics_lib
@subsubsection mplot
@cindex mplot
@c ---content mplot---
Procedure from library @code{graphics.lib} (@pxref{graphics_lib}).

@table @asis
@item @strong{Usage:}
mplot(fname, I [,I1,I2,..,s] ); fname=string; I,I1,I2,..=ideals,
s=string representing the plot region.@*
Use the ideals I1,I2,.. in order to produce multiple plots (they need
to have the same number of entries as I!).

@item @strong{Return:}
string, text with Mathematica commands to display a plot

@item @strong{Note:}
The plotregion is defaulted to -1,1 around zero.
@*For implicit given curves enter first the string returned by
proc mathinit into Mathematica in order to load ImplicitPlot.
The following conventions for I are used:
  @format
  - ideal with 2 entries in one variable means a parametrised plane curve,
  - ideal with 3 entries in one variable means a parametrised space curve,
  - ideal with 3 entries in two variables means a parametrised surface,
  - ideal with 2 entries in two variables means an implicit curve
    given as I[1]==I[2],
  - ideal with 1 entry (or one polynomial) in two variables means
    an implicit curve given as  f == 0,
  @end format

@end table
@strong{Example:}
@smallexample
@c skipped computation of example mplot d2t_singular/graphics_lib.doc:124 
LIB "graphics.lib";
// ---------  plane curves ------------
ring rr0 = 0,x,dp; export rr0;
ideal I = x3 + x, x2;
ideal J = x2, -x+x3;
mplot("",I,J,"-2,2");
// Paste the output into a Mathematica notebook
// active evalutation of the cell with SHIFT RETURN
// --------- space curves --------------
I = x3,-1/10x3+x2,x2;
mplot("",I);
// Paste the output into a Mathematica notebook
// active evalutation of the cell with SHIFT RETURN
// ----------- surfaces -------------------
ring rr1 = 0,(x,y),dp; export rr1;
ideal J = xy,y,x2;
mplot("",J,"-2,1","1,2");
// Paste the output into a Mathematica notebook
// active evalutation of the cell with SHIFT RETURN
kill rr0,rr1;
@end smallexample
@c ---end content mplot---
