# Draw a decagon in LaTeX

TeX - LaTeX Asked on January 5, 2022

I need to draw a graph with 10 nodes in LaTeX. I thought about doing it with tikz and try to give exact coordinates to draw a decagon but I don’t know what coordinates to give.

A solution with PSTricks only for either fun or comparison purposes.

curvepnodes is useful to define an array of nodes for any given number of nodes and curve functions. For example, we can use it to make an array of 12 nodes on a circle. Offset is provided as the rotation offset.

documentclass[pstricks,margin=5mm]{standalone}
usepackage{pst-node,pst-plot}

begin{document}
begin{pspicture}[showpoints,dotscale=1](-4,-4)(4,4)
pstVerb{/Offset 30 def}%
psnpolygon[linecolor=red](0,numexprAnodecount-1){A}
end{pspicture}
end{document}


# Animated version

documentclass[pstricks,margin=5mm]{standalone}
usepackage{pst-node,pst-plot}

begin{document}
multido{i=0+10}{10}{%
begin{pspicture}[showpoints,dotscale=6](-4,-4)(4,4)
pstVerb{/Offset ispace def}%
psnpolygon[linecolor=red](0,numexprAnodecount-1){A}
end{pspicture}}
end{document}


Answered by Unreal Engine 5 Coming Soon on January 5, 2022

In this link you can find a series of regular polygons...I have changed the code to have the penthagon. Here the drawing is without coordinates.

documentclass[12pt]{article}
usepackage{tikz}
begin{document}
newdimenR
R=1cm
This is a pentagon $n=10$,
begin{tikzpicture}
draw[yshift=-6.0R] (0:R) foreach x in {36,72,...,359} {
-- (x:R)
} -- cycle (90:R) node[above] {$scriptstyle n=10$} ;
end{tikzpicture}
that it could be used as a symbol.
end{document}


Answered by Sebastiano on January 5, 2022

## Related Questions

### ^m exists in LuxiMono Type1 but not in LuxiMono OpenType

1  Asked on February 25, 2021

### Colouring cells in a table

2  Asked on February 25, 2021

### Screaming ghost symbol in tex

1  Asked on February 25, 2021 by skps

### How can I ensure that two adjacent figures and captions are horizontally aligned?

3  Asked on February 25, 2021 by hun

### How can I adjust the vertical positioning of lim so the argument is aligned with the whole limit stack rather than just the word “lim”?

4  Asked on February 25, 2021

### How to display the Refs Section on some frames?

1  Asked on February 25, 2021

### Metadata with more than one language

1  Asked on February 25, 2021

### How can I draw this figure using Tikz (Damped Oscillations)?

1  Asked on February 25, 2021 by eduardo-ni

### Ask LuaLaTeX to ignore an active catcode previously written into aux file by pdflatex

1  Asked on February 25, 2021

### acknowledgments in elsevier journal format

1  Asked on February 25, 2021

### Any one can explain me how to add zero chapters in table of content

1  Asked on February 25, 2021 by shoaib-assar

### How to paste a cell from one table into a merged cell in another table in latex?

0  Asked on February 25, 2021 by user3218428

### How to remove the hyperlink box created by thanks?

1  Asked on February 25, 2021 by snjr

### Center Acronym Title and remove List of Tables / List of Figures from the Summary

1  Asked on February 25, 2021 by rafael-martins

### Incorrectly ordered contents with tocloft

1  Asked on February 25, 2021

### The delete command of the Changes package reports an error on the formula

0  Asked on February 25, 2021 by zhenjiang-wu

### Write CSV in document with dynamic filename

1  Asked on February 25, 2021 by ana-cludia-faria

### How to create a custom decorator symbol in math mode (like tilde)

2  Asked on February 25, 2021 by bastian

### Side by Side information and Picture in Resume

1  Asked on February 25, 2021 by s-p-sharan