# Singular          #### D.13.4.11 conicWithTangents

Procedure from library tropical.lib (see tropical_lib).

Usage:
conicWithTangents(points[,#]); points list, # optional list

Assume:
points is a list of five points in the plane over K(t)

Return:
list, l = the list points of the five given points
l = the conic f passing through the five points
l = list of equations of tangents to f in the given points
l = ideal, tropicalisation of f (i.e. list of linear forms)
l = a list of the tropicalisation of the tangents
l = a list containing the vertices of the tropical conic f
l = a list containing lists with vertices of the tangents
l = a string which contains the latex-code to draw the tropical conic and its tropicalised tangents
l = if # is non-empty, this is the same data for the dual conic and the points dual to the computed tangents

Note:
the points must be generic, i.e. no three on a line

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; // 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 is the list of the given five points conic; ==> : ==> : ==> 1/(t2) ==> : ==> (t) ==> : ==> : ==> 1/(t) ==> : ==> (t2) ==> : ==> : ==> 1 ==> : ==> 1 ==> : ==> : ==> (t) ==> : ==> 1/(t2) ==> : ==> : ==> (t2) ==> : ==> 1/(t) // conic is the equation of the conic f passing through the five points conic; ==> (2t3)*x2+(-t6+t5+2t4+t3+2t2+t-1)*xy+(2t3)*y2+(-t5-2t4-3t3-2t2-t)*x+(-t5-2\ t4-3t3-2t2-t)*y+(t6+t5+2t4+t3+2t2+t+1) // conic is a list containing the equations of the tangents // through the five points conic; ==> : ==> (-t7+t6+t5-t4-t3-t2+2t)*x+(-t7+t6-2t5+2t2+t-1)/(t2)*y+(t7+t5-t4+t3-t2-\ 1)/(t) ==> : ==> (-t8+t7+2t6-2t3+t2-t)*x+(2t6-t5-t4-t3+t2+t-1)/(t)*y+(-t7-t5+t4-t3+t2+1\ ) ==> : ==> (-t6+2t3-1)*x+(-t6+2t3-1)*y+(2t6-4t3+2) ==> : ==> (-t7+t6-2t5+2t2+t-1)/(t2)*x+(-t7+t6+t5-t4-t3-t2+2t)*y+(t7+t5-t4+t3-t2-\ 1)/(t) ==> : ==> (2t6-t5-t4-t3+t2+t-1)/(t)*x+(-t8+t7+2t6-2t3+t2-t)*y+(-t7-t5+t4-t3+t2+1\ ) // conic is an ideal representing the tropicalisation of the conic f conic; ==> : ==> 2*x+3 ==> : ==> x+y ==> : ==> 2*y+3 ==> : ==> x+1 ==> : ==> y+1 ==> : ==> 0 // conic is a list containing the tropicalisation // of the five tangents in conic conic; ==> : ==> : ==> x+1 ==> : ==> y-2 ==> : ==> -1 ==> : ==> : ==> x+1 ==> : ==> y-1 ==> : ==> 0 ==> : ==> : ==> x ==> : ==> y ==> : ==> 0 ==> : ==> : ==> x-2 ==> : ==> y+1 ==> : ==> -1 ==> : ==> : ==> x-1 ==> : ==> y+1 ==> : ==> 0 // conic is a list containing the vertices of the tropical conic conic; ==> : ==> : ==> -2 ==> : ==> 1 ==> : ==> : ==> 1 ==> : ==> -2 ==> : ==> : ==> -1 ==> : ==> 1 ==> : ==> : ==> 1 ==> : ==> -1 // conic is a list containing the vertices of the five tangents conic; ==> : ==> : ==> : ==> -2 ==> : ==> 1 ==> : ==> : ==> : ==> -1 ==> : ==> 1 ==> : ==> : ==> : ==> 0 ==> : ==> 0 ==> : ==> : ==> : ==> 1 ==> : ==> -2 ==> : ==> : ==> : ==> 1 ==> : ==> -1 // conic contains the latex code to draw the tropical conic and // its tropicalised tangents; it can written in a file, processed and // displayed via xdg-open write(":w /tmp/conic.tex",conic); system("sh","cd /tmp; latex /tmp/conic.tex; dvips /tmp/conic.dvi -o; xdg-open conic.ps &"); ==> This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded\ format=latex) ==> restricted \write18 enabled. ==> entering extended mode ==> (/tmp/conic.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 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 to proceed, ==> or enter new name. (Default extension: sty) ==> ==> Enter file name: ==> ! Emergency stop. ==> ==> ==> l.3 \begin ==> {document}^^M ==> No pages of output. ==> Transcript written on conic.log. ==> This is dvips(k) 5.997 Copyright 2017 Radical Eye Software (www.radicaley\ e.com) ==> dvips: DVI file can't be opened: /tmp/conic.dvi: No such file or director\ y ==> 0 ==> sh: Zeile 1: xdg-open: Kommando nicht gefunden. // with an optional argument the same information for the dual conic is computed // and saved in conic conic=conicWithTangents(points,1); conic; // the equation of the dual conic ==> (t6-6t5+11t4-6t3+t2)*x2+(-4t8+8t7-2t6-4t5+6t4-4t3-2t2+8t-4)*xy+(t6-6t5+11\ t4-6t3+t2)*y2+(-2t7+2t6+4t5-6t4+4t3+2t2-2t)*x+(-2t7+2t6+4t5-6t4+4t3+2t2-2\ t)*y+(t8-4t7+2t6+8t5-13t4+8t3+2t2-4t+1) 

### Misc 