Analytic geometry textbooks usually teach the equation of a straight line and the equations of a circle and conic sections (equation of an ellipse/hyperbola/parabola). None (except a russian one) as far I as know deals with the analytic equation of a triangle and/or the analytic equation of a quadrilateral. For some unknown reason this subject seems to be as rare as hen's teeth in analytic geometry primers. Only in russian I've found a book dealing with such cartesian equations, by V. L. Rvatchev (Геометрические приложения алгебры логики, Киев, 1967).
Does anyone know a textbook with a section on the cartesian equation of a triangle/quadrilateral or a book/monograph about this subject? It could be in english, german, french, spanish or portuguese.
(repeat of my earlier comment) See Studying set theory using polynomials? (my answer gives some English references for Rvatchev's work) AND Is there an equation to describe regular polygons? AND these other MSE questions.
Getting a bit away from your question, but still likely of interest to many who stumble upon this answer in the future, see this answer. El-Milick's book that I cite there is especially interesting, although rather rare and nowhere on the internet that I know of -- one day I might try to make a .pdf file from my copy for the Internet Archive.
I have seen small sections and exercises in a few books that deal with graphs of polygons, but I haven't kept track of these books and I don't know of any specifics at the moment. {{ (update 6 days later) See [0], which the OP told me was mentioned in [7] }} However, I do know of several expository papers that deal with such graphs, and these papers are listed below. (I have a folder of photocopies of such papers, which took me a rather long time to locate, hence the time gap between my earlier comment and this answer.) Of course, there are probably lots of internet writings on this topic -- the MSE references above, people's blogs, unpublished notes at various people's web pages, etc. -- but I'll leave these to you or someone else to find. Anyway, for this topic you seemed more interested in published literature than internet writings and postings.
[0] Anders Leonard Axel Söderblom (1847–1912), Sur l'Emploi de Valeurs Absolues dans la Géométrie Analytique [On the Use of Absolute Values in Analytic Geometry], Wald. Zachrissons Boktryckeri A.-B. (Göteborg, Sweden), 1906, vi + 174 pages. copy 1 & copy 2
[1] [author not known], [Solution to 558], Mathematical Gazette 4 #63 (April 1907), pp. 53−54. [See also MG 3 #18, December 1904, p. 116.]
[2] Miriam Amit, Michael N. Fried, and Pavel Satianov, The equation of a triangle, Mathematics Teacher 94 #5 (May 2001), pp. 362−364.
[3] John E. Freund, Segment – functions, Mathematics Magazine 21 #5 (May−June 1948), pp. 261−264.
[4] Manuel Fernandez Guasti, Analytic geometry of some rectilinear figures, International Journal of Mathematical Education in Science and Technology 23 #6 (1992), pp. 895−901.
[5] Robert F. Jolly, Equations for semicircles and pings, Mathematics Teacher 60 #7 (November 1967), pp. 720−722.
[6] Harsh Luthar, Equation of a line segment, Mathematics Student Journal 21 #1 (October 1973), pp. 3−4.
[7] C. O. Oakley, Equations of polygons, American Mathematical Monthly 42 #8 (October 1935), pp. 476−487.
[8] C. O. Oakley, Equations of polygonal configurations, American Mathematical Monthly 47 #9 (November 1940), pp. 621−627.
[9] Clarence R. Perisho, Curves with corners, Mathematics Teacher 55 #5 (May 1962), pp. 326−329.
[10] Clarence R. Perisho, The use of transformations in deriving equations of common geometric figures, Mathematics Teacher 58 #5 (May 1965), pp. 386−392.
[11] Stanley Rabinowitz; Russell Euler and Jawad Sadek, [Solutions to Problem 592], The Pentagon 66 #1 (Fall 2006), p. 58.
[12] Joseph F. Santner, A note on curve fitting, Mathematics Teacher 56 #4 (April 1963), pp. 218−221.
[13] Joseph F. Santner, A second note on curve fitting, Mathematics Teacher 56 #5 (May 1963), pp. 307−310.
[14] Charles P. Seguin, Equations of polygonal paths, American Mathematical Monthly 69 #6 (June−July 1962), pp. 548−549.
[15] John L. Spence, Equations of some common geometric figures, School Science and Mathematics 58 #9 (December 1958), pp. 674−676.
[16] Edwin F. Wilde, Equations of polygons, Mathematics Student Journal 19 #2 (January 1972), pp. 1−3.
[17] See Chin Woon, A regular polygon equation, Pi Mu Epsilon Journal 9 #9 (Fall 1993), pp. 597−598.