<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, draw a polygon with labeled vertex</title>
    <link>http://www.mapleprimes.com/questions/120193-Draw-A-Polygon-With-Labeled-Vertex</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Thu, 11 Jun 2026 18:25:15 GMT</lastBuildDate>
    <pubDate>Thu, 11 Jun 2026 18:25:15 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, draw a polygon with labeled vertex</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, draw a polygon with labeled vertex</title>
      <link>http://www.mapleprimes.com/questions/120193-Draw-A-Polygon-With-Labeled-Vertex</link>
    </image>
    <item>
      <title>Manually</title>
      <link>http://www.mapleprimes.com/questions/120193-Draw-A-Polygon-With-Labeled-Vertex?ref=Feed:MaplePrimes:draw a polygon with labeled vertex:Comments#answer120196</link>
      <itunes:summary>&lt;p&gt;Manually.&lt;/p&gt;
&lt;p&gt;For example, in Classic Maple,&lt;/p&gt;
&lt;pre&gt;with(plottools):
with(plots):
display(polygon([[0,0], [3,4], [3,1]]), 
textplot({[0.4,0.3,1],[2.87,3.6,2],[2.87,1.18,3]}),
axes=none);
&lt;/pre&gt;
&lt;p&gt;&lt;a href="/view.aspx?sf=120196/383129/polygon.gif"&gt;&lt;img src="/view.aspx?sf=120196/383129/polygon.gif" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In Standard Maple that produces a polygon filled black, so you have to add &lt;code&gt;color=white&lt;/code&gt; in the polygon arguments, to make it white.&lt;/p&gt;
&lt;p&gt;Alec&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Manually.&lt;/p&gt;
&lt;p&gt;For example, in Classic Maple,&lt;/p&gt;
&lt;pre&gt;with(plottools):
with(plots):
display(polygon([[0,0], [3,4], [3,1]]), 
textplot({[0.4,0.3,1],[2.87,3.6,2],[2.87,1.18,3]}),
axes=none);
&lt;/pre&gt;
&lt;p&gt;&lt;a href="/view.aspx?sf=120196/383129/polygon.gif"&gt;&lt;img src="/view.aspx?sf=120196/383129/polygon.gif" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In Standard Maple that produces a polygon filled black, so you have to add &lt;code&gt;color=white&lt;/code&gt; in the polygon arguments, to make it white.&lt;/p&gt;
&lt;p&gt;Alec&lt;/p&gt;</description>
      <guid>120196</guid>
      <pubDate>Sun, 22 May 2011 23:49:37 Z</pubDate>
      <itunes:author>Alec Mihailovs</itunes:author>
      <author>Alec Mihailovs</author>
    </item>
    <item>
      <title>labelledpolygon</title>
      <link>http://www.mapleprimes.com/questions/120193-Draw-A-Polygon-With-Labeled-Vertex?ref=Feed:MaplePrimes:draw a polygon with labeled vertex:Comments#answer120224</link>
      <itunes:summary>&lt;pre&gt;You might try this one. &lt;br&gt;&lt;br&gt;&amp;gt; labelledpolygon:= proc(L::list,r::positive,col)&lt;br&gt;# L is a list of 2D points, possibly including labels as the third elements&lt;br&gt;# r the distance from the vertices to the labels&lt;br&gt;# col the colour for the polygon&lt;br&gt;&amp;nbsp; uses plots;&lt;br&gt;&amp;nbsp; local V, T,P1,V2,i,a,b,c,n;&lt;br&gt;&amp;nbsp; V:= map(t -&amp;gt; [t[1],t[2]],L);&lt;br&gt;&amp;nbsp; if nops(L[1]) = 3 then T:= map(t -&amp;gt; t[3],L)&lt;br&gt;  else T:= map(convert,[$1..nops(L)],string)&lt;br&gt;  end if; &lt;br&gt;&amp;nbsp; P1:= pointplot([op(V),V[1]],style=line,colour=col);&lt;br&gt;&amp;nbsp; n:= nops(V); b:= V[1]-V[n]; b:= evalf(b/sqrt(b[1]^2+b[2]^2));&lt;br&gt;&amp;nbsp; for i from 1 to n do&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a:= b;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if i = n then b:= V[1]-V[n] else b:= V[i+1]-V[i] end if;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; b:= evalf(b/sqrt(b[1]^2+b[2]^2));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c:= evalc([Re,Im](-(a[1]+I*a[2])*sqrt(-(b[1]+I*b[2])/(a[1]+I*a[2]))));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; V2[i]:= [op(V[i]+r*c),T[i]];&lt;br&gt;&amp;nbsp; end do;&lt;br&gt;&amp;nbsp; display(P1,textplot(convert(V2,list)),scaling=constrained,_rest); &lt;br&gt;end proc;&lt;br&gt;&lt;br&gt;Then for example:&lt;br&gt;&lt;br&gt;&amp;gt; labelledpolygon([[1,2,"a"],[2,5,"b"],[4,0,"c"]],0.5, blue);&lt;br&gt;&lt;br&gt;&amp;gt; labelledpolygon([seq([cos(i*Pi/4),sin(i*Pi/4)],i=0..7)],0.2,red,axes=box);&lt;/pre&gt;</itunes:summary>
      <description>&lt;pre&gt;You might try this one. &lt;br&gt;&lt;br&gt;&amp;gt; labelledpolygon:= proc(L::list,r::positive,col)&lt;br&gt;# L is a list of 2D points, possibly including labels as the third elements&lt;br&gt;# r the distance from the vertices to the labels&lt;br&gt;# col the colour for the polygon&lt;br&gt;&amp;nbsp; uses plots;&lt;br&gt;&amp;nbsp; local V, T,P1,V2,i,a,b,c,n;&lt;br&gt;&amp;nbsp; V:= map(t -&amp;gt; [t[1],t[2]],L);&lt;br&gt;&amp;nbsp; if nops(L[1]) = 3 then T:= map(t -&amp;gt; t[3],L)&lt;br&gt;  else T:= map(convert,[$1..nops(L)],string)&lt;br&gt;  end if; &lt;br&gt;&amp;nbsp; P1:= pointplot([op(V),V[1]],style=line,colour=col);&lt;br&gt;&amp;nbsp; n:= nops(V); b:= V[1]-V[n]; b:= evalf(b/sqrt(b[1]^2+b[2]^2));&lt;br&gt;&amp;nbsp; for i from 1 to n do&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a:= b;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if i = n then b:= V[1]-V[n] else b:= V[i+1]-V[i] end if;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; b:= evalf(b/sqrt(b[1]^2+b[2]^2));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c:= evalc([Re,Im](-(a[1]+I*a[2])*sqrt(-(b[1]+I*b[2])/(a[1]+I*a[2]))));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; V2[i]:= [op(V[i]+r*c),T[i]];&lt;br&gt;&amp;nbsp; end do;&lt;br&gt;&amp;nbsp; display(P1,textplot(convert(V2,list)),scaling=constrained,_rest); &lt;br&gt;end proc;&lt;br&gt;&lt;br&gt;Then for example:&lt;br&gt;&lt;br&gt;&amp;gt; labelledpolygon([[1,2,"a"],[2,5,"b"],[4,0,"c"]],0.5, blue);&lt;br&gt;&lt;br&gt;&amp;gt; labelledpolygon([seq([cos(i*Pi/4),sin(i*Pi/4)],i=0..7)],0.2,red,axes=box);&lt;/pre&gt;</description>
      <guid>120224</guid>
      <pubDate>Mon, 23 May 2011 10:53:02 Z</pubDate>
      <itunes:author>Robert Israel</itunes:author>
      <author>Robert Israel</author>
    </item>
    <item>
      <title>Another possibility</title>
      <link>http://www.mapleprimes.com/questions/120193-Draw-A-Polygon-With-Labeled-Vertex?ref=Feed:MaplePrimes:draw a polygon with labeled vertex:Comments#answer120255</link>
      <itunes:summary>&lt;p&gt;Another possibility of what "numbers which are inside of that polygon" could mean is that the numbers could be located "inside" vertices, in which case the GraphTheory:-DrawGraph can be used as in &lt;a href="http://www.maplesoft.com/support/help/search.aspx?term=GraphTheory[SpecialGraphs][IcosahedronGraph]"&gt;?GraphTheory[SpecialGraphs][IcosahedronGraph]&lt;/a&gt; examples.&lt;/p&gt;
