 LIB "tropical.lib";
==> Welcome to polymake version
==> Copyright (c) 19972015
==> Ewgenij Gawrilow, Michael Joswig (TU Darmstadt)
==> http://www.polymake.org
ring r=(0,t),(x,y),dp;
// the input consists of a list of five points in the plane over Q(t)
list points=list(1/t2,t),list(1/t,t2),list(1,1),list(t,1/t2),list(t2,1/t);
list conic=conicWithTangents(points);
// conic[1] is the list of the given five points
conic[1];
==> [1]:
==> [1]:
==> 1/(t2)
==> [2]:
==> (t)
==> [2]:
==> [1]:
==> 1/(t)
==> [2]:
==> (t2)
==> [3]:
==> [1]:
==> 1
==> [2]:
==> 1
==> [4]:
==> [1]:
==> (t)
==> [2]:
==> 1/(t2)
==> [5]:
==> [1]:
==> (t2)
==> [2]:
==> 1/(t)
// conic[2] is the equation of the conic f passing through the five points
conic[2];
==> (2t3)*x2+(t6+t5+2t4+t3+2t2+t1)*xy+(2t3)*y2+(t52t43t32t2t)*x+(t52\
t43t32t2t)*y+(t6+t5+2t4+t3+2t2+t+1)
// conic[3] is a list containing the equations of the tangents
// through the five points
conic[3];
==> [1]:
==> (t7+t6+t5t4t3t2+2t)*x+(t7+t62t5+2t2+t1)/(t2)*y+(t7+t5t4+t3t2\
1)/(t)
==> [2]:
==> (t8+t7+2t62t3+t2t)*x+(2t6t5t4t3+t2+t1)/(t)*y+(t7t5+t4t3+t2+1\
)
==> [3]:
==> (t6+2t31)*x+(t6+2t31)*y+(2t64t3+2)
==> [4]:
==> (t7+t62t5+2t2+t1)/(t2)*x+(t7+t6+t5t4t3t2+2t)*y+(t7+t5t4+t3t2\
1)/(t)
==> [5]:
==> (2t6t5t4t3+t2+t1)/(t)*x+(t8+t7+2t62t3+t2t)*y+(t7t5+t4t3+t2+1\
)
// conic[4] is an ideal representing the tropicalisation of the conic f
conic[4];
==> [1]:
==> 2*x+3
==> [2]:
==> x+y
==> [3]:
==> 2*y+3
==> [4]:
==> x+1
==> [5]:
==> y+1
==> [6]:
==> 0
// conic[5] is a list containing the tropicalisation
// of the five tangents in conic[3]
conic[5];
==> [1]:
==> [1]:
==> x+1
==> [2]:
==> y2
==> [3]:
==> 1
==> [2]:
==> [1]:
==> x+1
==> [2]:
==> y1
==> [3]:
==> 0
==> [3]:
==> [1]:
==> x
==> [2]:
==> y
==> [3]:
==> 0
==> [4]:
==> [1]:
==> x2
==> [2]:
==> y+1
==> [3]:
==> 1
==> [5]:
==> [1]:
==> x1
==> [2]:
==> y+1
==> [3]:
==> 0
// conic[6] is a list containing the vertices of the tropical conic
conic[6];
==> [1]:
==> [1]:
==> 2
==> [2]:
==> 1
==> [2]:
==> [1]:
==> 1
==> [2]:
==> 2
==> [3]:
==> [1]:
==> 1
==> [2]:
==> 1
==> [4]:
==> [1]:
==> 1
==> [2]:
==> 1
// conic[7] is a list containing the vertices of the five tangents
conic[7];
==> [1]:
==> [1]:
==> [1]:
==> 2
==> [2]:
==> 1
==> [2]:
==> [1]:
==> [1]:
==> 1
==> [2]:
==> 1
==> [3]:
==> [1]:
==> [1]:
==> 0
==> [2]:
==> 0
==> [4]:
==> [1]:
==> [1]:
==> 1
==> [2]:
==> 2
==> [5]:
==> [1]:
==> [1]:
==> 1
==> [2]:
==> 1
// conic[8] contains the latex code to draw the tropical conic and
// its tropicalised tangents; it can written in a file, processed and
// displayed via kghostview
write(":w /tmp/conic.tex",conic[8]);
system("sh","cd /tmp; latex /tmp/conic.tex; dvips /tmp/conic.dvi o;
kghostview conic.ps &");
==> This is pdfTeX, Version 3.141592652.61.40.15 (TeX Live 2014) (preloaded\
format=latex)
==> restricted \write18 enabled.
==> entering extended mode
==> (/tmp/conic.tex
==> LaTeX2e <2014/05/01>
==> Babel <3.9l> and hyphenation patterns for 2 languages loaded.
==> (/usr/share/texmfdist/tex/latex/amscls/amsart.cls
==> Document Class: amsart 2009/07/02 v2.20.1
==> (/usr/share/texmfdist/tex/latex/amsmath/amsmath.sty
==> For additional information on amsmath, use the `?' option.
==> (/usr/share/texmfdist/tex/latex/amsmath/amstext.sty
==> (/usr/share/texmfdist/tex/latex/amsmath/amsgen.sty))
==> (/usr/share/texmfdist/tex/latex/amsmath/amsbsy.sty)
==> (/usr/share/texmfdist/tex/latex/amsmath/amsopn.sty))
==> (/usr/share/texmfdist/tex/latex/amsfonts/umsa.fd)
==> (/usr/share/texmfdist/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 conic.log.
==> This is dvips(k) 5.994 Copyright 2014 Radical Eye Software (www.radicaley\
e.com)
==> dvips: DVI file can't be opened: /tmp/conic.dvi: No such file or director\
y
==> 0sh: Zeile 1: kghostview: Kommando nicht gefunden.
==>
// with an optional argument the same information for the dual conic is computed
// and saved in conic[9]
conic=conicWithTangents(points,1);
conic[9][2]; // the equation of the dual conic
==> (t66t5+11t46t3+t2)*x2+(4t8+8t72t64t5+6t44t32t2+8t4)*xy+(t66t5+11\
t46t3+t2)*y2+(2t7+2t6+4t56t4+4t3+2t22t)*x+(2t7+2t6+4t56t4+4t3+2t22\
t)*y+(t84t7+2t6+8t513t4+8t3+2t24t+1)
==> > fgets() failed with errno 9
