I am looking to create the 15-sided irregular polygon figure below, without having to declare coordinates for each point.

Is there an easier way to do this? Tikz? PGF?
I am looking to create the 15-sided irregular polygon figure below, without having to declare coordinates for each point.

Is there an easier way to do this? Tikz? PGF?
Here's a way to draw this polygon from a list of interior angles. The key points are the \pgfextra{...} command, which allows you to execute code without interrupting the path construction, and the \path commands with the name path keywords within the pgfinterruptboundingbox environment, which are used to find the final corner.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, intersections}
\begin{document}
\begin{tikzpicture}
\def\totalangle{0}
\draw (0,0) -- (0:1cm) \foreach \angle in {152,165,167,160,160,150,150,150,170,145,170,155,170,155}{
\pgfextra{ % Calculate the current direction
\pgfmathparse{180-\angle+\totalangle}
\xdef\totalangle{\pgfmathresult}
}
-- ++(\totalangle:1cm) node [pos=0, circle, anchor=(\totalangle+\angle/2+180), inner sep=0pt] {$\angle^\circ$}
} coordinate (final);
\pgfmathsetmacro\unknownangle{\totalangle-180}
% The final point is on the intersection between the extensions of the first and last segments.
% Interrupt the bounding box, so we can use long paths for finding the intersection.
\begin{pgfinterruptboundingbox}
\path [name path global=horizontal] (-20cm,0pt) -- (20cm,0pt);
\path [name path global=lastsegment] (final) -- +(\totalangle:30cm);
\end{pgfinterruptboundingbox}
\draw [name intersections={of=horizontal and lastsegment}]
(final) -- (intersection-1)
node [anchor=south west] {$x$}
-- (0,0);
\end{tikzpicture}
\end{document}
pgf.
– Calhistorian
May 23 '13 at 22:09
\pgfmathsetmacro\unknownangle{\totalangle-180}. The entire second half of the code (from \begin{pgfinterruptboundingbox}) is only necessary because we don't know the length of the individual segments, so if you would precalculate that, the code could be shortened.
– Jake
May 23 '13 at 22:13
node ... {\angle} node ... {$\angle^\circ$}. I've edited my answer.
– Jake
May 23 '13 at 22:30
2cm to 1cm) which subsequently made the angle labels to be too far from the edge. I messed with some things, but can't get the label closer to the edge.
– Calhistorian
May 23 '13 at 22:43
inner sep of the label nodes (or set it to 0pt). I've edited my answer.
– Jake
May 24 '13 at 02:06
Here is an adaptation of Circular sequence diagram (tikz?) which will adapt to any number of segments based on the number of labels provided.

\documentclass{article}
\usepackage{tikz}
\usepackage{xstring}
% https://tex.stackexchange.com/questions/21559/macro-to-access-a-specific-member-of-a-list/21560#21560
\newcommand*\GetListMember[2]{\StrBetween[#2,\number\numexpr#2+1]{,#1,},,\par}%
\newlength{\MidRadius}
\newcommand{\LastAngle}{}%
\newcommand*{\CircularSequence}[3]{%
% #1 = outer circle radius
% #2 = inner circle radius
% #3 = seqeunce
\StrCount{#3}{,}[\NumberOfElements]
\pgfmathsetmacro{\AngleSep}{360/(\NumberOfElements+1)}
\pgfmathsetlength{\MidRadius}{(#1+#2)/2}
\foreach [count = \Count] \Angle in {0,\AngleSep,..., 360} {%
\IfStrEq{\LastAngle}{}{}{%
\draw [blue, ultra thick] (\LastAngle:#1) -- (\Angle:#1);
}%
\xdef\LastAngle{\Angle}% Save it so we can access it next iteration
\pgfmathsetmacro{\MidPoint}{\Angle+\AngleSep/2}
\node at (\MidPoint:\MidRadius) {\GetListMember{#3}{\Count}};
}%
}%
\begin{document}
\begin{tikzpicture}
\CircularSequence{4.0cm}{3.0cm}{170,155,170,165,$x$,163,155,167,170,160,140,150,172,170,145}
\end{tikzpicture}
\end{document}
\draw (90:3) \foreach \x in {0, 80, 185, 200, 270} { -- (90+\x:3) node [anchor=\x] {\x} } -- cycle;
– Jori Mäntysalo May 23 '13 at 20:43turtlelibrary (maybe with some adjustments). – Qrrbrbirlbel May 23 '13 at 21:01180 (15 - 2) = 2340degrees. Besides that, doesn’t have such a polygon more than one solution if all sides do not have the same length? – Qrrbrbirlbel May 23 '13 at 22:28