Example: Polygon division

Published 2008-10-09 | Author: Eric D├ętrez

This example shows the solution of Euler’s polygon division problem for a heptagon. The problem is to find in how many ways a plane convex polygon of n sides can be divided into triangles. The solution is given by the Catalan number. For a heptagon the number is 42.

Download as: [PDF] [TEX]  •  [Open in writeLaTeX]

Polygon division

Do you have a question regarding this example, TikZ or LaTeX in general? Just ask in the LaTeX Forum.
Oder frag auf Deutsch auf TeXwelt.de.


% Macro for drawing a heptagon   
\def\hepta{\draw(A) -- (B) -- (C) -- (D) -- (E) -- (F) -- (G) -- cycle;}

% Macro for drawing polygon diagonals. 
% Example \slice{A/C,C/E,E/G,C/G}

    \draw \foreach \x/\y in {#1} {(\x)--(\y)};


    % Define the heptagon coordinates
    \coordinate (A) at (-0.76,1.54);
    \coordinate (B) at (-0.76,0.69);
    \coordinate (C) at (-0.10,0.16);
    \coordinate (D) at (0.73,0.35);
    \coordinate (E) at (1.1,1.11);
    \coordinate (F) at (0.73,1.88);
    \coordinate (G) at (-0.10,2.07);

\matrix[column sep=0.8cm,row sep=0.5cm]

















Adding comments is currently not enabled.

Scientific and technical areas


Preorder discount 35%
coupon code LXCB35

LaTeX Beginners Guide

Limited discount 50%
coupon code tDRet6Y

click here to read whole story

Creative Commons License