# Plotting a 2-D shape given its border points [duplicate]

I have the border points of a 2-D body and wish to fill its interior with a solid color. Let us say I have $N$ such points stacked in the $N \times 2$ matrix $A$ so that the first column indicates the $x$ co-ordinates and the second column denotes the corresponding $y$ co-ordinates.

-

## marked as duplicate by whuber, Sjoerd C. de Vries, Oleksandr R., István Zachar, ArtesMay 1 '13 at 11:25

Look up Polygon[]. –  Ｊ. Ｍ. Apr 30 '13 at 17:41
Very closely related are all the threads about convex hulls –  whuber Apr 30 '13 at 17:45
Yeah, right. This sounds like a simple case of Polygon, or did we miss something? If so, please elaborate your question. Until then, voting to close as Too Localized. –  Sjoerd C. de Vries May 1 '13 at 7:07

Like this?

Graphics /@ Polygon /@ Table[{Cos@x, Sin@x}, {j, 3, 6}, {x, 0, 2 Pi, 2 Pi /j}]


-
yes, like that. Here I have some of the border points of a convex 2-D body. Think like this. I have a vertical slider. I start from the left side of the body. Now slider will have two endpoints on the convex body. I store them. I again translate it towards the right and get more points like this. I can control the resolution of the horizontal movement of the slider, thus can get a lot of points like that. –  dineshdileep May 1 '13 at 2:33