## Plotting a 2-D shape given its border points

-1

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.

Question was closed 2013-05-01T11:25:53.060

1Look up Polygon[]. – J. M.'s ennui – 2013-04-30T17:41:57.980

1

Very closely related are all the threads about convex hulls

– whuber – 2013-04-30T17:45:10.030

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 – 2013-05-01T07:07:40.463

## Answers

2

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 – 2013-05-01T02:33:26.813