|
D.13.6.22 texDrawTropical
Procedure from library tropical.lib (see tropical_lib).
- Usage:
- texDrawTropical(graph[,#]); graph list, # optional list
- Assume:
- graph is the output of tropicalCurve
- Return:
- string, the texdraw code of the tropical plane curve encoded by graph
- Note:
- - if the list # is non-empty, the first entry should be a string;
if this string is 'max', then the tropical curve is considered
with respect to the maximum
- the procedure computes a scalefactor for the texdraw command which
should help to display the curve in the right way; this may,
however, be a bad idea if several texDrawTropical outputs are
put together to form one image; the scalefactor can be prescribed
by the further optional entry of type poly
- one can add a string as last opional argument to the list #;
it can be used to insert further texdraw commands (e.g. to have
a lighter image as when called from inside conicWithTangents);
- the list # is optional and may as well be empty
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=x+y+x2y+xy2+1/t*xy;
list graph=tropicalCurve(f);
// compute the texdraw code of the tropical curve defined by f
texDrawTropical(graph);
==>
==>
==> \setgray 0.6
==>
==>
==> \relunitscale 6
==> \move (-1 -1) \fcir f:0 r:0.03
==> \move (-1 -1) \lvec (-1 1)
==> \move (-1 -1) \lvec (1 -1)
==> \move (-1 -1) \rlvec (-0.5 -0.5)
==> \move (-1 1) \fcir f:0 r:0.03
==> \move (-1 1) \lvec (1 1)
==> \move (-1 1) \rlvec (-0.5 0.5)
==> \move (1 -1) \fcir f:0 r:0.03
==> \move (1 -1) \lvec (1 1)
==> \move (1 -1) \rlvec (0.5 -0.5)
==> \move (1 1) \fcir f:0 r:0.03
==> \move (1 1) \rlvec (0.5 0.5)
==>
==> %% HERE STARTS THE CODE FOR THE LATTICE
==> \move (-1 -1) \fcir f:0.8 r:0.01
==> \move (-1 0) \fcir f:0.8 r:0.01
==> \move (-1 1) \fcir f:0.8 r:0.01
==> \move (0 -1) \fcir f:0.8 r:0.01
==> \move (0 0) \fcir f:0.8 r:0.01
==> \move (0 1) \fcir f:0.8 r:0.01
==> \move (1 -1) \fcir f:0.8 r:0.01
==> \move (1 0) \fcir f:0.8 r:0.01
==> \move (1 1) \fcir f:0.8 r:0.01
==> %% HERE ENDS THE CODE FOR THE LATTICE
==>
// compute the texdraw code again, but set the scalefactor to 1
texDrawTropical(graph,"",1);
==>
==>
==> \setgray 0.6
==>
==>
==> \relunitscale 6
==> \move (-1 -1) \fcir f:0 r:0.03
==> \move (-1 -1) \lvec (-1 1)
==> \move (-1 -1) \lvec (1 -1)
==> \move (-1 -1) \rlvec (-0.5 -0.5)
==> \move (-1 1) \fcir f:0 r:0.03
==> \move (-1 1) \lvec (1 1)
==> \move (-1 1) \rlvec (-0.5 0.5)
==> \move (1 -1) \fcir f:0 r:0.03
==> \move (1 -1) \lvec (1 1)
==> \move (1 -1) \rlvec (0.5 -0.5)
==> \move (1 1) \fcir f:0 r:0.03
==> \move (1 1) \rlvec (0.5 0.5)
==>
==> %% HERE STARTS THE CODE FOR THE LATTICE
==> \move (-1 -1) \fcir f:0.8 r:0.01
==> \move (-1 0) \fcir f:0.8 r:0.01
==> \move (-1 1) \fcir f:0.8 r:0.01
==> \move (0 -1) \fcir f:0.8 r:0.01
==> \move (0 0) \fcir f:0.8 r:0.01
==> \move (0 1) \fcir f:0.8 r:0.01
==> \move (1 -1) \fcir f:0.8 r:0.01
==> \move (1 0) \fcir f:0.8 r:0.01
==> \move (1 1) \fcir f:0.8 r:0.01
==> %% HERE ENDS THE CODE FOR THE LATTICE
==>
|
|