In Mathematica I'm trying to render a polygon as a set of vertices and directed edges.
What I have so far:
Graphics[Polygon[{{1, 10}, {2, 4}, {10, 5}, {20, 10}}]]
I see Mathematica has the Graph
and PathGraph
commands - both of which have a DirectedEdges
option - but it seems like I have no control over the position of the vertices with these commands.
If I could customize the fill and edge/stroke of the Polygon
command, that would be acceptable - but I'm not seeing how to do it. It looks like this command is specifically meant to draw filled polygons.
I'd also be OK with a custom Mathematica routine to draw what I want using a loop and multiple Line
commands within a Graphics
command - but I can't see how to draw the lines as arrows (I'm sure I could make the routine do this with three Line
s per edge, but I really just think I'm missing something here.)