# How to draw a star like shape with Tikz

How do you draw a star like shape using Tikz, like the shape below

-
I see two triangles and a \draw (a)--(q)--.....(p); –  percusse Aug 3 at 14:35
Is G isobarycenter of the six points or common isobarycenter of the two triangles ? –  Tarass Aug 3 at 16:49
Sorry to bother you. I know that you have up-voted answers and that is great! However, you still haven't accepted any answer (a different action from up-voting). Please consider revisiting your questions and, for each one, accepting the answer that you consider best solved your problem. In case of doubt, please see How do you accept an answer?. –  Gonzalo Medina Aug 4 at 18:04

One option; the barycentric coordinate system was used to position the node "G":

\documentclass{article}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
\draw[dotted]
(0,0) coordinate (A) --
(4,1) coordinate (B) --
(4.5,2) coordinate (C) --
(3.8,3) coordinate (D) --
(1.6,4) coordinate (E) --
(-1,1.5) coordinate (F) --
cycle;
\draw[thick]
(B) -- (D) -- (F) -- cycle;
\draw[dashed]
(A) -- (C) -- (E) -- cycle;
\foreach \Coor/\Texto/\Pos in
{A/q/below,
B/b/below,
C/r/right,
D/c/right,
E/p/above,
F/a/left%
}
\node[circle,draw,inner sep=1.5pt,fill=white,label={\Pos:$\Texto$}]
at (\Coor) {};
\node[fill,circle,inner sep=1.5pt,label={right:$G$}]
at (barycentric cs:A=0.5,B=0.5,C=0.5,D=0.5,E=0.5,F=0.5) {};
\end{tikzpicture}

\end{document}


-
If all the barycentric factors are equal they allso could be 1. ;-) –  Tarass Aug 3 at 16:47

Just for typing exercise with PSTricks. The point G is the centroid of the outer most polygon.

\documentclass[pstricks,border=24pt,12pt]{standalone}
\usepackage{pst-eucl}

\begin{document}
\begin{pspicture}[showgrid=false](6,6)
\pstGeonode[PosAngle={180,90,45,0,-45,-135},CurveType=polygon,linestyle=dotted,dotsep=0.4pt]
(0,3){a}
(3,6){p}
(5,5){c}
(6,3){r}
(5.5,1){b}
(1,0){q}
\nodexn{(a)+(b)+(c)+(p)+(q)+(r)}{g}
\pstGeonode(!\psGetNodeCenter{g} g.x 6 div g.y 6 div){G}
\pspolygon(a)(b)(c)
\pspolygon[linestyle=dashed](p)(q)(r)
\foreach \pt in {a,b,c,p,q,r}{\psset{fillcolor=white,fillstyle=solid}\pscircle(\pt){2pt}}
\end{pspicture}
\end{document}


-
This is not an answer to the question posted, though. –  cfr Aug 3 at 19:40