​

Draw a Polygon
Get started with 2D graphics by drawing a polygon.

Run the code to draw a polygon. Try other coordinate values:
1.

Graphics[Polygon[
{{0,0},{2,0},{0,1}}
]]
In[]:=
Draw a house shape. Try drawing other shapes:
2.

Graphics[Polygon[
{{0,0},{2,0},{2,2},{1,3},{0,2}}
]]
In[]:=
Make it red. Try other colors, like
Orange
or
Green
:
3.

Graphics[{
Red
,Polygon[{{0,0},{2,0},{2,2},{1,3},{0,2}}]}]
In[]:=