&lt;!--break--&gt;
&lt;p&gt;Alec&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Another possibility of what "numbers which are inside of that polygon" could mean is that the numbers could be located "inside" vertices, in which case the GraphTheory:-DrawGraph can be used as in &lt;a href="http://www.maplesoft.com/support/help/search.aspx?term=GraphTheory[SpecialGraphs][IcosahedronGraph]"&gt;?GraphTheory[SpecialGraphs][IcosahedronGraph]&lt;/a&gt; examples.&lt;/p&gt;
&lt;!--break--&gt;
&lt;p&gt;Alec&lt;/p&gt;</description>
      <guid>120255</guid>
      <pubDate>Tue, 24 May 2011 05:24:48 Z</pubDate>
      <itunes:author>Alec Mihailovs</itunes:author>
      <author>Alec Mihailovs</author>
    </item>
    <item>
      <title>automatic</title>
      <link>http://www.mapleprimes.com/questions/120193-Draw-A-Polygon-With-Labeled-Vertex?ref=Feed:MaplePrimes:draw a polygon with labeled vertex:Comments#comment120197</link>
      <itunes:summary>&lt;p&gt;I want draw tiles of the plan, but every tile is a triangle with labeled vertex, SO that, i want to label automatically.There are a lots of tile? THanks&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;I want draw tiles of the plan, but every tile is a triangle with labeled vertex, SO that, i want to label automatically.There are a lots of tile? THanks&lt;/p&gt;</description>
      <guid>120197</guid>
      <pubDate>Mon, 23 May 2011 00:37:31 Z</pubDate>
      <itunes:author>tiepdinhvan</itunes:author>
      <author>tiepdinhvan</author>
    </item>
    <item>
      <title>Implement a procedure</title>
      <link>http://www.mapleprimes.com/questions/120193-Draw-A-Polygon-With-Labeled-Vertex?ref=Feed:MaplePrimes:draw a polygon with labeled vertex:Comments#comment120199</link>
      <itunes:summary>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/120193-Draw-A-Polygon-With-Labeled-Vertex#comment120197"&gt;@tiepdinhvan&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Since such a procedure doesn't exist in Maple, one has to write it himself/herself, or ask somebody to do that for him/her, in which case more information is needed for what you want to do exactly, accompanied with an example (or a couple of examples). Adding a work that you did yourself and a description of a problem that you are having not being able to finish it yourself also might be helpful.&lt;/p&gt;
