TeX - LaTeX Asked on January 17, 2021
a solution with two foreach loops
documentclass{article}
usepackage{tikz}
usetikzlibrary{calc}
begin{document}
begin{tikzpicture}
foreach aa in {0,1,2,...,5}{
draw (0,0)coordinate(O) -- ({aa*360/5}:2)coordinate(Paa);
}
draw
(P0)
foreach aa in {1,2,...,5}{--
(Paa)
}
-- cycle;
draw[fill] (O) circle (1mm);
end{tikzpicture}
end{document}
Correct answer by rpapa on January 17, 2021
A fast solution that you can create yourself with a tool called mathcha.
documentclass[12pt]{article}
usepackage{amsmath}
usepackage{tikz}
begin{document}
tikzset{every picture/.style={line width=0.75pt}}
begin{tikzpicture}[x=0.75pt,y=0.75pt,yscale=-1,xscale=1]
draw (259.15,107.06) -- (342.34,167.5) -- (310.57,265.29) -- (207.74,265.29) -- (175.97,167.5) -- cycle ;
%Straight Lines [id:da5500931558328854]
draw (259.15,107.06) -- (259.15,194.53) ;
%Straight Lines [id:da9807314972174233]
draw (175.97,167.5) -- (259.15,194.53) ;
%Straight Lines [id:da4619344120764781]
draw (342.34,167.5) -- (259.15,194.53) ;
%Straight Lines [id:da9720784168022731]
draw (259.15,194.53) -- (207.74,265.29) ;
%Straight Lines [id:da3200168995877415]
draw (259.15,194.53) -- (310.57,265.29) ;
%Shape: Circle [id:dp3653706700614776]
draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (254.65,194.53) .. controls (254.65,192.04) and (256.67,190.03) .. (259.15,190.03) .. controls (261.64,190.03) and (263.65,192.04) .. (263.65,194.53) .. controls (263.65,197.02) and (261.64,199.03) .. (259.15,199.03) .. controls (256.67,199.03) and (254.65,197.02) .. (254.65,194.53) -- cycle ;
draw (268,190.4) node [anchor=north west][inner sep=0.75pt] {large $A_{i}$};
end{tikzpicture}
end{document}
Answered by Sebastiano on January 17, 2021
If drawn shape is regular pentagon, than I would exploit TikZ library regular polygon
(see TikZ and PGF manual, pp 792, version 3.1.7a):
documentclass[tikz, margin=3.14159]{standalone}
usetikzlibrary{shapes.geometric}
begin{document}
begin{tikzpicture}
node (s) [regular polygon, regular polygon sides=5, draw,
minimum size=33mm] {$bullet$};
foreach i in {1,2,...,5}
draw (0,0) -- (s.corner i);
end{tikzpicture}
end{document}
Answered by Zarko on January 17, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP