Home Online Manual
Top
Back: drawTropicalCurve
Forward: tropicalJInvariant
FastBack:
FastForward:
Up: tropical_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.13.4.7 drawNewtonSubdivision

Procedure from library tropical.lib (see tropical_lib).

Usage:
drawTropicalCurve(f[,#]); f poly, # optional list

Assume:
f is list of linear polynomials of the form ax+by+c with integers a, b and a rational number c representing a tropical Laurent polynomial defining a tropical plane curve;
alternatively f can be a polynomial in Q(t)[x,y] defining a tropical plane curve via the valuation map;
the basering must have a global monomial ordering, two variables and up to one parameter!

Return:
NONE

Note:
- the procedure creates the files /tmp/newtonsubdivisionNUMBER.tex, and /tmp/newtonsubdivisionNUMBER.ps, where NUMBER is a random four digit integer;
moreover it desplays the tropical curve defined by f via xdg-open; if you wish to remove all these files from /tmp, call the procedure cleanTmp;
if # is empty, then the tropical curve is computed w.r.t. minimum, if #[1] is the string 'max', then it is computed w.r.t. maximum
- note that lattice points in the Newton subdivision which are black correspond to markings of the marked subdivision, while lattice points in grey are not marked

Example:
 
LIB "tropical.lib";
==> Welcome to polymake version
==> Copyright (c) 1997-2015
==> Ewgenij Gawrilow, Michael Joswig (TU Darmstadt)
==> http://www.polymake.org
ring r=(0,t),(x,y),dp;
poly f=t*(x3+y3+1)+1/t*(x2+y2+x+y+x2y+xy2)+1/t2*xy;
// the command drawTropicalCurve(f) computes the graph of the tropical curve
// given by f and displays a post script image, provided you have xdg-open
drawNewtonSubdivision(f);
==> This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded\
    format=latex)
==>  restricted \write18 enabled.
==> entering extended mode
==> (/tmp/newtonsubdivision6034.tex
==> LaTeX2e <2017/01/01> patch level 3
==> Babel <3.10> and hyphenation patterns for 3 language(s) loaded.
==> (/usr/share/texmf-dist/tex/latex/amscls/amsart.cls
==> Document Class: amsart 2015/03/04 v2.20.2
==> (/usr/share/texmf-dist/tex/latex/amsmath/amsmath.sty
==> For additional information on amsmath, use the `?' option.
==> (/usr/share/texmf-dist/tex/latex/amsmath/amstext.sty
==> (/usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty))
==> (/usr/share/texmf-dist/tex/latex/amsmath/amsbsy.sty)
==> (/usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty))
==> (/usr/share/texmf-dist/tex/latex/amsfonts/umsa.fd)
==> (/usr/share/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
==> 
==> ! LaTeX Error: File `texdraw.sty' not found.
==> 
==> Type X to quit or <RETURN> to proceed,
==> or enter new name. (Default extension: sty)
==> 
==> Enter file name: warning: kpathsea: $.sty: Unrecognized variable construc\
   t `$.'.
==> 
==> ! LaTeX Error: File `$.sty' not found.
==> 
==> Type X to quit or <RETURN> to proceed,
==> or enter new name. (Default extension: sty)
==> 
==> Enter file name: 
==> ! Emergency stop.
==> <read *> 
==>          
==> l.3 \begin
==>           {document}^^M
==> No pages of output.
==> Transcript written on newtonsubdivision6034.log.
==> This is dvips(k) 5.997 Copyright 2017 Radical Eye Software (www.radicaley\
   e.com)
==> dvips: DVI file can't be opened: /tmp/newtonsubdivision6034.dvi: No such \
   file or directory
==> rm: das Entfernen von 'newtonsubdivision6034.aux' ist nicht möglich: Dat\
   ei oder Verzeichnis nicht gefunden
==> rm: das Entfernen von 'newtonsubdivision6034.ps?' ist nicht möglich: Dat\
   ei oder Verzeichnis nicht gefunden
==> rm: das Entfernen von 'newtonsubdivision6034.dvi' ist nicht möglich: Dat\
   ei oder Verzeichnis nicht gefunden
==> 0
==> sh: xdg-open: Kommando nicht gefunden.
// we can instead apply the procedure to a tropical polynomial
poly g=x+y+x2y+xy2+1/t*xy;
list tropical_g=tropicalise(g);
tropical_g;
==> [1]:
==>    2*x+y
==> [2]:
==>    x+2*y
==> [3]:
==>    x+y-1
==> [4]:
==>    x
==> [5]:
==>    y
drawNewtonSubdivision(tropical_g);
==> This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded\
    format=latex)
==>  restricted \write18 enabled.
==> entering extended mode
==> (/tmp/newtonsubdivision9641.tex
==> LaTeX2e <2017/01/01> patch level 3
==> Babel <3.10> and hyphenation patterns for 3 language(s) loaded.
==> (/usr/share/texmf-dist/tex/latex/amscls/amsart.cls
==> Document Class: amsart 2015/03/04 v2.20.2
==> (/usr/share/texmf-dist/tex/latex/amsmath/amsmath.sty
==> For additional information on amsmath, use the `?' option.
==> (/usr/share/texmf-dist/tex/latex/amsmath/amstext.sty
==> (/usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty))
==> (/usr/share/texmf-dist/tex/latex/amsmath/amsbsy.sty)
==> (/usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty))
==> (/usr/share/texmf-dist/tex/latex/amsfonts/umsa.fd)
==> (/usr/share/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
==> 
==> ! LaTeX Error: File `texdraw.sty' not found.
==> 
==> Type X to quit or <RETURN> to proceed,
==> or enter new name. (Default extension: sty)
==> 
==> Enter file name: 
==> ! Emergency stop.
==> <read *> 
==>          
==> l.3 \begin
==>           {document}^^M
==> No pages of output.
==> Transcript written on newtonsubdivision9641.log.
==> This is dvips(k) 5.997 Copyright 2017 Radical Eye Software (www.radicaley\
   e.com)
==> dvips: DVI file can't be opened: /tmp/newtonsubdivision9641.dvi: No such \
   file or directory
==> rm: das Entfernen von 'newtonsubdivision9641.aux' ist nicht möglich: Dat\
   ei oder Verzeichnis nicht gefunden
==> rm: das Entfernen von 'newtonsubdivision9641.ps?' ist nicht möglich: Dat\
   ei oder Verzeichnis nicht gefunden
==> rm: das Entfernen von 'newtonsubdivision9641.dvi' ist nicht möglich: Dat\
   ei oder Verzeichnis nicht gefunden
==> 0
==> sh: xdg-open: Kommando nicht gefunden.