Graphics, Figures & Tablespentagram in tikzpicture

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
another_texie
Posts: 2
Joined: Mon Jul 14, 2014 1:07 am

pentagram in tikzpicture

Post by another_texie »

Hi, does anyone have code for a pentagram in tikzpicture?
Thanks very much for any help.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

esdd
Posts: 36
Joined: Sat Jan 25, 2014 9:13 pm

pentagram in tikzpicture

Post by esdd »

A simple example is

Code: Select all

\documentclass[tikz,margin=5mm]{standalone}

\newcommand\Radius{2}
\begin{document}
\tikz\draw(90-144:\Radius)--(90:\Radius)--(90+144:\Radius)--
          (90-72:\Radius)--(90+72:\Radius)--cycle;
\end{document}
pentagram.png
pentagram.png (6.42 KiB) Viewed 6083 times
Best regards
Elke
another_texie
Posts: 2
Joined: Mon Jul 14, 2014 1:07 am

Re: pentagram in tikzpicture

Post by another_texie »

Hi Elke,

That's perfect.

Thanks very much.
andreafc
Posts: 1
Joined: Fri Aug 05, 2016 12:52 pm

Re: pentagram in tikzpicture

Post by andreafc »

Hi Elke,

thank you for this nice solution. However I'm confused about where the coordinates start, or basically which would be point 0,0 as center of the circle. If I write your code twice in a row, I get another pentagram next to the first one, but I can't make sense of how tikz decides where to move the center from one pentagram to the next one. Apparently it's not the last point of "cycle" and not the point before that.

Can you point me to a tutorial on this or any manual page or something?

Thank you.

AC
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

pentagram in tikzpicture

Post by Stefan Kottwitz »

Hi AC,

(0,0) is the center. Each image has certain dimensions. The images are simply placed next to each other, if you repeat it, no matter where (0,0) is.

Manual with tutorials included: tikz. Or type texdoc tikz or texdoc pgf at the command prompt of your computer.

Stefan
LaTeX.org admin
Post Reply