Home Online Manual
Back: tropicalCurve
Forward: drawNewtonSubdivision
FastBack: realizationMatroids_lib
FastForward: Miscellaneous libraries
Up: tropical_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.13.3.6 drawTropicalCurve

Procedure from library tropical.lib (see tropical_lib).

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

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!


- the procedure creates the files /tmp/tropicalcurveNUMBER.tex and /tmp/tropicalcurveNUMBER.ps, where NUMBER is a random four digit integer;
moreover it displays the tropical curve via kghostview; if you wish to remove all these files from /tmp,
call the procedure cleanTmp
- edges with multiplicity greater than one carry this multiplicity
- 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
- if the last optional argument is 'onlytexfile' then only the latex file is produced; this option should be used if kghostview is not installed on your system
- 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

LIB "tropical.lib";
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 kghostview
// we can instead apply the procedure to a tropical polynomial and use "maximum"
poly g=1/t3*(x7+y7+1)+t3*(x4+y4+x2+y2+x3y+xy3)+t21*x2y2;
list tropical_g=tropicalise(g);