&lt;p&gt;Alec&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/120193-Draw-A-Polygon-With-Labeled-Vertex#comment120197"&gt;@tiepdinhvan&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Since such a procedure doesn't exist in Maple, one has to write it himself/herself, or ask somebody to do that for him/her, in which case more information is needed for what you want to do exactly, accompanied with an example (or a couple of examples). Adding a work that you did yourself and a description of a problem that you are having not being able to finish it yourself also might be helpful.&lt;/p&gt;
&lt;p&gt;Alec&lt;/p&gt;</description>
      <guid>120199</guid>
      <pubDate>Mon, 23 May 2011 01:08:27 Z</pubDate>
      <itunes:author>Alec Mihailovs</itunes:author>
      <author>Alec Mihailovs</author>
    </item>
    <item>
      <title>Thanks you for your answer more.&amp;nbsp;</title>
      <link>http://www.mapleprimes.com/questions/120193-Draw-A-Polygon-With-Labeled-Vertex?ref=Feed:MaplePrimes:draw a polygon with labeled vertex:Comments#comment120201</link>
      <itunes:summary>&lt;p&gt;Thanks you for your answer more.&amp;nbsp;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Thanks you for your answer more.&amp;nbsp;&lt;/p&gt;</description>
      <guid>120201</guid>
      <pubDate>Mon, 23 May 2011 01:45:11 Z</pubDate>
      <itunes:author>tiepdinhvan</itunes:author>
      <author>tiepdinhvan</author>
    </item>
  </channel>
</rss>