This is Graphics.info, produced by Macaulay2, version 1.21

Graphics -- Graphics
********************

Description
===========

This package provides graphic primitives and functions to turn them into
pictures in different formats. The formats supported include svg and pgf/tikz.

Authors
=======

  * Baptiste Calmes (see http://bcalmes.perso.math.cnrs.fr/ )
  * Viktor Petrov

Version
=======

This documentation describes version 0.3 of Graphics.

Source code
===========

The source code from which this documentation is derived is in the file
Graphics.m2 (see common/share/Macaulay2/Graphics.m2 ).

Exports
=======

  * Types
      * Circle -- the class of a circle in a 2D space
      * FormattedGraphicPrimitives -- the
        class of lists of graphic primitives together with formatting options
      * GraphicPrimitive -- the class of all graphic
        primitives
      * Picture -- the class of pictures containing several
        FormattedGraphicPrimitives
      * Point2D -- the class of a point in a 2D space
      * Point3D -- the class of a point in a 3D space
      * Polygon2D -- the class of a polygon in a 2D space
      * Polygon3D -- the class of a polygon in a 3D space
      * Segment2D -- the class of a line segment in a 2D
        space
      * Segment3D -- the class of a line segment in a 3D
        space
      * Sphere -- the class of a sphere in a 3D space
      * TextTag -- the class of a text tag
  * Functions and commands
      * circle -- create a circle from a point and a radius
      * defaultSVGOpening -- the default SVG opening
      * formatGraphicPrimitives -- create a
        FormattedGraphicPrimitives object
      * mergeFormattedGraphicPrimitives,
        -- merge two lists of graphic primitives with options
      * pgfObject -- create a pgf object
      * pgfPicture -- create a pgf picture
      * picture -- create a Picture object
      * pictureZone -- find the zone in which a picture
        lies
      * point -- create a point
      * polygon -- create a polygon from a list of points
      * segment -- create a line segment
      * sphere -- create a sphere from a point and a radius
      * svgObject -- create an SVG object
      * svgPicture -- create an SVG picture
      * textTag -- create a text tag at a position
      * viewPicture -- view a picture in a browser
  * Methods
      * circle(Point2D,RR) -- a circle from a
        center and a radius
      * circle(Point2D,ZZ) -- a circle from a
        center and a radius
      * defaultSVGOpening(ZZ,ZZ), --
        default SVG opening for a picture of a given size
      * formatGraphicPrimitives(BasicList,HashTable)
        -- create a
        formatted graphic primitive object
      * mergeFormattedGraphicPrimitives(FormattedGraphicPrimitives, FormattedGraphicPrimitives)
        -- merge two lists of graphic
        primitives with options
      * pgfObject(Circle,HashTable),
        -- create the string describing a circle in pgf
      * pgfObject(FormattedGraphicPrimitives)
        -- create the string
        describing a series of graphic primitives in pgf
      * pgfObject(Picture) -- create the string
        describing a series of graphic primitives in pgf
      * pgfObject(Point2D,HashTable),
        -- create the string describing a point in pgf
      * pgfObject(Polygon2D,HashTable)
        -- create the string describing a
        circle in pgf
      * pgfObject(Segment2D,HashTable)
        -- create the string describing a
        line segment in pgf
      * pgfObject(TextTag,HashTable),
        -- create the string describing a circle in pgf
      * pgfPicture(Picture) -- create a pgf
        picture from a Picture object
      * pgfPicture(Picture,HashTable)
        -- create a pgf picture from a
        Picture object with some options
      * pgfPicture(Picture,HashTable,String)
        -- create a pgf picture
        from a Picture object with options and store it in a file
      * pgfPicture(Picture,String), --
        create a pgf picture from a Picture object and store it in a file
      * picture(BasicList) -- create a picture
        object
      * pictureZone(Circle) -- find the zone
        that contains the circle
      * pictureZone(FormattedGraphicPrimitives)
        -- find the zone that
        contains the whole list of graphic primitive
      * pictureZone(Picture) -- find the zone
        that contains the whole picture
      * pictureZone(Point2D) -- find the zone
        that contains the point
      * pictureZone(Point3D) -- find the zone
        that contains the point
      * pictureZone(Polygon2D) -- find the
        zone that contains the polygon
      * pictureZone(Polygon3D) -- find the
        zone that contains the polygon
      * pictureZone(Segment2D) -- find the
        zone that contains the line segment
      * pictureZone(Segment3D) -- find the
        zone that contains the line segment
      * pictureZone(Sphere) -- find the zone
        that contains the sphere
      * pictureZone(TextTag) -- find the zone
        that contains the tag
      * point(RR,RR) -- a point from two coordinates
      * point(RR,RR,RR) -- a point from three
        coordinates
      * point(ZZ,ZZ) -- a point from two coordinates
      * point(ZZ,ZZ,ZZ) -- a point from three
        coordinates
      * polygon(List) -- a polygon from a list of
        points
      * segment(Point2D,Point2D) -- a
        line segment from two points
      * segment(Point3D,Point3D) -- a
        line segment from two points
      * sphere(Point3D,RR) -- a sphere from a
        center and a radius
      * sphere(Point3D,ZZ) -- a sphere from a
        center and a radius
      * svgObject(Circle,HashTable),
        -- create the string describing a circle in SVG
      * svgObject(FormattedGraphicPrimitives)
        -- create a string
        describing in SVG a list of formatted graphic primitive object
      * svgObject(Picture) -- create a string
        describing the picture in SVG
      * svgObject(Point2D,HashTable),
        -- create the string describing a point in SVG
      * svgObject(Polygon2D,HashTable)
        -- create the string describing a
        circle in SVG
      * svgObject(Segment2D,HashTable)
        -- create the string describing a
        line segment in SVG
      * svgObject(TextTag,HashTable),
        -- create the string describing a circle in SVG
      * svgPicture(Picture) -- create an SVG
        picture from a Picture object
      * svgPicture(Picture,String), --
        create an SVG picture from a Picture object and store it in a file
      * svgPicture(Picture,ZZ,ZZ), --
        create an SVG picture from a Picture object
      * svgPicture(Picture,ZZ,ZZ,String)
        -- create an SVG picture
        from a Picture object and store it in a file
      * textTag(Point2D,String) -- a text
        tag at a position
      * textTag(Point3D,String) -- a text
        tag at a position
      * viewPicture(String) -- view a Picture
        in a browser
  * Other things
      * defaultPGFOptions -- the default pgf options
      * defaultPGFValues -- the default pgf values
      * defaultSVGClosing -- the default SVG closing
      * defaultSVGHeading -- the default SVG heading
      * defaultSVGOptions -- the default SVG options
      * defaultSVGValues -- the default SVG values of
        coordinates
      * possiblePGFOptions -- the possible pgf
        options
      * possibleSVGOptions -- the possible SVG
        options

For the programmer
==================

The object Graphics, is a package (Macaulay2Doc).

Circle -- the class of a circle in a 2D space
*********************************************

Methods that use an object of class Circle :
============================================

  * pgfObject(Circle,HashTable), --
    create the string describing a circle in pgf
  * pictureZone(Circle) -- find the zone that
    contains the circle
  * svgObject(Circle,HashTable), --
    create the string describing a circle in SVG

For the programmer
==================

The object Circle, is a type (Macaulay2Doc), with
ancestor classes GraphicPrimitive, < BasicList (Macaulay2Doc)
< Thing (Macaulay2Doc).

circle -- create a circle from a point and a radius
***************************************************

Ways to use circle :
====================

  * circle(Point2D,RR) -- a circle from a
    center and a radius
  * circle(Point2D,ZZ) -- a circle from a
    center and a radius

For the programmer
==================

The object circle, is a method function (Macaulay2Doc).

circle(Point2D,RR) -- a circle from a center and a radius
*********************************************************

Synopsis
========

  * Function: circle,
  * Usage:
        circle(p,r)
  * Inputs:
      * p, an instance of the type Point2D, the center of the
        circle
      * r, a real number (Macaulay2Doc), the radius of the circle
  * Outputs:
      * an instance of the type Circle, the circle with center p
        and radius r

Description
===========

+---------------------------------+
|i1 : circle(point(20.1, 30.),30.)|
|                                 |
|o1 = Circle{Point2D{20, 30}, 30} |
|                                 |
|o1 : Circle                      |
+---------------------------------+

Ways to use this method:
========================

  * circle(Point2D,RR) -- a circle from a
    center and a radius

circle(Point2D,ZZ) -- a circle from a center and a radius
*********************************************************

Synopsis
========

  * Function: circle,
  * Usage:
        circle(p,r)
  * Inputs:
      * p, an instance of the type Point2D, the center of the
        circle
      * r, an integer (Macaulay2Doc), the radius of the circle
  * Outputs:
      * an instance of the type Circle, the circle with center p
        and radius r

Description
===========

+--------------------------------+
|i1 : circle(point(20,30),10)    |
|                                |
|o1 = Circle{Point2D{20, 30}, 10}|
|                                |
|o1 : Circle                     |
+--------------------------------+

Ways to use this method:
========================

  * circle(Point2D,ZZ) -- a circle from a
    center and a radius

defaultPGFOptions -- the default pgf options
********************************************

Description
===========

It's a hash table containing the default pgf options for graphic primitives
that can be used to create a pgf picture.

For the programmer
==================

The object defaultPGFOptions, is a hash table (Macaulay2Doc).

defaultPGFValues -- the default pgf values
******************************************

Description
===========

It's a hash table containing the default pgf values for some graphic primitives
that are used to create a pgf picture.

For the programmer
==================

The object defaultPGFValues, is a hash table (Macaulay2Doc).

defaultSVGClosing -- the default SVG closing
********************************************

Description
===========

It's a string containing the default SVG closing </svg> used to create SVG
pictures.

For the programmer
==================

The object defaultSVGClosing, is a string (Macaulay2Doc).

defaultSVGHeading -- the default SVG heading
********************************************

Description
===========

It's a string containing the default SVG heading used to create SVG pictures.

For the programmer
==================

The object defaultSVGHeading, is a string (Macaulay2Doc).

defaultSVGOpening -- the default SVG opening
********************************************

Ways to use defaultSVGOpening :
===============================

  * defaultSVGOpening(ZZ,ZZ) -- default
    SVG opening for a picture of a given size

For the programmer
==================

The object defaultSVGOpening, is a method function (Macaulay2Doc).

defaultSVGOpening(ZZ,ZZ) -- default SVG opening for a picture of a given size
*****************************************************************************

Synopsis
========

  * Function: defaultSVGOpening,
  * Usage:
        defaultSVGOpening(w,h)
  * Inputs:
      * w, an integer (Macaulay2Doc),
      * h, an integer (Macaulay2Doc),
  * Outputs:
      * a string (Macaulay2Doc),

Description
===========

It returns a string containing the default SVG opening of the form <svg etc.
used to create an SVG picture.

Ways to use this method:
========================

  * defaultSVGOpening(ZZ,ZZ) -- default
    SVG opening for a picture of a given size

defaultSVGOptions -- the default SVG options
********************************************

Description
===========

It's a hash table containing the default SVG options for all graphic primitives
that can be used to create an SVG document.

For the programmer
==================

The object defaultSVGOptions, is a hash table (Macaulay2Doc).

defaultSVGValues -- the default SVG values of coordinates
*********************************************************

Description
===========

It's a hash table containing the default SVG values for some graphic
primitives. They can be used while creating an SVG document.

For the programmer
==================

The object defaultSVGValues, is a hash table (Macaulay2Doc).

formatGraphicPrimitives -- create a FormattedGraphicPrimitives object
*********************************************************************

Ways to use formatGraphicPrimitives :
=====================================

  * formatGraphicPrimitives(BasicList,HashTable)
    -- create a formatted
    graphic primitive object

For the programmer
==================

The object formatGraphicPrimitives, is a
method function (Macaulay2Doc).

formatGraphicPrimitives(BasicList,HashTable) -- create a formatted graphic primitive object
*******************************************************************************************

Synopsis
========

  * Function: formatGraphicPrimitives,
  * Usage:
        textTag(gplist,h)
  * Inputs:
      * gplist, a basic list (Macaulay2Doc),
      * h, a hash table (Macaulay2Doc), containing graphic
        options
  * Outputs:
      * an instance of the type FormattedGraphicPrimitives,

Description
===========

+-----------------------------------------------------------------------------+
|i1 : myPoint1=point(20.,30.)                                                 |
|                                                                             |
|o1 = Point2D{20, 30}                                                         |
|                                                                             |
|o1 : Point2D                                                                 |
+-----------------------------------------------------------------------------+
|i2 : myPoint2=point(30.,40.)                                                 |
|                                                                             |
|o2 = Point2D{30, 40}                                                         |
|                                                                             |
|o2 : Point2D                                                                 |
+-----------------------------------------------------------------------------+
|i3 : myOptions = hashTable {"fill"=>"black"}                                 |
|                                                                             |
|o3 = HashTable{fill => black}                                                |
|                                                                             |
|o3 : HashTable                                                               |
+-----------------------------------------------------------------------------+
|i4 : formatGraphicPrimitives({myPoint1,myPoint2},myOptions)                  |
|                                                                             |
|o4 = FormattedGraphicPrimitives{{Point2D{20, 30}, Point2D{30, 40}},          |
|                                                                             |
|o4 : FormattedGraphicPrimitives                                              |
|-----------------------------------------------------------------------------|
|HashTable{fill => black}}                                                    |
+-----------------------------------------------------------------------------+

Ways to use this method:
========================

  * formatGraphicPrimitives(BasicList,HashTable)
    -- create a formatted
    graphic primitive object

FormattedGraphicPrimitives -- the class of lists of graphic primitives together with formatting options
*******************************************************************************************************

Methods that use an object of class FormattedGraphicPrimitives :
================================================================

  * mergeFormattedGraphicPrimitives(FormattedGraphicPrimitives, FormattedGraphicPrimitives)
    -- merge two lists of graphic primitives
    with options
  * pgfObject(FormattedGraphicPrimitives)
    -- create the string describing
    a series of graphic primitives in pgf
  * pictureZone(FormattedGraphicPrimitives)
    -- find the zone that contains
    the whole list of graphic primitive
  * svgObject(FormattedGraphicPrimitives)
    -- create a string describing in
    SVG a list of formatted graphic primitive object

For the programmer
==================

The object FormattedGraphicPrimitives, is a
type (Macaulay2Doc), with ancestor classes BasicList (Macaulay2Doc),
< Thing (Macaulay2Doc).

GraphicPrimitive -- the class of all graphic primitives
*******************************************************

Types of GraphicPrimitive :
===========================

  * Circle -- the class of a circle in a 2D space
  * Point2D -- the class of a point in a 2D space
  * Point3D -- the class of a point in a 3D space
  * Polygon2D -- the class of a polygon in a 2D space
  * Polygon3D -- the class of a polygon in a 3D space
  * Segment2D -- the class of a line segment in a 2D space
  * Segment3D -- the class of a line segment in a 3D space
  * Sphere -- the class of a sphere in a 3D space
  * TextTag -- the class of a text tag

For the programmer
==================

The object GraphicPrimitive, is a type (Macaulay2Doc),
with ancestor classes BasicList (Macaulay2Doc),
< Thing (Macaulay2Doc).

mergeFormattedGraphicPrimitives -- merge two lists of graphic primitives with options
*************************************************************************************

Ways to use mergeFormattedGraphicPrimitives :
=============================================

  * mergeFormattedGraphicPrimitives(FormattedGraphicPrimitives, FormattedGraphicPrimitives)
    -- merge two lists of graphic primitives
    with options

For the programmer
==================

The object mergeFormattedGraphicPrimitives,
is a method function with options (Macaulay2Doc).

mergeFormattedGraphicPrimitives(FormattedGraphicPrimitives,FormattedGraphicPrimitives) -- merge two lists of graphic primitives with options
********************************************************************************************************************************************

Synopsis
========

  * Function: mergeFormattedGraphicPrimitives,
  * Usage:
        mergeFormattedGraphicPrimitives(fgp1,fgp2)
  * Inputs:
      * fgp1, an instance of the type FormattedGraphicPrimitives,
      * fgp2, an instance of the type FormattedGraphicPrimitives,
  * Optional inputs (Macaulay2Doc),:
      * keep
      * priority
  * Outputs:
      * an instance of the type FormattedGraphicPrimitives,

Description
===========

The list of graphic primitives are concatenated and the graphic options are
merged according to the value of two options "keep" (either "1or2", "1" or "2")
and "priority" (either "1" or "2").

+-----------------------------------------------------------------------------+
|i1 : myoptions1= new HashTable from {"fill"=>"black"}                        |
|                                                                             |
|o1 = HashTable{fill => black}                                                |
|                                                                             |
|o1 : HashTable                                                               |
+-----------------------------------------------------------------------------+
|i2 : myoptions2= new HashTable from {"fill"=>"blue","stroke"=>"red"}         |
|                                                                             |
|o2 = HashTable{fill => blue }                                                |
|               stroke => red                                                 |
|                                                                             |
|o2 : HashTable                                                               |
+-----------------------------------------------------------------------------+
|i3 : fgp1=formatGraphicPrimitives({point(20,30),point(40,50)},myoptions1)    |
|                                                                             |
|o3 = FormattedGraphicPrimitives{{Point2D{20, 30}, Point2D{40, 50}}, HashTable|
|                                                                             |
|o3 : FormattedGraphicPrimitives                                              |
|-----------------------------------------------------------------------------|
|{fill => black}}                                                             |
+-----------------------------------------------------------------------------+
|i4 : fgp2=formatGraphicPrimitives({circle(point(30,40),10)},myoptions2)      |
|                                                                             |
|o4 = FormattedGraphicPrimitives{{Circle{Point2D{30, 40}, 10}}, HashTable{    |
|                                                                             |
|                                                                             |
|o4 : FormattedGraphicPrimitives                                              |
|-----------------------------------------------------------------------------|
|fill => blue }}                                                              |
|stroke => red                                                                |
+-----------------------------------------------------------------------------+
|i5 : mergeFormattedGraphicPrimitives(fgp1,fgp2)                              |
|                                                                             |
|o5 = FormattedGraphicPrimitives{{Point2D{20, 30}, Point2D{40, 50},           |
|                                                                             |
|o5 : FormattedGraphicPrimitives                                              |
|-----------------------------------------------------------------------------|
|Circle{Point2D{30, 40}, 10}}, HashTable{fill => black}}                      |
+-----------------------------------------------------------------------------+
|i6 : mergeFormattedGraphicPrimitives(fgp1,fgp2,"keep"=>"2","priority"=>"1    |
|                                                                             |
|o6 = FormattedGraphicPrimitives{{Point2D{20, 30}, Point2D{40, 50}, Circle    |
|                                                                             |
|                                                                             |
|o6 : FormattedGraphicPrimitives                                              |
|-----------------------------------------------------------------------------|
|")                                                                           |
|                                                                             |
|{Point2D{30, 40}, 10}}, HashTable{fill => black}}                            |
|                                  stroke => red                              |
+-----------------------------------------------------------------------------+

Ways to use this method:
========================

  * mergeFormattedGraphicPrimitives(FormattedGraphicPrimitives, FormattedGraphicPrimitives)
    -- merge two lists of graphic primitives
    with options

pgfObject -- create a pgf object
********************************

Ways to use pgfObject :
=======================

  * pgfObject(Circle,HashTable), --
    create the string describing a circle in pgf
  * pgfObject(FormattedGraphicPrimitives)
    -- create the string describing
    a series of graphic primitives in pgf
  * pgfObject(Picture) -- create the string
    describing a series of graphic primitives in pgf
  * pgfObject(Point2D,HashTable), --
    create the string describing a point in pgf
  * pgfObject(Polygon2D,HashTable),
    -- create the string describing a circle in pgf
  * pgfObject(Segment2D,HashTable),
    -- create the string describing a line segment in pgf
  * pgfObject(TextTag,HashTable), --
    create the string describing a circle in pgf

For the programmer
==================

The object pgfObject, is a method function (Macaulay2Doc).

pgfObject(Circle,HashTable) -- create the string describing a circle in pgf
***************************************************************************

Synopsis
========

  * Function: pgfObject,
  * Usage:
        pgfObject(mycircle,myoptions)
  * Inputs:
      * mycircle, an instance of the type Circle,
      * myoptions, a hash table (Macaulay2Doc), giving values
        to some options
  * Outputs:
      * a string (Macaulay2Doc), containing the description of
        the circle in pgf

Description
===========

The options that are not given in myoptions are set at their default values if
they are contained in defaultPGFOptions. Options not
listed in possiblePGFOptions, are discarded.

+-------------------------------------------------+
|i1 : myoptions = hashTable {"fill"=>"black"}     |
|                                                 |
|o1 = HashTable{fill => black}                    |
|                                                 |
|o1 : HashTable                                   |
+-------------------------------------------------+
|i2 : pgfObject(circle(point(20,30),10),myoptions)|
|                                                 |
|o2 = \draw[fill=black] (20,30) circle (10);      |
+-------------------------------------------------+

Ways to use this method:
========================

  * pgfObject(Circle,HashTable), --
    create the string describing a circle in pgf

pgfObject(FormattedGraphicPrimitives) -- create the string describing a series of graphic primitives in pgf
***********************************************************************************************************

Synopsis
========

  * Function: pgfObject,
  * Usage:
        pgfObject(FGP)
  * Inputs:
      * FGP, an instance of the type FormattedGraphicPrimitives,
  * Outputs:
      * a string (Macaulay2Doc), containing the description of
        all the graphic primitives contained in the FormattedGraphicPrimitives
        in pgf

Description
===========

The options that are not given in the hash table part of FGP are set at their
default values if they are contained in defaultPGFOptions.
Options not listed in possiblePGFOptions,
are discarded.

+----------------------------------------------------------------------------+
|i1 : myoptions = hashTable {"fill"=>"black"}                                |
|                                                                            |
|o1 = HashTable{fill => black}                                               |
|                                                                            |
|o1 : HashTable                                                              |
+----------------------------------------------------------------------------+
|i2 : myfgp= formatGraphicPrimitives({point(20,30)},myoptions)               |
|                                                                            |
|o2 = FormattedGraphicPrimitives{{Point2D{20, 30}}, HashTable{fill => black}}|
|                                                                            |
|o2 : FormattedGraphicPrimitives                                             |
+----------------------------------------------------------------------------+
|i3 : pgfObject(myfgp)                                                       |
|                                                                            |
|o3 = \draw[fill=black] (20,30) circle (0.1);                                |
+----------------------------------------------------------------------------+

Ways to use this method:
========================

  * pgfObject(FormattedGraphicPrimitives)
    -- create the string describing
    a series of graphic primitives in pgf

pgfObject(Picture) -- create the string describing a series of graphic primitives in pgf
****************************************************************************************

Synopsis
========

  * Function: pgfObject,
  * Usage:
        pgfObject(pict)
  * Inputs:
      * pict, an instance of the type Picture,
  * Outputs:
      * a string (Macaulay2Doc), containing the description of
        all the graphic primitives contained in the Picture in pgf

Description
===========

The options that are not given in the hash table parts of the various
FormattedGraphicPrimitives in the picture are set at their default values if
they are contained in defaultPGFOptions. Options not
listed in possiblePGFOptions, are discarded.

+-----------------------------------------------------------------------------+
|i1 : myfgp1=formatGraphicPrimitives({point(20.,30.),point(30.,40.)},hashTable|
|                                                                             |
|o1 = FormattedGraphicPrimitives{{Point2D{20, 30}, Point2D{30, 40}}, HashTable|
|                                                                             |
|o1 : FormattedGraphicPrimitives                                              |
|-----------------------------------------------------------------------------|
| {"fill"=>"black"})                                                          |
|                                                                             |
|{fill => black}}                                                             |
+-----------------------------------------------------------------------------+
|i2 : myfgp2=formatGraphicPrimitives({circle(point(20.,30.),10)},hashTable    |
|                                                                             |
|o2 = FormattedGraphicPrimitives{{Circle{Point2D{20, 30}, 10}}, HashTable{    |
|                                                                             |
|o2 : FormattedGraphicPrimitives                                              |
|-----------------------------------------------------------------------------|
| {"fill"=>"red"})                                                            |
|                                                                             |
|fill => red}}                                                                |
+-----------------------------------------------------------------------------+
|i3 : mypict=picture({myfgp1,myfgp2})                                         |
|                                                                             |
|o3 = Picture{FormattedGraphicPrimitives{{Point2D{20, 30}, Point2D{30, 40}},  |
|                                                                             |
|o3 : Picture                                                                 |
|-----------------------------------------------------------------------------|
|HashTable{fill => black}}, FormattedGraphicPrimitives{{Circle{Point2D{20,    |
|-----------------------------------------------------------------------------|
|30}, 10}}, HashTable{fill => red}}}                                          |
+-----------------------------------------------------------------------------+
|i4 : pgfObject(mypict)                                                       |
|                                                                             |
|o4 = \draw[fill=black] (20,30) circle (0.1);                                 |
|     \draw[fill=black] (30,40) circle (0.1);                                 |
|     \draw[fill=red] (20,30) circle (10);                                    |
+-----------------------------------------------------------------------------+

Ways to use this method:
========================

  * pgfObject(Picture) -- create the string
    describing a series of graphic primitives in pgf

pgfObject(Point2D,HashTable) -- create the string describing a point in pgf
***************************************************************************

Synopsis
========

  * Function: pgfObject,
  * Usage:
        pgfObject(mypoint,myoptions)
  * Inputs:
      * mypoint, an instance of the type Point2D,
      * myoptions, a hash table (Macaulay2Doc), giving values
        to some options
  * Outputs:
      * a string (Macaulay2Doc), containing the description of
        the point in pgf

Description
===========

The options that are not given in myoptions are set at their default values if
they are contained in defaultPGFOptions. Options not
listed in possiblePGFOptions, are discarded. The size
of the point comes from defaultPGFValues.

+------------------------------------------+
|i1 : myoptions = hashTable {"fill"=>"red"}|
|                                          |
|o1 = HashTable{fill => red}               |
|                                          |
|o1 : HashTable                            |
+------------------------------------------+
|i2 : pgfObject(point(20,30),myoptions)    |
|                                          |
|o2 = \draw[fill=red] (20,30) circle (0.1);|
+------------------------------------------+

Ways to use this method:
========================

  * pgfObject(Point2D,HashTable), --
    create the string describing a point in pgf

pgfObject(Polygon2D,HashTable) -- create the string describing a circle in pgf
******************************************************************************

Synopsis
========

  * Function: pgfObject,
  * Usage:
        svgObject(mypolygon,myoptions)
  * Inputs:
      * mypolygon, an instance of the type Polygon2D,
      * myoptions, a hash table (Macaulay2Doc), giving values
        to some options
  * Outputs:
      * a string (Macaulay2Doc), containing the description of
        the polygon in pgf

Description
===========

The options that are not given in myoptions are set at their default values if
they are contained in defaultPGFOptions. Options not
listed in possiblePGFOptions, are discarded.

+-----------------------------------------------------------------------------+
|i1 : myoptions = hashTable {"fill"=>"black"}                                 |
|                                                                             |
|o1 = HashTable{fill => black}                                                |
|                                                                             |
|o1 : HashTable                                                               |
+-----------------------------------------------------------------------------+
|i2 : pgfObject(polygon({point(20,30),point(40,50),point(10,40)}),myoptions)  |
|                                                                             |
|o2 = \draw[fill opacity=1,fill=black] (20,30) -- (40,50) -- (10,40) -- cycle;|
+-----------------------------------------------------------------------------+

Ways to use this method:
========================

  * pgfObject(Polygon2D,HashTable),
    -- create the string describing a circle in pgf

pgfObject(Segment2D,HashTable) -- create the string describing a line segment in pgf
************************************************************************************

Synopsis
========

  * Function: pgfObject,
  * Usage:
        pgfObject(mysegment,myoptions)
  * Inputs:
      * mysegment, an instance of the type Segment2D,
      * myoptions, a hash table (Macaulay2Doc), giving values
        to some options
  * Outputs:
      * a string (Macaulay2Doc), containing the description of
        the segment in pgf

Description
===========

The options that are not given in myoptions are set at their default values if
they are contained in defaultPGFOptions. Options not
listed in possiblePGFOptions, are discarded.

+------------------------------------------------------------+
|i1 : myoptions = hashTable {"fill"=>"black"}                |
|                                                            |
|o1 = HashTable{fill => black}                               |
|                                                            |
|o1 : HashTable                                              |
+------------------------------------------------------------+
|i2 : pgfObject(segment(point(20,30),point(40,50)),myoptions)|
|                                                            |
|o2 = \draw[] (20,30) -- (40,50);                            |
+------------------------------------------------------------+

Ways to use this method:
========================

  * pgfObject(Segment2D,HashTable),
    -- create the string describing a line segment in pgf

pgfObject(TextTag,HashTable) -- create the string describing a circle in pgf
****************************************************************************

Synopsis
========

  * Function: pgfObject,
  * Usage:
        pgfObject(mytext,myoptions)
  * Inputs:
      * mytext, an instance of the type TextTag,
      * myoptions, a hash table (Macaulay2Doc), giving values
        to some options
  * Outputs:
      * a string (Macaulay2Doc), containing the description of
        the text tag in pgf

Description
===========

The options that are not given in myoptions are set at their default values if
they are contained in defaultPGFOptions. Options not
listed in possiblePGFOptions, are discarded.

+-------------------------------------------------------------+
|i1 : myoptions = hashTable {"fill"=>"black"}                 |
|                                                             |
|o1 = HashTable{fill => black}                                |
|                                                             |
|o1 : HashTable                                               |
+-------------------------------------------------------------+
|i2 : pgfObject(textTag(point(20,30),"Hello world"),myoptions)|
|                                                             |
|o2 = \draw (20,30) node[] {Hello world};                     |
+-------------------------------------------------------------+

Ways to use this method:
========================

  * pgfObject(TextTag,HashTable), --
    create the string describing a circle in pgf

pgfPicture -- create a pgf picture
**********************************

Ways to use pgfPicture :
========================

  * pgfPicture(Picture) -- create a pgf picture
    from a Picture object
  * pgfPicture(Picture,HashTable),
    -- create a pgf picture from a Picture object with some options
  * pgfPicture(Picture,HashTable,String)
    -- create a pgf picture from
    a Picture object with options and store it in a file
  * pgfPicture(Picture,String), --
    create a pgf picture from a Picture object and store it in a file

For the programmer
==================

The object pgfPicture, is a method function (Macaulay2Doc).

pgfPicture(Picture) -- create a pgf picture from a Picture object
*****************************************************************

Synopsis
========

  * Function: pgfPicture,
  * Usage:
        pgfPicture(mypict)
  * Inputs:
      * mypict, an instance of the type Picture,
  * Outputs:
      * a string (Macaulay2Doc), containing the pgf picture

Description
===========

+-----------------------------------------------------------------------------+
|i1 : myfgp1 = formatGraphicPrimitives({point(20,30)},hashTable {"fill        |
|                                                                             |
|o1 = FormattedGraphicPrimitives{{Point2D{20, 30}}, HashTable{fill =>         |
|                                                                             |
|o1 : FormattedGraphicPrimitives                                              |
|-----------------------------------------------------------------------------|
|"=>"black"})                                                                 |
|                                                                             |
|black}}                                                                      |
+-----------------------------------------------------------------------------+
|i2 : myfgp2 = formatGraphicPrimitives({circle(point(20,30),10),point(50,60   |
|                                                                             |
|o2 = FormattedGraphicPrimitives{{Circle{Point2D{20, 30}, 10}, Point2D{50,    |
|                                                                             |
|                                                                             |
|o2 : FormattedGraphicPrimitives                                              |
|-----------------------------------------------------------------------------|
|)},hashTable {"fill"=>"red","fill-opacity"=>"0.2"})                          |
|                                                                             |
|60}}, HashTable{fill => red        }}                                        |
|                fill-opacity => 0.2                                          |
+-----------------------------------------------------------------------------+
|i3 : mypict = picture {myfgp1,myfgp2}                                        |
|                                                                             |
|o3 = Picture{FormattedGraphicPrimitives{{Point2D{20, 30}}, HashTable{fill => |
|                                                                             |
|                                                                             |
|o3 : Picture                                                                 |
|-----------------------------------------------------------------------------|
|black}}, FormattedGraphicPrimitives{{Circle{Point2D{20, 30}, 10}, Point2D{50,|
|                                                                             |
|-----------------------------------------------------------------------------|
|60}}, HashTable{fill => red        }}}                                       |
|                fill-opacity => 0.2                                          |
+-----------------------------------------------------------------------------+
|i4 : pgfPicture(mypict)                                                      |
|                                                                             |
|o4 = \begin{tikzpicture}                                                     |
|     \draw[fill=black] (20,30) circle (0.1);                                 |
|     \draw[fill=red] (20,30) circle (10);                                    |
|     \draw[fill=red] (50,60) circle (0.1);                                   |
|     \end{tikzpicture}                                                       |
+-----------------------------------------------------------------------------+

See also
========

  * pgfPicture(Picture,HashTable),
    -- create a pgf picture from a Picture object with some options
  * svgPicture(Picture) -- create an SVG
    picture from a Picture object

Ways to use this method:
========================

  * pgfPicture(Picture) -- create a pgf picture
    from a Picture object

pgfPicture(Picture,HashTable) -- create a pgf picture from a Picture object with some options
*********************************************************************************************

Synopsis
========

  * Function: pgfPicture,
  * Usage:
        pgfPicture(mypict,myoptions)
  * Inputs:
      * mypict, an instance of the type Picture,
      * myoptions, a hash table (Macaulay2Doc),
  * Outputs:
      * a string (Macaulay2Doc), containing the picture in pgf

Description
===========

+-----------------------------------------------------------------------------+
|i1 : myfgp1 = formatGraphicPrimitives({point(20,30)},hashTable {"fill        |
|                                                                             |
|o1 = FormattedGraphicPrimitives{{Point2D{20, 30}}, HashTable{fill =>         |
|                                                                             |
|o1 : FormattedGraphicPrimitives                                              |
|-----------------------------------------------------------------------------|
|"=>"black"})                                                                 |
|                                                                             |
|black}}                                                                      |
+-----------------------------------------------------------------------------+
|i2 : myfgp2 = formatGraphicPrimitives({circle(point(20,30),10),point(50,60   |
|                                                                             |
|o2 = FormattedGraphicPrimitives{{Circle{Point2D{20, 30}, 10}, Point2D{50,    |
|                                                                             |
|                                                                             |
|o2 : FormattedGraphicPrimitives                                              |
|-----------------------------------------------------------------------------|
|)},hashTable {"fill"=>"red","fill-opacity"=>"0.2"})                          |
|                                                                             |
|60}}, HashTable{fill => red        }}                                        |
|                fill-opacity => 0.2                                          |
+-----------------------------------------------------------------------------+
|i3 : mypict = picture {myfgp1,myfgp2}                                        |
|                                                                             |
|o3 = Picture{FormattedGraphicPrimitives{{Point2D{20, 30}}, HashTable{fill => |
|                                                                             |
|                                                                             |
|o3 : Picture                                                                 |
|-----------------------------------------------------------------------------|
|black}}, FormattedGraphicPrimitives{{Circle{Point2D{20, 30}, 10}, Point2D{50,|
|                                                                             |
|-----------------------------------------------------------------------------|
|60}}, HashTable{fill => red        }}}                                       |
|                fill-opacity => 0.2                                          |
+-----------------------------------------------------------------------------+
|i4 : myoptions = hashTable{"scale"=>"0.5","x"=>"0.1cm","y"=>"0.2cm"}         |
|                                                                             |
|o4 = HashTable{scale => 0.5}                                                 |
|               x => 0.1cm                                                    |
|               y => 0.2cm                                                    |
|                                                                             |
|o4 : HashTable                                                               |
+-----------------------------------------------------------------------------+
|i5 : pgfPicture(mypict,myoptions)                                            |
|                                                                             |
|o5 = \begin{tikzpicture}[x=0.1cm,y=0.2cm,scale=0.5]                          |
|     \draw[fill=black] (20,30) circle (0.1);                                 |
|     \draw[fill=red] (20,30) circle (10);                                    |
|     \draw[fill=red] (50,60) circle (0.1);                                   |
|     \end{tikzpicture}                                                       |
+-----------------------------------------------------------------------------+

See also
========

  * pgfPicture(Picture) -- create a pgf picture
    from a Picture object
  * svgPicture(Picture) -- create an SVG
    picture from a Picture object

Ways to use this method:
========================

  * pgfPicture(Picture,HashTable),
    -- create a pgf picture from a Picture object with some options

pgfPicture(Picture,HashTable,String) -- create a pgf picture from a Picture object with options and store it in a file
**********************************************************************************************************************

Synopsis
========

  * Function: pgfPicture,
  * Usage:
        pgfPicture(mypict,opts,filename)
  * Inputs:
      * mypict, an instance of the type Picture,
      * opts, a hash table (Macaulay2Doc), containing the
        options
      * filename, a string (Macaulay2Doc), the name of the
        storage file

Description
===========

If the filename is without a .tex suffix, it will be added.

See also
========

  * pgfPicture(Picture,String), --
    create a pgf picture from a Picture object and store it in a file
  * pgfPicture(Picture) -- create a pgf picture
    from a Picture object
  * pgfPicture(Picture,HashTable),
    -- create a pgf picture from a Picture object with some options
  * svgPicture(Picture) -- create an SVG
    picture from a Picture object

Ways to use this method:
========================

  * pgfPicture(Picture,HashTable,String)
    -- create a pgf picture from
    a Picture object with options and store it in a file

pgfPicture(Picture,String) -- create a pgf picture from a Picture object and store it in a file
***********************************************************************************************

Synopsis
========

  * Function: pgfPicture,
  * Usage:
        pgfPicture(mypict,filename)
  * Inputs:
      * mypict, an instance of the type Picture,
      * filename, a string (Macaulay2Doc), the name of the
        storage file

Description
===========

If the filename is without a .tex suffix, it will be added.

See also
========

  * pgfPicture(Picture,HashTable,String)
    -- create a pgf picture from
    a Picture object with options and store it in a file
  * pgfPicture(Picture) -- create a pgf picture
    from a Picture object
  * pgfPicture(Picture,HashTable),
    -- create a pgf picture from a Picture object with some options
  * svgPicture(Picture) -- create an SVG
    picture from a Picture object

Ways to use this method:
========================

  * pgfPicture(Picture,String), --
    create a pgf picture from a Picture object and store it in a file

Picture -- the class of pictures containing several FormattedGraphicPrimitives
******************************************************************************

Methods that use an object of class Picture :
=============================================

  * pgfObject(Picture) -- create the string
    describing a series of graphic primitives in pgf
  * pgfPicture(Picture) -- create a pgf picture
    from a Picture object
  * pgfPicture(Picture,HashTable),
    -- create a pgf picture from a Picture object with some options
  * pgfPicture(Picture,HashTable,String)
    -- create a pgf picture from
    a Picture object with options and store it in a file
  * pgfPicture(Picture,String), --
    create a pgf picture from a Picture object and store it in a file
  * pictureZone(Picture) -- find the zone that
    contains the whole picture
  * svgObject(Picture) -- create a string
    describing the picture in SVG
  * svgPicture(Picture) -- create an SVG
    picture from a Picture object
  * svgPicture(Picture,String), --
    create an SVG picture from a Picture object and store it in a file
  * svgPicture(Picture,ZZ,ZZ), --
    create an SVG picture from a Picture object
  * svgPicture(Picture,ZZ,ZZ,String)
    -- create an SVG picture from a
    Picture object and store it in a file

For the programmer
==================

The object Picture, is a type (Macaulay2Doc), with
ancestor classes BasicList (Macaulay2Doc), < Thing (Macaulay2Doc).

picture -- create a Picture object
**********************************

Ways to use picture :
=====================

  * picture(BasicList) -- create a picture
    object

For the programmer
==================

The object picture, is a method function (Macaulay2Doc).

picture(BasicList) -- create a picture object
*********************************************

Synopsis
========

  * Function: picture,
  * Usage:
        picture(fgplist,h)
  * Inputs:
      * fgplist, a basic list (Macaulay2Doc), a list of
        FormattedGraphicPrimitives
  * Outputs:
      * an instance of the type Picture,

Description
===========

+-----------------------------------------------------------------------------+
|i1 : myfgp1=formatGraphicPrimitives({point(20.,30.),point(30.,40.)},hashTable|
|                                                                             |
|o1 = FormattedGraphicPrimitives{{Point2D{20, 30}, Point2D{30, 40}}, HashTable|
|                                                                             |
|o1 : FormattedGraphicPrimitives                                              |
|-----------------------------------------------------------------------------|
| {"fill"=>"black"})                                                          |
|                                                                             |
|{fill => black}}                                                             |
+-----------------------------------------------------------------------------+
|i2 : myfgp2=formatGraphicPrimitives({circle(point(20.,30.),10)},hashTable    |
|                                                                             |
|o2 = FormattedGraphicPrimitives{{Circle{Point2D{20, 30}, 10}}, HashTable{    |
|                                                                             |
|o2 : FormattedGraphicPrimitives                                              |
|-----------------------------------------------------------------------------|
| {"fill"=>"red"})                                                            |
|                                                                             |
|fill => red}}                                                                |
+-----------------------------------------------------------------------------+
|i3 : picture({myfgp1,myfgp2})                                                |
|                                                                             |
|o3 = Picture{FormattedGraphicPrimitives{{Point2D{20, 30}, Point2D{30, 40}},  |
|                                                                             |
|o3 : Picture                                                                 |
|-----------------------------------------------------------------------------|
|HashTable{fill => black}}, FormattedGraphicPrimitives{{Circle{Point2D{20,    |
|-----------------------------------------------------------------------------|
|30}, 10}}, HashTable{fill => red}}}                                          |
+-----------------------------------------------------------------------------+

Ways to use this method:
========================

  * picture(BasicList) -- create a picture
    object

pictureZone -- find the zone in which a picture lies
****************************************************

Ways to use pictureZone :
=========================

  * pictureZone(Circle) -- find the zone that
    contains the circle
  * pictureZone(FormattedGraphicPrimitives)
    -- find the zone that contains
    the whole list of graphic primitive
  * pictureZone(Picture) -- find the zone that
    contains the whole picture
  * pictureZone(Point2D) -- find the zone that
    contains the point
  * pictureZone(Point3D) -- find the zone that
    contains the point
  * pictureZone(Polygon2D) -- find the zone
    that contains the polygon
  * pictureZone(Polygon3D) -- find the zone
    that contains the polygon
  * pictureZone(Segment2D) -- find the zone
    that contains the line segment
  * pictureZone(Segment3D) -- find the zone
    that contains the line segment
  * pictureZone(Sphere) -- find the zone that
    contains the sphere
  * pictureZone(TextTag) -- find the zone that
    contains the tag

For the programmer
==================

The object pictureZone, is a method function (Macaulay2Doc).

pictureZone(Circle) -- find the zone that contains the circle
*************************************************************

Synopsis
========

  * Function: pictureZone,
  * Usage:
        pictureZone(c)
  * Inputs:
      * c, an instance of the type Circle,
  * Outputs:
      * a list (Macaulay2Doc), of the form {xmin,xmax,ymin,ymax}

Description
===========

+-----------------------------------------+
|i1 : pictureZone(circle(point(20,30),10))|
|                                         |
|o1 = {10, 30, 20, 40}                    |
|                                         |
|o1 : List                                |
+-----------------------------------------+

Ways to use this method:
========================

  * pictureZone(Circle) -- find the zone that
    contains the circle

pictureZone(FormattedGraphicPrimitives) -- find the zone that contains the whole list of graphic primitive
**********************************************************************************************************

Synopsis
========

  * Function: pictureZone,
  * Usage:
        pictureZone(fgp)
  * Inputs:
      * fgp, an instance of the type FormattedGraphicPrimitives,
  * Outputs:
      * a list (Macaulay2Doc), of the form {xmin,xmax,ymin,ymax}
        (or {xmin,xmax,ymin,ymax,zmin,zmax} for 3D objects) describing a zone
        containing the object fgp

Description
===========

+-----------------------------------------------------------------------------+
|i1 : pictureZone(formatGraphicPrimitives({circle(point(20,30),10)},hashTable |
|                                                                             |
|o1 = {10, 30, 20, 40}                                                        |
|                                                                             |
|o1 : List                                                                    |
|-----------------------------------------------------------------------------|
|{"fill"=>"black"}))                                                          |
+-----------------------------------------------------------------------------+

Ways to use this method:
========================

  * pictureZone(FormattedGraphicPrimitives)
    -- find the zone that contains
    the whole list of graphic primitive

pictureZone(Picture) -- find the zone that contains the whole picture
*********************************************************************

Synopsis
========

  * Function: pictureZone,
  * Usage:
        pictureZone(mypict)
  * Inputs:
      * mypict, an instance of the type Picture,
  * Outputs:
      * a list (Macaulay2Doc), of the form {xmin,xmax,ymin,ymax}
        (or {xmin,xmax,ymin,ymax,zmin,zmax} for 3D objects) describing a zone
        containing the object fgp

Description
===========

+-----------------------------------------------------------------------------+
|i1 : myfgp1=formatGraphicPrimitives({point(20.,30.),point(30.,40.)},hashTable|
|                                                                             |
|o1 = FormattedGraphicPrimitives{{Point2D{20, 30}, Point2D{30, 40}}, HashTable|
|                                                                             |
|o1 : FormattedGraphicPrimitives                                              |
|-----------------------------------------------------------------------------|
| {"fill"=>"black"})                                                          |
|                                                                             |
|{fill => black}}                                                             |
+-----------------------------------------------------------------------------+
|i2 : myfgp2=formatGraphicPrimitives({circle(point(20.,30.),10)},hashTable    |
|                                                                             |
|o2 = FormattedGraphicPrimitives{{Circle{Point2D{20, 30}, 10}}, HashTable{    |
|                                                                             |
|o2 : FormattedGraphicPrimitives                                              |
|-----------------------------------------------------------------------------|
| {"fill"=>"red"})                                                            |
|                                                                             |
|fill => red}}                                                                |
+-----------------------------------------------------------------------------+
|i3 : mypict=picture({myfgp1,myfgp2})                                         |
|                                                                             |
|o3 = Picture{FormattedGraphicPrimitives{{Point2D{20, 30}, Point2D{30, 40}},  |
|                                                                             |
|o3 : Picture                                                                 |
|-----------------------------------------------------------------------------|
|HashTable{fill => black}}, FormattedGraphicPrimitives{{Circle{Point2D{20,    |
|-----------------------------------------------------------------------------|
|30}, 10}}, HashTable{fill => red}}}                                          |
+-----------------------------------------------------------------------------+
|i4 : pictureZone(mypict)                                                     |
|                                                                             |
|o4 = {10, 30, 20, 40}                                                        |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+

Ways to use this method:
========================

  * pictureZone(Picture) -- find the zone that
    contains the whole picture

pictureZone(Point2D) -- find the zone that contains the point
*************************************************************

Synopsis
========

  * Function: pictureZone,
  * Usage:
        pictureZone(p)
  * Inputs:
      * p, an instance of the type Point2D,
  * Outputs:
      * a list (Macaulay2Doc), of the form {xmin,xmax,ymin,ymax}

Description
===========

+------------------------------+
|i1 : pictureZone(point(20,30))|
|                              |
|o1 = {20, 20, 30, 30}         |
|                              |
|o1 : List                     |
+------------------------------+

Ways to use this method:
========================

  * pictureZone(Point2D) -- find the zone that
    contains the point

pictureZone(Point3D) -- find the zone that contains the point
*************************************************************

Synopsis
========

  * Function: pictureZone,
  * Usage:
        pictureZone(p)
  * Inputs:
      * p, an instance of the type Point3D,
  * Outputs:
      * a list (Macaulay2Doc), of the form
        {xmin,xmax,ymin,ymax,zmin,zmax}

Description
===========

+---------------------------------+
|i1 : pictureZone(point(20,30,40))|
|                                 |
|o1 = {20, 20, 30, 30, 40, 40}    |
|                                 |
|o1 : List                        |
+---------------------------------+

Ways to use this method:
========================

  * pictureZone(Point3D) -- find the zone that
    contains the point

pictureZone(Polygon2D) -- find the zone that contains the polygon
*****************************************************************

Synopsis
========

  * Function: pictureZone,
  * Usage:
        pictureZone(p)
  * Inputs:
      * p, an instance of the type Polygon2D,
  * Outputs:
      * a list (Macaulay2Doc), of the form {xmin,xmax,ymin,ymax}

Description
===========

+-------------------------------------------------------------------+
|i1 : pictureZone(polygon({point(20,30),point(25,30),point(20,35)}))|
|                                                                   |
|o1 = {20, 25, 30, 35}                                              |
|                                                                   |
|o1 : List                                                          |
+-------------------------------------------------------------------+

Ways to use this method:
========================

  * pictureZone(Polygon2D) -- find the zone
    that contains the polygon

pictureZone(Polygon3D) -- find the zone that contains the polygon
*****************************************************************

Synopsis
========

  * Function: pictureZone,
  * Usage:
        pictureZone(p)
  * Inputs:
      * p, an instance of the type Polygon3D,
  * Outputs:
      * a list (Macaulay2Doc), of the form
        {xmin,xmax,ymin,ymax,zmin,zmax}

Description
===========

+----------------------------------------------------------------------------+
|i1 : pictureZone(polygon({point(20,30,40),point(25,30,40),point(20,35,45)}))|
|                                                                            |
|o1 = {20, 25, 30, 35, 40, 45}                                               |
|                                                                            |
|o1 : List                                                                   |
+----------------------------------------------------------------------------+

Ways to use this method:
========================

  * pictureZone(Polygon3D) -- find the zone
    that contains the polygon

pictureZone(Segment2D) -- find the zone that contains the line segment
**********************************************************************

Synopsis
========

  * Function: pictureZone,
  * Usage:
        pictureZone(l)
  * Inputs:
      * l, an instance of the type Segment2D,
  * Outputs:
      * a list (Macaulay2Doc), of the form {xmin,xmax,ymin,ymax}

Description
===========

+----------------------------------------------------+
|i1 : pictureZone(segment(point(20,30),point(30,40)))|
|                                                    |
|o1 = {20, 30, 30, 40}                               |
|                                                    |
|o1 : List                                           |
+----------------------------------------------------+

Ways to use this method:
========================

  * pictureZone(Segment2D) -- find the zone
    that contains the line segment

pictureZone(Segment3D) -- find the zone that contains the line segment
**********************************************************************

Synopsis
========

  * Function: pictureZone,
  * Usage:
        pictureZone(l)
  * Inputs:
      * l, an instance of the type Segment3D,
  * Outputs:
      * a list (Macaulay2Doc), of the form
        {xmin,xmax,ymin,ymax,zmin,zmax}

Description
===========

+----------------------------------------------------------+
|i1 : pictureZone(segment(point(20,30,40),point(30,40,50)))|
|                                                          |
|o1 = {20, 30, 30, 40, 40, 50}                             |
|                                                          |
|o1 : List                                                 |
+----------------------------------------------------------+

Ways to use this method:
========================

  * pictureZone(Segment3D) -- find the zone
    that contains the line segment

pictureZone(Sphere) -- find the zone that contains the sphere
*************************************************************

Synopsis
========

  * Function: pictureZone,
  * Usage:
        pictureZone(s)
  * Inputs:
      * s, an instance of the type Sphere,
  * Outputs:
      * a list (Macaulay2Doc), of the form
        {xmin,xmax,ymin,ymax,zmin,zmax}

Description
===========

+--------------------------------------------+
|i1 : pictureZone(sphere(point(20,30,40),10))|
|                                            |
|o1 = {10, 30, 20, 40, 30, 50}               |
|                                            |
|o1 : List                                   |
+--------------------------------------------+

Ways to use this method:
========================

  * pictureZone(Sphere) -- find the zone that
    contains the sphere

pictureZone(TextTag) -- find the zone that contains the tag
***********************************************************

Synopsis
========

  * Function: pictureZone,
  * Usage:
        pictureZone(t)
  * Inputs:
      * t, an instance of the type TextTag,
  * Outputs:
      * a list (Macaulay2Doc), of the form {xmin,xmax,ymin,ymax} or
        {xmin,xmax,ymin,ymax,zmin,zmax}

Description
===========

+---------------------------------------------------+
|i1 : pictureZone(textTag(point(20,30),"my tag"))   |
|                                                   |
|o1 = {20, 20, 30, 30}                              |
|                                                   |
|o1 : List                                          |
+---------------------------------------------------+
|i2 : pictureZone(textTag(point(20,30,40),"my tag"))|
|                                                   |
|o2 = {20, 20, 30, 30, 40, 40}                      |
|                                                   |
|o2 : List                                          |
+---------------------------------------------------+

Ways to use this method:
========================

  * pictureZone(TextTag) -- find the zone that
    contains the tag

point -- create a point
***********************

Ways to use point :
===================

  * point(RR,RR) -- a point from two coordinates
  * point(RR,RR,RR) -- a point from three
    coordinates
  * point(ZZ,ZZ) -- a point from two coordinates
  * point(ZZ,ZZ,ZZ) -- a point from three
    coordinates

For the programmer
==================

The object point, is a method function (Macaulay2Doc).

point(RR,RR) -- a point from two coordinates
********************************************

Synopsis
========

  * Function: point,
  * Usage:
        point(x,y)
  * Inputs:
      * x, a real number (Macaulay2Doc),
      * y, a real number (Macaulay2Doc),
  * Outputs:
      * an instance of the type Point2D, the point with
        coordinates x and y

Description
===========

+-------------------+
|i1 : point(2.1, 3.)|
|                   |
|o1 = Point2D{2, 3} |
|                   |
|o1 : Point2D       |
+-------------------+

Ways to use this method:
========================

  * point(RR,RR) -- a point from two coordinates

point(RR,RR,RR) -- a point from three coordinates
*************************************************

Synopsis
========

  * Function: point,
  * Usage:
        point(x,y,z)
  * Inputs:
      * x, a real number (Macaulay2Doc),
      * y, a real number (Macaulay2Doc),
      * z, a real number (Macaulay2Doc),
  * Outputs:
      * an instance of the type Point3D, the point with
        coordinates x, y and z

Description
===========

+----------------------+
|i1 : point(2.1, 3.,4.)|
|                      |
|o1 = Point3D{2, 3, 4} |
|                      |
|o1 : Point3D          |
+----------------------+

Ways to use this method:
========================

  * point(RR,RR,RR) -- a point from three
    coordinates

point(ZZ,ZZ) -- a point from two coordinates
********************************************

Synopsis
========

  * Function: point,
  * Usage:
        point(x,y)
  * Inputs:
      * x, an integer (Macaulay2Doc),
      * y, an integer (Macaulay2Doc),
  * Outputs:
      * an instance of the type Point2D, the point with
        coordinates x and y

Description
===========

+--------------------+
|i1 : point(20, 30)  |
|                    |
|o1 = Point2D{20, 30}|
|                    |
|o1 : Point2D        |
+--------------------+

Ways to use this method:
========================

  * point(ZZ,ZZ) -- a point from two coordinates

point(ZZ,ZZ,ZZ) -- a point from three coordinates
*************************************************

Synopsis
========

  * Function: point,
  * Usage:
        point(x,y,z)
  * Inputs:
      * x, an integer (Macaulay2Doc),
      * y, an integer (Macaulay2Doc),
      * z, an integer (Macaulay2Doc),
  * Outputs:
      * an instance of the type Point3D, the point with
        coordinates x, y and z

Description
===========

+------------------------+
|i1 : point(20,30,40)    |
|                        |
|o1 = Point3D{20, 30, 40}|
|                        |
|o1 : Point3D            |
+------------------------+

Ways to use this method:
========================

  * point(ZZ,ZZ,ZZ) -- a point from three
    coordinates

Point2D -- the class of a point in a 2D space
*********************************************

Methods that use an object of class Point2D :
=============================================

  * circle(Point2D,RR) -- a circle from a
    center and a radius
  * circle(Point2D,ZZ) -- a circle from a
    center and a radius
  * pgfObject(Point2D,HashTable), --
    create the string describing a point in pgf
  * pictureZone(Point2D) -- find the zone that
    contains the point
  * segment(Point2D,Point2D) -- a line
    segment from two points
  * svgObject(Point2D,HashTable), --
    create the string describing a point in SVG
  * textTag(Point2D,String) -- a text tag
    at a position

For the programmer
==================

The object Point2D, is a type (Macaulay2Doc), with
ancestor classes GraphicPrimitive, < BasicList (Macaulay2Doc)
< Thing (Macaulay2Doc).

Point3D -- the class of a point in a 3D space
*********************************************

Methods that use an object of class Point3D :
=============================================

  * pictureZone(Point3D) -- find the zone that
    contains the point
  * segment(Point3D,Point3D) -- a line
    segment from two points
  * sphere(Point3D,RR) -- a sphere from a
    center and a radius
  * sphere(Point3D,ZZ) -- a sphere from a
    center and a radius
  * textTag(Point3D,String) -- a text tag
    at a position

For the programmer
==================

The object Point3D, is a type (Macaulay2Doc), with
ancestor classes GraphicPrimitive, < BasicList (Macaulay2Doc)
< Thing (Macaulay2Doc).

polygon -- create a polygon from a list of points
*************************************************

Ways to use polygon :
=====================

  * polygon(List) -- a polygon from a list of points

For the programmer
==================

The object polygon, is a method function (Macaulay2Doc).

polygon(List) -- a polygon from a list of points
************************************************

Synopsis
========

  * Function: polygon,
  * Usage:
        polygon(L)
  * Inputs:
      * L, a list (Macaulay2Doc), of Point2D,s or of
        Point3D,s
  * Outputs:
      * a thing (Macaulay2Doc), the polygon defined by the points
        in L

Description
===========

All the points must be of the same class, either Point2D, or
Point3D.

+-----------------------------------------------------------+
|i1 : L={point(2.1, 3.),point(.4, 4.6),point(3.1,5.)}       |
|                                                           |
|o1 = {Point2D{2, 3}, Point2D{0, 5}, Point2D{3, 5}}         |
|                                                           |
|o1 : List                                                  |
+-----------------------------------------------------------+
|i2 : polygon(L)                                            |
|                                                           |
|o2 = Polygon2D{Point2D{2, 3}, Point2D{0, 5}, Point2D{3, 5}}|
|                                                           |
|o2 : Polygon2D                                             |
+-----------------------------------------------------------+

Ways to use this method:
========================

  * polygon(List) -- a polygon from a list of points

Polygon2D -- the class of a polygon in a 2D space
*************************************************

Methods that use an object of class Polygon2D :
===============================================

  * pgfObject(Polygon2D,HashTable),
    -- create the string describing a circle in pgf
  * pictureZone(Polygon2D) -- find the zone
    that contains the polygon
  * svgObject(Polygon2D,HashTable),
    -- create the string describing a circle in SVG

For the programmer
==================

The object Polygon2D, is a type (Macaulay2Doc),
with ancestor classes GraphicPrimitive, <
BasicList (Macaulay2Doc) < Thing (Macaulay2Doc).

Polygon3D -- the class of a polygon in a 3D space
*************************************************

Methods that use an object of class Polygon3D :
===============================================

  * pictureZone(Polygon3D) -- find the zone
    that contains the polygon

For the programmer
==================

The object Polygon3D, is a type (Macaulay2Doc),
with ancestor classes GraphicPrimitive, <
BasicList (Macaulay2Doc) < Thing (Macaulay2Doc).

possiblePGFOptions -- the possible pgf options
**********************************************

Description
===========

It's a hash table containing the possible pgf options for graphic primitives
that can be used to create a pgf picture. Options not listed here will usually
be discarded.

For the programmer
==================

The object possiblePGFOptions, is a hash table (Macaulay2Doc).

possibleSVGOptions -- the possible SVG options
**********************************************

Description
===========

It's a hash table containing the possible SVG options for graphic primitives
that can be used to create an SVG picture. Options not listed here will usually
be discarded when the primitive is turned into an SVG object.

For the programmer
==================

The object possibleSVGOptions, is a hash table (Macaulay2Doc).

segment -- create a line segment
********************************

Ways to use segment :
=====================

  * segment(Point2D,Point2D) -- a line
    segment from two points
  * segment(Point3D,Point3D) -- a line
    segment from two points

For the programmer
==================

The object segment, is a method function (Macaulay2Doc).

segment(Point2D,Point2D) -- a line segment from two points
**********************************************************

Synopsis
========

  * Function: segment,
  * Usage:
        segment(p,q)
  * Inputs:
      * p, an instance of the type Point2D,
      * q, an instance of the type Point2D,
  * Outputs:
      * an instance of the type Segment2D, the line segment
        with endpoints p and q

Description
===========

+--------------------------------------------+
|i1 : p=point(2.1, 3.)                       |
|                                            |
|o1 = Point2D{2, 3}                          |
|                                            |
|o1 : Point2D                                |
+--------------------------------------------+
|i2 : q=point(.4, 4.6)                       |
|                                            |
|o2 = Point2D{0, 5}                          |
|                                            |
|o2 : Point2D                                |
+--------------------------------------------+
|i3 : segment(p,q)                           |
|                                            |
|o3 = Segment2D{Point2D{2, 3}, Point2D{0, 5}}|
|                                            |
|o3 : Segment2D                              |
+--------------------------------------------+

Ways to use this method:
========================

  * segment(Point2D,Point2D) -- a line
    segment from two points

segment(Point3D,Point3D) -- a line segment from two points
**********************************************************

Synopsis
========

  * Function: segment,
  * Usage:
        segment(p,q)
  * Inputs:
      * p, an instance of the type Point3D,
      * q, an instance of the type Point3D,
  * Outputs:
      * an instance of the type Segment3D, the line segment
        with endpoints p and q

Description
===========

+--------------------------------------------------+
|i1 : p=point(2.1, 3.,4.)                          |
|                                                  |
|o1 = Point3D{2, 3, 4}                             |
|                                                  |
|o1 : Point3D                                      |
+--------------------------------------------------+
|i2 : q=point(.4, 4.6,5.3)                         |
|                                                  |
|o2 = Point3D{0, 5, 5}                             |
|                                                  |
|o2 : Point3D                                      |
+--------------------------------------------------+
|i3 : segment(p,q)                                 |
|                                                  |
|o3 = Segment3D{Point3D{2, 3, 4}, Point3D{0, 5, 5}}|
|                                                  |
|o3 : Segment3D                                    |
+--------------------------------------------------+

Ways to use this method:
========================

  * segment(Point3D,Point3D) -- a line
    segment from two points

Segment2D -- the class of a line segment in a 2D space
******************************************************

Methods that use an object of class Segment2D :
===============================================

  * pgfObject(Segment2D,HashTable),
    -- create the string describing a line segment in pgf
  * pictureZone(Segment2D) -- find the zone
    that contains the line segment
  * svgObject(Segment2D,HashTable),
    -- create the string describing a line segment in SVG

For the programmer
==================

The object Segment2D, is a type (Macaulay2Doc),
with ancestor classes GraphicPrimitive, <
BasicList (Macaulay2Doc) < Thing (Macaulay2Doc).

Segment3D -- the class of a line segment in a 3D space
******************************************************

Methods that use an object of class Segment3D :
===============================================

  * pictureZone(Segment3D) -- find the zone
    that contains the line segment

For the programmer
==================

The object Segment3D, is a type (Macaulay2Doc),
with ancestor classes GraphicPrimitive, <
BasicList (Macaulay2Doc) < Thing (Macaulay2Doc).

Sphere -- the class of a sphere in a 3D space
*********************************************

Methods that use an object of class Sphere :
============================================

  * pictureZone(Sphere) -- find the zone that
    contains the sphere

For the programmer
==================

The object Sphere, is a type (Macaulay2Doc), with
ancestor classes GraphicPrimitive, < BasicList (Macaulay2Doc)
< Thing (Macaulay2Doc).

sphere -- create a sphere from a point and a radius
***************************************************

Ways to use sphere :
====================

  * sphere(Point3D,RR) -- a sphere from a
    center and a radius
  * sphere(Point3D,ZZ) -- a sphere from a
    center and a radius

For the programmer
==================

The object sphere, is a method function (Macaulay2Doc).

sphere(Point3D,RR) -- a sphere from a center and a radius
*********************************************************

Synopsis
========

  * Function: sphere,
  * Usage:
        sphere(p,r)
  * Inputs:
      * p, an instance of the type Point3D, the center of the
        sphere
      * r, a real number (Macaulay2Doc), the radius of the sphere
  * Outputs:
      * an instance of the type Sphere, the sphere with center p
        and radius r

Description
===========

+--------------------------------------+
|i1 : sphere(point(20.1, 30.,100.),30.)|
|                                      |
|o1 = Sphere{Point3D{20, 30, 100}, 30} |
|                                      |
|o1 : Sphere                           |
+--------------------------------------+

Ways to use this method:
========================

  * sphere(Point3D,RR) -- a sphere from a
    center and a radius

sphere(Point3D,ZZ) -- a sphere from a center and a radius
*********************************************************

Synopsis
========

  * Function: sphere,
  * Usage:
        sphere(p,r)
  * Inputs:
      * p, an instance of the type Point3D, the center of the
        sphere
      * r, an integer (Macaulay2Doc), the radius of the sphere
  * Outputs:
      * an instance of the type Sphere, the sphere with center p
        and radius r

Description
===========

+-------------------------------------+
|i1 : sphere(point(20,30,100),10)     |
|                                     |
|o1 = Sphere{Point3D{20, 30, 100}, 10}|
|                                     |
|o1 : Sphere                          |
+-------------------------------------+

Ways to use this method:
========================

  * sphere(Point3D,ZZ) -- a sphere from a
    center and a radius

svgObject -- create an SVG object
*********************************

Ways to use svgObject :
=======================

  * svgObject(Circle,HashTable), --
    create the string describing a circle in SVG
  * svgObject(FormattedGraphicPrimitives)
    -- create a string describing in
    SVG a list of formatted graphic primitive object
  * svgObject(Picture) -- create a string
    describing the picture in SVG
  * svgObject(Point2D,HashTable), --
    create the string describing a point in SVG
  * svgObject(Polygon2D,HashTable),
    -- create the string describing a circle in SVG
  * svgObject(Segment2D,HashTable),
    -- create the string describing a line segment in SVG
  * svgObject(TextTag,HashTable), --
    create the string describing a circle in SVG

For the programmer
==================

The object svgObject, is a method function (Macaulay2Doc).

svgObject(Circle,HashTable) -- create the string describing a circle in SVG
***************************************************************************

Synopsis
========

  * Function: svgObject,
  * Usage:
        svgObject(mycircle,myoptions)
  * Inputs:
      * mycircle, an instance of the type Circle,
      * myoptions, a hash table (Macaulay2Doc), giving values
        to some options (see defaultSVGOptions).
  * Outputs:
      * a string (Macaulay2Doc), containing the description of
        the circle in SVG

Description
===========

The options that are not given in myoptions are set at the default values
contained in defaultSVGOptions.

+-------------------------------------------------------------------+
|i1 : myoptions = hashTable {"fill"=>"black"}                       |
|                                                                   |
|o1 = HashTable{fill => black}                                      |
|                                                                   |
|o1 : HashTable                                                     |
+-------------------------------------------------------------------+
|i2 : svgObject(circle(point(20,30),10),myoptions)                  |
|                                                                   |
|o2 = <circle cx="20" cy="30" r="10" stroke="black" fill-opacity="0"|
|     stroke-width="1" fill="black" stroke-opacity="1" />           |
+-------------------------------------------------------------------+

Ways to use this method:
========================

  * svgObject(Circle,HashTable), --
    create the string describing a circle in SVG

svgObject(FormattedGraphicPrimitives) -- create a string describing in SVG a list of formatted graphic primitive object
***********************************************************************************************************************

Synopsis
========

  * Function: svgObject,
  * Usage:
        svgObject(fgp)
  * Inputs:
      * fgp, an instance of the type FormattedGraphicPrimitives,
  * Outputs:
      * a string (Macaulay2Doc), containing the description of an
        object in SVG

Description
===========

The options that are not given in the hash table part of fgp are set at the
default values contained in defaultSVGOptions.

+----------------------------------------------------------------------------+
|i1 : myoptions = hashTable {"fill"=>"black"}                                |
|                                                                            |
|o1 = HashTable{fill => black}                                               |
|                                                                            |
|o1 : HashTable                                                              |
+----------------------------------------------------------------------------+
|i2 : myfgp= formatGraphicPrimitives({point(20,30)},myoptions)               |
|                                                                            |
|o2 = FormattedGraphicPrimitives{{Point2D{20, 30}}, HashTable{fill => black}}|
|                                                                            |
|o2 : FormattedGraphicPrimitives                                             |
+----------------------------------------------------------------------------+
|i3 : svgObject(myfgp)                                                       |
|                                                                            |
|o3 = <circle cx="20" cy="30" r="2" stroke="black" fill-opacity="1"          |
|     stroke-width="0" fill="black" stroke-opacity="1" />                    |
+----------------------------------------------------------------------------+

Ways to use this method:
========================

  * svgObject(FormattedGraphicPrimitives)
    -- create a string describing in
    SVG a list of formatted graphic primitive object

svgObject(Picture) -- create a string describing the picture in SVG
*******************************************************************

Synopsis
========

  * Function: svgObject,
  * Usage:
        svgObject(mypict)
  * Inputs:
      * mypict, an instance of the type Picture,
  * Outputs:
      * a string (Macaulay2Doc), containing the description of
        the picture in SVG

Description
===========

+-----------------------------------------------------------------------------+
|i1 : myfgp1=formatGraphicPrimitives({point(20.,30.),point(30.,40.)},hashTable|
|                                                                             |
|o1 = FormattedGraphicPrimitives{{Point2D{20, 30}, Point2D{30, 40}}, HashTable|
|                                                                             |
|o1 : FormattedGraphicPrimitives                                              |
|-----------------------------------------------------------------------------|
| {"fill"=>"black"})                                                          |
|                                                                             |
|{fill => black}}                                                             |
+-----------------------------------------------------------------------------+
|i2 : myfgp2=formatGraphicPrimitives({circle(point(20.,30.),10)},hashTable    |
|                                                                             |
|o2 = FormattedGraphicPrimitives{{Circle{Point2D{20, 30}, 10}}, HashTable{    |
|                                                                             |
|o2 : FormattedGraphicPrimitives                                              |
|-----------------------------------------------------------------------------|
| {"fill"=>"red"})                                                            |
|                                                                             |
|fill => red}}                                                                |
+-----------------------------------------------------------------------------+
|i3 : mypict=picture({myfgp1,myfgp2})                                         |
|                                                                             |
|o3 = Picture{FormattedGraphicPrimitives{{Point2D{20, 30}, Point2D{30, 40}},  |
|                                                                             |
|o3 : Picture                                                                 |
|-----------------------------------------------------------------------------|
|HashTable{fill => black}}, FormattedGraphicPrimitives{{Circle{Point2D{20,    |
|-----------------------------------------------------------------------------|
|30}, 10}}, HashTable{fill => red}}}                                          |
+-----------------------------------------------------------------------------+
|i4 : svgObject(mypict)                                                       |
|                                                                             |
|o4 = <circle cx="20" cy="30"                                                 |
|                                                                             |
|     <circle cx="30" cy="40"                                                 |
|                                                                             |
|     <circle cx="20" cy="30"                                                 |
|-----------------------------------------------------------------------------|
|r="2" stroke="black" fill-opacity="1" stroke-width="0" fill="black" stroke   |
|                                                                             |
|r="2" stroke="black" fill-opacity="1" stroke-width="0" fill="black" stroke   |
|                                                                             |
|r="10" stroke="black" fill-opacity="0" stroke-width="1" fill="red" stroke-   |
|-----------------------------------------------------------------------------|
|-opacity="1" />                                                              |
|                                                                             |
|-opacity="1" />                                                              |
|                                                                             |
|opacity="1" />                                                               |
+-----------------------------------------------------------------------------+

See also
========

  * svgPicture -- create an SVG picture
  * viewPicture -- view a picture in a browser

Ways to use this method:
========================

  * svgObject(Picture) -- create a string
    describing the picture in SVG

svgObject(Point2D,HashTable) -- create the string describing a point in SVG
***************************************************************************

Synopsis
========

  * Function: svgObject,
  * Usage:
        svgObject(mypoint,myoptions)
  * Inputs:
      * mypoint, an instance of the type Point2D,
      * myoptions, a hash table (Macaulay2Doc), giving values
        to some options (see defaultSVGOptions).
  * Outputs:
      * a string (Macaulay2Doc), containing the description of
        the point in SVG

Description
===========

The options that are not given in myoptions are set at the default values
contained in defaultSVGOptions.

+------------------------------------------------------------------+
|i1 : myoptions = hashTable {"fill"=>"black"}                      |
|                                                                  |
|o1 = HashTable{fill => black}                                     |
|                                                                  |
|o1 : HashTable                                                    |
+------------------------------------------------------------------+
|i2 : svgObject(point(20,30),myoptions)                            |
|                                                                  |
|o2 = <circle cx="20" cy="30" r="2" stroke="black" fill-opacity="1"|
|     stroke-width="0" fill="black" stroke-opacity="1" />          |
+------------------------------------------------------------------+

Ways to use this method:
========================

  * svgObject(Point2D,HashTable), --
    create the string describing a point in SVG

svgObject(Polygon2D,HashTable) -- create the string describing a circle in SVG
******************************************************************************

Synopsis
========

  * Function: svgObject,
  * Usage:
        svgObject(mypolygon,myoptions)
  * Inputs:
      * mypolygon, an instance of the type Polygon2D,
      * myoptions, a hash table (Macaulay2Doc), giving values
        to some options (see defaultSVGOptions).
  * Outputs:
      * a string (Macaulay2Doc), containing the description of
        the polygon in SVG

Description
===========

The options that are not given in myoptions are set at the default values
contained in defaultSVGOptions.

+---------------------------------------------------------------------------+
|i1 : myoptions = hashTable {"fill"=>"black"}                               |
|                                                                           |
|o1 = HashTable{fill => black}                                              |
|                                                                           |
|o1 : HashTable                                                             |
+---------------------------------------------------------------------------+
|i2 : svgObject(polygon({point(20,30),point(40,50),point(10,40)}),myoptions)|
|                                                                           |
|o2 = <polygon points="20,30 40,50 10,40 " stroke="black" fill-opacity="1"  |
|     stroke-width="1" fill="black" stroke-opacity="1" />                   |
+---------------------------------------------------------------------------+

Ways to use this method:
========================

  * svgObject(Polygon2D,HashTable),
    -- create the string describing a circle in SVG

svgObject(Segment2D,HashTable) -- create the string describing a line segment in SVG
************************************************************************************

Synopsis
========

  * Function: svgObject,
  * Usage:
        svgObject(mysegment,myoptions)
  * Inputs:
      * mysegment, an instance of the type Segment2D,
      * myoptions, a hash table (Macaulay2Doc), giving values
        to some options (see defaultSVGOptions).
  * Outputs:
      * a string (Macaulay2Doc), containing the description of
        the segment in SVG

Description
===========

The options that are not given in myoptions are set at the default values
contained in defaultSVGOptions.

+--------------------------------------------------------------------------+
|i1 : myoptions = hashTable {"stroke-width"=>"2"}                          |
|                                                                          |
|o1 = HashTable{stroke-width => 2}                                         |
|                                                                          |
|o1 : HashTable                                                            |
+--------------------------------------------------------------------------+
|i2 : svgObject(segment(point(20,30),point(40,50)),myoptions)              |
|                                                                          |
|o2 = <line x1="20" y1="30" x2="40" y2="50" stroke="black" stroke-width="2"|
|     stroke-opacity="1" />                                                |
+--------------------------------------------------------------------------+

Ways to use this method:
========================

  * svgObject(Segment2D,HashTable),
    -- create the string describing a line segment in SVG

svgObject(TextTag,HashTable) -- create the string describing a circle in SVG
****************************************************************************

Synopsis
========

  * Function: svgObject,
  * Usage:
        svgObject(mytext,myoptions)
  * Inputs:
      * mytext, an instance of the type TextTag,
      * myoptions, a hash table (Macaulay2Doc), giving values
        to some options (see defaultSVGOptions).
  * Outputs:
      * a string (Macaulay2Doc), containing the description of
        the text tag in SVG

Description
===========

The options that are not given in myoptions are set at the default values
contained in defaultSVGOptions.

+---------------------------------------------------------------------------+
|i1 : myoptions = hashTable {"font-family"=>"verdana"}                      |
|                                                                           |
|o1 = HashTable{font-family => verdana}                                     |
|                                                                           |
|o1 : HashTable                                                             |
+---------------------------------------------------------------------------+
|i2 : svgObject(textTag(point(20,30),"Hello world"),myoptions)              |
|                                                                           |
|o2 = <text id="TextElement" x="20" y="30" stroke-width="0" fill-opacity="1"|
|     font-family="verdana" fill="black" stroke-opacity="0" stroke="black"  |
|     font-size="12" >Hello world</text>                                    |
+---------------------------------------------------------------------------+

Ways to use this method:
========================

  * svgObject(TextTag,HashTable), --
    create the string describing a circle in SVG

svgPicture -- create an SVG picture
***********************************

Ways to use svgPicture :
========================

  * svgPicture(Picture) -- create an SVG
    picture from a Picture object
  * svgPicture(Picture,String), --
    create an SVG picture from a Picture object and store it in a file
  * svgPicture(Picture,ZZ,ZZ), --
    create an SVG picture from a Picture object
  * svgPicture(Picture,ZZ,ZZ,String)
    -- create an SVG picture from a
    Picture object and store it in a file

For the programmer
==================

The object svgPicture, is a method function (Macaulay2Doc).

svgPicture(Picture) -- create an SVG picture from a Picture object
******************************************************************

Synopsis
========

  * Function: svgPicture,
  * Usage:
        svgPicture(mypict)
  * Inputs:
      * mypict, an instance of the type Picture,
  * Outputs:
      * a string (Macaulay2Doc), containing the SVG picture

Description
===========

The heading used is stored in defaultSVGHeading, and
the SVG opening bracket (resp. closing) used is stored in
defaultSVGOpening, (resp. see defaultSVGClosing).

+-----------------------------------------------------------------------------+
|i1 : myfgp1 = formatGraphicPrimitives({point(20,30)},hashTable {"fill        |
|                                                                             |
|o1 = FormattedGraphicPrimitives{{Point2D{20, 30}}, HashTable{fill =>         |
|                                                                             |
|o1 : FormattedGraphicPrimitives                                              |
|-----------------------------------------------------------------------------|
|"=>"black"})                                                                 |
|                                                                             |
|black}}                                                                      |
+-----------------------------------------------------------------------------+
|i2 : myfgp2 = formatGraphicPrimitives({circle(point(20,30),10),point(50,60   |
|                                                                             |
|o2 = FormattedGraphicPrimitives{{Circle{Point2D{20, 30}, 10}, Point2D{50,    |
|                                                                             |
|                                                                             |
|o2 : FormattedGraphicPrimitives                                              |
|-----------------------------------------------------------------------------|
|)},hashTable {"fill"=>"red","fill-opacity"=>"0.2"})                          |
|                                                                             |
|60}}, HashTable{fill => red        }}                                        |
|                fill-opacity => 0.2                                          |
+-----------------------------------------------------------------------------+
|i3 : mypict = picture {myfgp1,myfgp2}                                        |
|                                                                             |
|o3 = Picture{FormattedGraphicPrimitives{{Point2D{20, 30}}, HashTable{fill => |
|                                                                             |
|                                                                             |
|o3 : Picture                                                                 |
|-----------------------------------------------------------------------------|
|black}}, FormattedGraphicPrimitives{{Circle{Point2D{20, 30}, 10}, Point2D{50,|
|                                                                             |
|-----------------------------------------------------------------------------|
|60}}, HashTable{fill => red        }}}                                       |
|                fill-opacity => 0.2                                          |
+-----------------------------------------------------------------------------+
|i4 : svgPicture(mypict)                                                      |
|                                                                             |
|o4 = <?xml version="1.0" standalone="no"?>                                   |
|     <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"                          |
|     "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">                     |
|                                                                             |
|     <svg width="150" height="160" version="1.1"                             |
|     xmlns="http://www.w3.org/2000/svg">                                     |
|                                                                             |
|     <circle cx="20" cy="30" r="2" stroke="black" fill-opacity="1" stroke-wid|
|                                                                             |
|     <circle cx="20" cy="30" r="10" stroke="black" fill-opacity="0.2" stroke-|
|                                                                             |
|     <circle cx="50" cy="60" r="2" stroke="black" fill-opacity="0.2" stroke-w|
|                                                                             |
|     </svg>                                                                  |
|-----------------------------------------------------------------------------|
|th="0" fill="black" stroke-opacity="1" />                                    |
|                                                                             |
|width="1" fill="red" stroke-opacity="1" />                                   |
|                                                                             |
|idth="0" fill="red" stroke-opacity="1" />                                    |
+-----------------------------------------------------------------------------+

See also
========

  * svgPicture(Picture,ZZ,ZZ), --
    create an SVG picture from a Picture object
  * svgPicture(Picture,ZZ,ZZ,String)
    -- create an SVG picture from a
    Picture object and store it in a file
  * svgPicture(Picture,String), --
    create an SVG picture from a Picture object and store it in a file
  * pgfPicture(Picture) -- create a pgf picture
    from a Picture object

Ways to use this method:
========================

  * svgPicture(Picture) -- create an SVG
    picture from a Picture object

svgPicture(Picture,String) -- create an SVG picture from a Picture object and store it in a file
************************************************************************************************

Synopsis
========

  * Function: svgPicture,
  * Usage:
        svgPicture(mypict,filename)
  * Inputs:
      * mypict, an instance of the type Picture,
      * filename, a string (Macaulay2Doc), the name of the
        storage file

Description
===========

If the filename is without a .svg suffix, it will be added.

The heading used is stored in defaultSVGHeading, and
the SVG opening bracket (resp. closing) used is stored in
defaultSVGOpening, (resp. see defaultSVGClosing).

See also
========

  * svgPicture(Picture) -- create an SVG
    picture from a Picture object
  * pgfPicture(Picture) -- create a pgf picture
    from a Picture object

Ways to use this method:
========================

  * svgPicture(Picture,String), --
    create an SVG picture from a Picture object and store it in a file

svgPicture(Picture,ZZ,ZZ) -- create an SVG picture from a Picture object
************************************************************************

Synopsis
========

  * Function: svgPicture,
  * Usage:
        svgPicture(mypict,w,h)
  * Inputs:
      * mypict, an instance of the type Picture,
      * w, an integer (Macaulay2Doc), the width of the picture
      * h, an integer (Macaulay2Doc), the height of the picture
  * Outputs:
      * a string (Macaulay2Doc), containing the SVG picture

Description
===========

The heading used is stored in defaultSVGHeading, and
the SVG opening bracket (resp. closing) used is stored in
defaultSVGOpening, (resp. see defaultSVGClosing).

+-----------------------------------------------------------------------------+
|i1 : myfgp1 = formatGraphicPrimitives({point(20,30)},hashTable {"fill        |
|                                                                             |
|o1 = FormattedGraphicPrimitives{{Point2D{20, 30}}, HashTable{fill =>         |
|                                                                             |
|o1 : FormattedGraphicPrimitives                                              |
|-----------------------------------------------------------------------------|
|"=>"black"})                                                                 |
|                                                                             |
|black}}                                                                      |
+-----------------------------------------------------------------------------+
|i2 : myfgp2 = formatGraphicPrimitives({circle(point(20,30),10),point(50,60   |
|                                                                             |
|o2 = FormattedGraphicPrimitives{{Circle{Point2D{20, 30}, 10}, Point2D{50,    |
|                                                                             |
|                                                                             |
|o2 : FormattedGraphicPrimitives                                              |
|-----------------------------------------------------------------------------|
|)},hashTable {"fill"=>"red","fill-opacity"=>"0.2"})                          |
|                                                                             |
|60}}, HashTable{fill => red        }}                                        |
|                fill-opacity => 0.2                                          |
+-----------------------------------------------------------------------------+
|i3 : mypict = picture {myfgp1,myfgp2}                                        |
|                                                                             |
|o3 = Picture{FormattedGraphicPrimitives{{Point2D{20, 30}}, HashTable{fill => |
|                                                                             |
|                                                                             |
|o3 : Picture                                                                 |
|-----------------------------------------------------------------------------|
|black}}, FormattedGraphicPrimitives{{Circle{Point2D{20, 30}, 10}, Point2D{50,|
|                                                                             |
|-----------------------------------------------------------------------------|
|60}}, HashTable{fill => red        }}}                                       |
|                fill-opacity => 0.2                                          |
+-----------------------------------------------------------------------------+
|i4 : svgPicture(mypict,100,100)                                              |
|                                                                             |
|o4 = <?xml version="1.0" standalone="no"?>                                   |
|     <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"                          |
|     "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">                     |
|                                                                             |
|     <svg width="100" height="100" version="1.1"                             |
|     xmlns="http://www.w3.org/2000/svg">                                     |
|                                                                             |
|     <circle cx="20" cy="30" r="2" stroke="black" fill-opacity="1" stroke-wid|
|                                                                             |
|     <circle cx="20" cy="30" r="10" stroke="black" fill-opacity="0.2" stroke-|
|                                                                             |
|     <circle cx="50" cy="60" r="2" stroke="black" fill-opacity="0.2" stroke-w|
|                                                                             |
|     </svg>                                                                  |
|-----------------------------------------------------------------------------|
|th="0" fill="black" stroke-opacity="1" />                                    |
|                                                                             |
|width="1" fill="red" stroke-opacity="1" />                                   |
|                                                                             |
|idth="0" fill="red" stroke-opacity="1" />                                    |
+-----------------------------------------------------------------------------+

See also
========

  * svgPicture(Picture) -- create an SVG
    picture from a Picture object
  * svgPicture(Picture,ZZ,ZZ,String)
    -- create an SVG picture from a
    Picture object and store it in a file
  * svgPicture(Picture,String), --
    create an SVG picture from a Picture object and store it in a file
  * pgfPicture(Picture) -- create a pgf picture
    from a Picture object

Ways to use this method:
========================

  * svgPicture(Picture,ZZ,ZZ), --
    create an SVG picture from a Picture object

svgPicture(Picture,ZZ,ZZ,String) -- create an SVG picture from a Picture object and store it in a file
******************************************************************************************************

Synopsis
========

  * Function: svgPicture,
  * Usage:
        svgPicture(mypict,w,h,filename)
  * Inputs:
      * mypict, an instance of the type Picture,
      * w, an integer (Macaulay2Doc), the width of the SVG picture
      * h, an integer (Macaulay2Doc), the height of the SVG picture
      * filename, a string (Macaulay2Doc), the name of the
        storage file

Description
===========

If the filename is without a .svg suffix, it will be added.

The heading used is stored in defaultSVGHeading, and
the SVG opening bracket (resp. closing) used is stored in
defaultSVGOpening, (resp. see defaultSVGClosing).

See also
========

  * svgPicture(Picture) -- create an SVG
    picture from a Picture object
  * pgfPicture(Picture) -- create a pgf picture
    from a Picture object

Ways to use this method:
========================

  * svgPicture(Picture,ZZ,ZZ,String)
    -- create an SVG picture from a
    Picture object and store it in a file

TextTag -- the class of a text tag
**********************************

Methods that use an object of class TextTag :
=============================================

  * pgfObject(TextTag,HashTable), --
    create the string describing a circle in pgf
  * pictureZone(TextTag) -- find the zone that
    contains the tag
  * svgObject(TextTag,HashTable), --
    create the string describing a circle in SVG

For the programmer
==================

The object TextTag, is a type (Macaulay2Doc), with
ancestor classes GraphicPrimitive, < BasicList (Macaulay2Doc)
< Thing (Macaulay2Doc).

textTag -- create a text tag at a position
******************************************

Ways to use textTag :
=====================

  * textTag(Point2D,String) -- a text tag
    at a position
  * textTag(Point3D,String) -- a text tag
    at a position

For the programmer
==================

The object textTag, is a method function (Macaulay2Doc).

textTag(Point2D,String) -- a text tag at a position
***************************************************

Synopsis
========

  * Function: textTag,
  * Usage:
        textTag(p,s)
  * Inputs:
      * p, an instance of the type Point2D, the position of the
        tag
      * s, a string (Macaulay2Doc), the text of the tag
  * Outputs:
      * an instance of the type TextTag, the TextTag with text
        s at position p

Description
===========

+-------------------------------------+
|i1 : textTag(point(2.1, 3.),"My Tag")|
|                                     |
|o1 = TextTag{Point2D{2, 3}, My Tag}  |
|                                     |
|o1 : TextTag                         |
+-------------------------------------+

Ways to use this method:
========================

  * textTag(Point2D,String) -- a text tag
    at a position

textTag(Point3D,String) -- a text tag at a position
***************************************************

Synopsis
========

  * Function: textTag,
  * Usage:
        textTag(p,s)
  * Inputs:
      * p, an instance of the type Point3D, the position of the
        tag
      * s, a string (Macaulay2Doc), the text of the tag
  * Outputs:
      * an instance of the type TextTag, the TextTag with text
        s at position p

Description
===========

+----------------------------------------+
|i1 : textTag(point(2.1, 3.,4.),"My Tag")|
|                                        |
|o1 = TextTag{Point3D{2, 3, 4}, My Tag}  |
|                                        |
|o1 : TextTag                            |
+----------------------------------------+

Ways to use this method:
========================

  * textTag(Point3D,String) -- a text tag
    at a position

viewPicture -- view a picture in a browser
******************************************

Ways to use viewPicture :
=========================

  * viewPicture(String) -- view a Picture in a
    browser

For the programmer
==================

The object viewPicture, is a method function (Macaulay2Doc).

viewPicture(String) -- view a Picture in a browser
**************************************************

Synopsis
========

  * Function: viewPicture,
  * Usage:
        viewPicture(filename)
  * Inputs:
      * filename, a string (Macaulay2Doc), the name of the file
        (possibly with path) containing the picture

Caveat
======

For the moment, it only works with SVG pictures and browsers supporting them.

Ways to use this method:
========================

  * viewPicture(String) -- view a Picture in a
    browser