Question: How do I label endpoints automatically in pointplot?

I drew a polygon using some point coordinates combined with the pointplot.

c1 := <0, -2>:
c2 := <1, 2>:
c3 := <2, 2>:
c4 := <0.5, 6>:
c5:=<1, 4>:
with(plots):
p1:=pointplot([c1, c2, c3, c4,c5, c1], color = red, connect = true);

I ‘d like to add  label  of endpoints to polygons, although I did this via textplot, but it didn't feel very neat. I hope when the polygon is drawn, labels of  every endpoints appear . These labels are the names of the assignment variable for the coordinates of the endpoints.

c1 := <0, -2>:
c2 := <1, 2>:
c3 := <2, 2>:
c4 := <0.5, 6>:
c5:=<1, 4>:
with(plots):

t1 :=textplot([0, -2, 'typeset'("c1")], 'align' = 'above'):
t2 :=textplot([1, 2, 'typeset'("c2")], 'align' = 'above'):
t3 :=textplot([2, 2, 'typeset'("c3")], 'align' = 'above'):
t4 :=textplot([0.5, 6, 'typeset'("c4")], 'align' = 'above'):
t5 :=textplot([1, 4, 'typeset'("c5")], 'align' = 'above'):
p1:=pointplot([c1, c2, c3, c4,c5, c1], color = red, connect = true):
display({p1, t1,t2,t3,t4,t5});

 

I think  DrawGraph command  in graph theory package  is very good to achieve this in a sense. 

Please Wait...