Changeset d29e550 in git
- Timestamp:
- Dec 19, 2016, 11:34:29 AM (7 years ago)
- Branches:
- (u'spielwiese', 'e7cc1ebecb61be8b9ca6c18016352af89940b21a')
- Children:
- a5bbb56085d44c9d5afaddeb51fc853641212f0c
- Parents:
- e9c6f4d782119cfd145a6122234c858dec647066
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/tropical.lib
re9c6f4 rd29e550 14 14 - tropicalLifting will only work with LINUX and if in addition gfan is installed. 15 15 @*- drawTropicalCurve and drawTropicalNewtonSubdivision will only display the 16 @* tropical curve with LINUX and if in addition latex and kghostview16 @* tropical curve with LINUX and if in addition latex and xdg-open 17 17 @* are installed. 18 18 @*- For tropicalLifting in the definition of the basering the parameter t … … 1678 1678 /tmp/tropicalcurveNUMBER.ps, where NUMBER is a random four 1679 1679 digit integer; 1680 moreover it displays the tropical curve via kghostview;1680 moreover it displays the tropical curve via xdg-open; 1681 1681 if you wish to remove all these files from /tmp, 1682 1682 call the procedure cleanTmp … … 1685 1685 if #[1] is the string 'max', then it is computed w.r.t. maximum 1686 1686 @* - if the last optional argument is 'onlytexfile' then only the 1687 latex file is produced; this option should be used if kghostview1687 latex file is produced; this option should be used if xdg-utils 1688 1688 is not installed on your system 1689 1689 @* - note that lattice points in the Newton subdivision which are … … 1778 1778 \\setlength{\\textwidth}{170mm} 1779 1779 1780 \\makeatletter 1781 \\def\\old@comma{,} 1782 \\catcode`\\,=13 1783 \\def,{% 1784 \\ifmmode% 1785 \\old@comma\\discretionary{}{}{}% 1786 \\else% 1787 \\old@comma% 1788 \\fi% 1789 \} 1790 \\makeatother 1791 1780 1792 \\begin{document} 1781 1793 \\parindent0cm … … 1814 1826 int rdnum=random(1000,9999); 1815 1827 write(":w /tmp/tropicalcurve"+string(rdnum)+".tex",TEXBILD); 1816 system("sh","cd /tmp; latex /tmp/tropicalcurve"+string(rdnum)+".tex; dvips /tmp/tropicalcurve"+string(rdnum)+".dvi -o; command rm tropicalcurve"+string(rdnum)+".log; command rm tropicalcurve"+string(rdnum)+".aux; command rm tropicalcurve"+string(rdnum)+".ps?; command rm tropicalcurve"+string(rdnum)+".dvi; kghostviewtropicalcurve"+string(rdnum)+".ps &");1828 system("sh","cd /tmp; latex /tmp/tropicalcurve"+string(rdnum)+".tex; dvips /tmp/tropicalcurve"+string(rdnum)+".dvi -o; command rm tropicalcurve"+string(rdnum)+".log; command rm tropicalcurve"+string(rdnum)+".aux; command rm tropicalcurve"+string(rdnum)+".ps?; command rm tropicalcurve"+string(rdnum)+".dvi; xdg-open tropicalcurve"+string(rdnum)+".ps &"); 1817 1829 } 1818 1830 else … … 1828 1840 poly f=t*(x3+y3+1)+1/t*(x2+y2+x+y+x2y+xy2)+1/t2*xy; 1829 1841 // the command drawTropicalCurve(f) computes the graph of the tropical curve 1830 // given by f and displays a post script image, provided you have kghostview1842 // given by f and displays a post script image, provided you have xdg-open 1831 1843 drawTropicalCurve(f); 1832 1844 // we can instead apply the procedure to a tropical polynomial and use "maximum" … … 1852 1864 and /tmp/newtonsubdivisionNUMBER.ps, where NUMBER is a random 1853 1865 four digit integer; 1854 moreover it desplays the tropical curve defined by f via kghostview;1866 moreover it desplays the tropical curve defined by f via xdg-open; 1855 1867 if you wish to remove all these files from /tmp, call the procedure 1856 1868 cleanTmp; … … 1912 1924 int rdnum=random(1000,9999); 1913 1925 write(":w /tmp/newtonsubdivision"+string(rdnum)+".tex",TEXBILD); 1914 system("sh","cd /tmp; latex /tmp/newtonsubdivision"+string(rdnum)+".tex; dvips /tmp/newtonsubdivision"+string(rdnum)+".dvi -o; command rm newtonsubdivision"+string(rdnum)+".log; command rm newtonsubdivision"+string(rdnum)+".aux; command rm newtonsubdivision"+string(rdnum)+".ps?; command rm newtonsubdivision"+string(rdnum)+".dvi; kghostviewnewtonsubdivision"+string(rdnum)+".ps &");1926 system("sh","cd /tmp; latex /tmp/newtonsubdivision"+string(rdnum)+".tex; dvips /tmp/newtonsubdivision"+string(rdnum)+".dvi -o; command rm newtonsubdivision"+string(rdnum)+".log; command rm newtonsubdivision"+string(rdnum)+".aux; command rm newtonsubdivision"+string(rdnum)+".ps?; command rm newtonsubdivision"+string(rdnum)+".dvi; xdg-open newtonsubdivision"+string(rdnum)+".ps &"); 1915 1927 // return(TEXBILD); 1916 1928 } … … 1922 1934 poly f=t*(x3+y3+1)+1/t*(x2+y2+x+y+x2y+xy2)+1/t2*xy; 1923 1935 // the command drawTropicalCurve(f) computes the graph of the tropical curve 1924 // given by f and displays a post script image, provided you have kghostview1936 // given by f and displays a post script image, provided you have xdg-open 1925 1937 drawNewtonSubdivision(f); 1926 1938 // we can instead apply the procedure to a tropical polynomial … … 2479 2491 // conic[8] contains the latex code to draw the tropical conic and 2480 2492 // its tropicalised tangents; it can written in a file, processed and 2481 // displayed via kghostview2493 // displayed via xdg-open 2482 2494 write(":w /tmp/conic.tex",conic[8]); 2483 2495 system("sh","cd /tmp; latex /tmp/conic.tex; dvips /tmp/conic.dvi -o; 2484 kghostviewconic.ps &");2496 xdg-open conic.ps &"); 2485 2497 // with an optional argument the same information for the dual conic is computed 2486 2498 // and saved in conic[9] … … 8191 8203 /tmp/tropicalcurveNUMBER.ps, where NUMBER is a random four 8192 8204 digit integer; 8193 moreover it displays the tropical curve via kghostview;8205 moreover it displays the tropical curve via xdg-open; 8194 8206 if you wish to remove all these files from /tmp, 8195 8207 call the procedure cleanTmp … … 8198 8210 if #[1] is the string 'max', then it is computed w.r.t. maximum 8199 8211 @* - if the last optional argument is 'onlytexfile' then only the 8200 latex file is produced; this option should be used if kghostview8212 latex file is produced; this option should be used if xdg-open 8201 8213 is not installed on your system 8202 8214 @* - note that lattice points in the Newton subdivision which are … … 8430 8442 int rdnum=random(1000,9999); 8431 8443 write(":w /tmp/tropicalcurve"+string(rdnum)+".tex",TEXBILD); 8432 system("sh","cd /tmp; latex /tmp/tropicalcurve"+string(rdnum)+".tex; dvips /tmp/tropicalcurve"+string(rdnum)+".dvi -o; command rm tropicalcurve"+string(rdnum)+".log; command rm tropicalcurve"+string(rdnum)+".aux; command rm tropicalcurve"+string(rdnum)+".ps?; command rm tropicalcurve"+string(rdnum)+".dvi; kghostviewtropicalcurve"+string(rdnum)+".ps &");8444 system("sh","cd /tmp; latex /tmp/tropicalcurve"+string(rdnum)+".tex; dvips /tmp/tropicalcurve"+string(rdnum)+".dvi -o; command rm tropicalcurve"+string(rdnum)+".log; command rm tropicalcurve"+string(rdnum)+".aux; command rm tropicalcurve"+string(rdnum)+".ps?; command rm tropicalcurve"+string(rdnum)+".dvi; xdg-open tropicalcurve"+string(rdnum)+".ps &"); 8433 8445 } 8434 8446 else … … 8445 8457 poly f=x+y+1; 8446 8458 // the command drawTropicalCurve(f) computes the graph of the tropical curve 8447 // given by f and displays a post script image, provided you have kghostview8459 // given by f and displays a post script image, provided you have xdg-open 8448 8460 // we can instead apply the procedure to a tropical polynomial and use "maximum" 8449 8461 poly g=t3*(x7+y7+1)+1/t3*(x4+y4+x2+y2+x3y+xy3)+1/t21*x2y2;
Note: See TracChangeset
for help on using the changeset viewer.