How to fill a hexagon with vertices obtained from intersecting lines?












5














documentclass[12pt,border=15pt]{standalone}
usepackage{pst-poly,pst-eucl}
begin{document}
begin{pspicture}(-4,-3.5)(4,3.5)
psset{unit=3.5cm,PstPicture=false,dotsize=.03}
PstHexagon[PolyName=A]
pspolygon(A1)(A3)(A5)
pspolygon(A2)(A4)(A6)
foreach m/n/p/q in
{3/2/1/90,2/1/2/45,1/6/3/-45,6/5/4/-90,5/4/5/-135,4/3/6/135}{%
pstMiddleAB[PosAngle=q]{Am}{An}{M_p}}
foreach m/n/p in {0/1/3,70/2/2,110/3/1,180/4/6,-110/5/5,-70/6/4}
{uput[m](An){$A_p$}}
foreach m/n/p/q/t/r in {1/3/4/2/90/1,2/6/1/3/45/2,1/5/2/6/-45/3,1/5/4/6/-90/4,3/5/4/6/-135/5,2/4/3/5/135/6}{pstInterLL[PosAngle=t]{Am}{An}{Ap}{Aq}{C_r}}
foreach m/n in {1/3,2/4,3/5,4/6,5/1,6/2}{ncLine{M_m}{C_n}}
foreach i in {1,...,6}{psdot(Ai)}
end{pspicture}
end{document}


enter image description here



I don't want to use many pstInterLL calls to fill the green region above.



documentclass[12pt,border=15pt]{standalone}
usepackage{tikz}
begin{document}
begin{tikzpicture}
defr{3}
pgfmathsetmacro{rm}{r *sqrt(3)/2}
pgfmathsetmacro{rc}{rm *2/3}
foreach i in {1,...,6}{
draw (180-60*i:r) coordinate[label=$A_{i}$] (ai) --(120-60*i:r);
draw (180-60*i:r)--(60-60*i:r);
draw (150-60*i:rm) coordinate[label=$M_{i}$] (mi) --(30-60*i:rc);
draw (150-60*i:rc) coordinate[label=$C_{i}$] (ci) --(90-60*i:rc);
fill[black] (ai) circle (0.05);
fill[black] (mi) circle (0.05);
fill[black] (ci) circle (0.05);
}
end{tikzpicture}
end{document}


enter image description here



Awesome ... TikZ code is serene.



documentclass[12pt,border=15pt]{standalone}
usepackage{pst-poly,pst-eucl}
begin{document}
begin{pspicture}(-4,-3.5)(4,3.5)
psset{unit=3.5cm,PstPicture=false,dotsize=.03}
PstHexagon[PolyName=A]
pspolygon(A1)(A3)(A5)
pspolygon(A2)(A4)(A6)
foreach m/n/p/q in
{3/2/1/90,2/1/2/45,1/6/3/-45,6/5/4/-90,5/4/5/-135,4/3/6/135}{%
pstMiddleAB[PosAngle=q]{Am}{An}{Mp}}
foreach m/n/p in {0/1/3,70/2/2,110/3/1,180/4/6,-110/5/5,-70/6/4}
{uput[m](An){$A_p$}}
foreach m/n/p/q/t/r in {1/3/4/2/90/1,2/6/1/3/45/2,1/5/2/6/-45/3,1/5/4/6/-90/4,3/5/4/6/-135/5,2/4/3/5/135/6}{pstInterLL[PosAngle=t]{Am}{An}{Ap}{Aq}{Cr}}
foreach m/n/p/q/r in
{1/3/6/2/1,1/3/2/4/2,3/5/2/4/3,3/5/4/6/4,5/1/4/6/5,5/1/6/2/6}
{pstInterLL[PointName=none,PointSymbol=none]{Mm}{Cn}{Mp}{Cq}{ir}}
pspolygon*[linecolor=green](i1)(i2)(i3)(i4)(i5)(i6)
foreach m/n in {1/3,2/4,3/5,4/6,5/1,6/2}{ncLine{Mm}{Cn}}
foreach i in {1,...,6}{psdot(Ai)}
end{pspicture}
end{document}


enter image description here










share|improve this question




















  • 2




    If this were TikZ, I would use the intersections library to find the vertices.
    – John Kormylo
    2 days ago
















5














documentclass[12pt,border=15pt]{standalone}
usepackage{pst-poly,pst-eucl}
begin{document}
begin{pspicture}(-4,-3.5)(4,3.5)
psset{unit=3.5cm,PstPicture=false,dotsize=.03}
PstHexagon[PolyName=A]
pspolygon(A1)(A3)(A5)
pspolygon(A2)(A4)(A6)
foreach m/n/p/q in
{3/2/1/90,2/1/2/45,1/6/3/-45,6/5/4/-90,5/4/5/-135,4/3/6/135}{%
pstMiddleAB[PosAngle=q]{Am}{An}{M_p}}
foreach m/n/p in {0/1/3,70/2/2,110/3/1,180/4/6,-110/5/5,-70/6/4}
{uput[m](An){$A_p$}}
foreach m/n/p/q/t/r in {1/3/4/2/90/1,2/6/1/3/45/2,1/5/2/6/-45/3,1/5/4/6/-90/4,3/5/4/6/-135/5,2/4/3/5/135/6}{pstInterLL[PosAngle=t]{Am}{An}{Ap}{Aq}{C_r}}
foreach m/n in {1/3,2/4,3/5,4/6,5/1,6/2}{ncLine{M_m}{C_n}}
foreach i in {1,...,6}{psdot(Ai)}
end{pspicture}
end{document}


enter image description here



I don't want to use many pstInterLL calls to fill the green region above.



documentclass[12pt,border=15pt]{standalone}
usepackage{tikz}
begin{document}
begin{tikzpicture}
defr{3}
pgfmathsetmacro{rm}{r *sqrt(3)/2}
pgfmathsetmacro{rc}{rm *2/3}
foreach i in {1,...,6}{
draw (180-60*i:r) coordinate[label=$A_{i}$] (ai) --(120-60*i:r);
draw (180-60*i:r)--(60-60*i:r);
draw (150-60*i:rm) coordinate[label=$M_{i}$] (mi) --(30-60*i:rc);
draw (150-60*i:rc) coordinate[label=$C_{i}$] (ci) --(90-60*i:rc);
fill[black] (ai) circle (0.05);
fill[black] (mi) circle (0.05);
fill[black] (ci) circle (0.05);
}
end{tikzpicture}
end{document}


enter image description here



Awesome ... TikZ code is serene.



documentclass[12pt,border=15pt]{standalone}
usepackage{pst-poly,pst-eucl}
begin{document}
begin{pspicture}(-4,-3.5)(4,3.5)
psset{unit=3.5cm,PstPicture=false,dotsize=.03}
PstHexagon[PolyName=A]
pspolygon(A1)(A3)(A5)
pspolygon(A2)(A4)(A6)
foreach m/n/p/q in
{3/2/1/90,2/1/2/45,1/6/3/-45,6/5/4/-90,5/4/5/-135,4/3/6/135}{%
pstMiddleAB[PosAngle=q]{Am}{An}{Mp}}
foreach m/n/p in {0/1/3,70/2/2,110/3/1,180/4/6,-110/5/5,-70/6/4}
{uput[m](An){$A_p$}}
foreach m/n/p/q/t/r in {1/3/4/2/90/1,2/6/1/3/45/2,1/5/2/6/-45/3,1/5/4/6/-90/4,3/5/4/6/-135/5,2/4/3/5/135/6}{pstInterLL[PosAngle=t]{Am}{An}{Ap}{Aq}{Cr}}
foreach m/n/p/q/r in
{1/3/6/2/1,1/3/2/4/2,3/5/2/4/3,3/5/4/6/4,5/1/4/6/5,5/1/6/2/6}
{pstInterLL[PointName=none,PointSymbol=none]{Mm}{Cn}{Mp}{Cq}{ir}}
pspolygon*[linecolor=green](i1)(i2)(i3)(i4)(i5)(i6)
foreach m/n in {1/3,2/4,3/5,4/6,5/1,6/2}{ncLine{Mm}{Cn}}
foreach i in {1,...,6}{psdot(Ai)}
end{pspicture}
end{document}


enter image description here










share|improve this question




















  • 2




    If this were TikZ, I would use the intersections library to find the vertices.
    – John Kormylo
    2 days ago














5












5








5







documentclass[12pt,border=15pt]{standalone}
usepackage{pst-poly,pst-eucl}
begin{document}
begin{pspicture}(-4,-3.5)(4,3.5)
psset{unit=3.5cm,PstPicture=false,dotsize=.03}
PstHexagon[PolyName=A]
pspolygon(A1)(A3)(A5)
pspolygon(A2)(A4)(A6)
foreach m/n/p/q in
{3/2/1/90,2/1/2/45,1/6/3/-45,6/5/4/-90,5/4/5/-135,4/3/6/135}{%
pstMiddleAB[PosAngle=q]{Am}{An}{M_p}}
foreach m/n/p in {0/1/3,70/2/2,110/3/1,180/4/6,-110/5/5,-70/6/4}
{uput[m](An){$A_p$}}
foreach m/n/p/q/t/r in {1/3/4/2/90/1,2/6/1/3/45/2,1/5/2/6/-45/3,1/5/4/6/-90/4,3/5/4/6/-135/5,2/4/3/5/135/6}{pstInterLL[PosAngle=t]{Am}{An}{Ap}{Aq}{C_r}}
foreach m/n in {1/3,2/4,3/5,4/6,5/1,6/2}{ncLine{M_m}{C_n}}
foreach i in {1,...,6}{psdot(Ai)}
end{pspicture}
end{document}


enter image description here



I don't want to use many pstInterLL calls to fill the green region above.



documentclass[12pt,border=15pt]{standalone}
usepackage{tikz}
begin{document}
begin{tikzpicture}
defr{3}
pgfmathsetmacro{rm}{r *sqrt(3)/2}
pgfmathsetmacro{rc}{rm *2/3}
foreach i in {1,...,6}{
draw (180-60*i:r) coordinate[label=$A_{i}$] (ai) --(120-60*i:r);
draw (180-60*i:r)--(60-60*i:r);
draw (150-60*i:rm) coordinate[label=$M_{i}$] (mi) --(30-60*i:rc);
draw (150-60*i:rc) coordinate[label=$C_{i}$] (ci) --(90-60*i:rc);
fill[black] (ai) circle (0.05);
fill[black] (mi) circle (0.05);
fill[black] (ci) circle (0.05);
}
end{tikzpicture}
end{document}


enter image description here



Awesome ... TikZ code is serene.



documentclass[12pt,border=15pt]{standalone}
usepackage{pst-poly,pst-eucl}
begin{document}
begin{pspicture}(-4,-3.5)(4,3.5)
psset{unit=3.5cm,PstPicture=false,dotsize=.03}
PstHexagon[PolyName=A]
pspolygon(A1)(A3)(A5)
pspolygon(A2)(A4)(A6)
foreach m/n/p/q in
{3/2/1/90,2/1/2/45,1/6/3/-45,6/5/4/-90,5/4/5/-135,4/3/6/135}{%
pstMiddleAB[PosAngle=q]{Am}{An}{Mp}}
foreach m/n/p in {0/1/3,70/2/2,110/3/1,180/4/6,-110/5/5,-70/6/4}
{uput[m](An){$A_p$}}
foreach m/n/p/q/t/r in {1/3/4/2/90/1,2/6/1/3/45/2,1/5/2/6/-45/3,1/5/4/6/-90/4,3/5/4/6/-135/5,2/4/3/5/135/6}{pstInterLL[PosAngle=t]{Am}{An}{Ap}{Aq}{Cr}}
foreach m/n/p/q/r in
{1/3/6/2/1,1/3/2/4/2,3/5/2/4/3,3/5/4/6/4,5/1/4/6/5,5/1/6/2/6}
{pstInterLL[PointName=none,PointSymbol=none]{Mm}{Cn}{Mp}{Cq}{ir}}
pspolygon*[linecolor=green](i1)(i2)(i3)(i4)(i5)(i6)
foreach m/n in {1/3,2/4,3/5,4/6,5/1,6/2}{ncLine{Mm}{Cn}}
foreach i in {1,...,6}{psdot(Ai)}
end{pspicture}
end{document}


enter image description here










share|improve this question















documentclass[12pt,border=15pt]{standalone}
usepackage{pst-poly,pst-eucl}
begin{document}
begin{pspicture}(-4,-3.5)(4,3.5)
psset{unit=3.5cm,PstPicture=false,dotsize=.03}
PstHexagon[PolyName=A]
pspolygon(A1)(A3)(A5)
pspolygon(A2)(A4)(A6)
foreach m/n/p/q in
{3/2/1/90,2/1/2/45,1/6/3/-45,6/5/4/-90,5/4/5/-135,4/3/6/135}{%
pstMiddleAB[PosAngle=q]{Am}{An}{M_p}}
foreach m/n/p in {0/1/3,70/2/2,110/3/1,180/4/6,-110/5/5,-70/6/4}
{uput[m](An){$A_p$}}
foreach m/n/p/q/t/r in {1/3/4/2/90/1,2/6/1/3/45/2,1/5/2/6/-45/3,1/5/4/6/-90/4,3/5/4/6/-135/5,2/4/3/5/135/6}{pstInterLL[PosAngle=t]{Am}{An}{Ap}{Aq}{C_r}}
foreach m/n in {1/3,2/4,3/5,4/6,5/1,6/2}{ncLine{M_m}{C_n}}
foreach i in {1,...,6}{psdot(Ai)}
end{pspicture}
end{document}


enter image description here



I don't want to use many pstInterLL calls to fill the green region above.



documentclass[12pt,border=15pt]{standalone}
usepackage{tikz}
begin{document}
begin{tikzpicture}
defr{3}
pgfmathsetmacro{rm}{r *sqrt(3)/2}
pgfmathsetmacro{rc}{rm *2/3}
foreach i in {1,...,6}{
draw (180-60*i:r) coordinate[label=$A_{i}$] (ai) --(120-60*i:r);
draw (180-60*i:r)--(60-60*i:r);
draw (150-60*i:rm) coordinate[label=$M_{i}$] (mi) --(30-60*i:rc);
draw (150-60*i:rc) coordinate[label=$C_{i}$] (ci) --(90-60*i:rc);
fill[black] (ai) circle (0.05);
fill[black] (mi) circle (0.05);
fill[black] (ci) circle (0.05);
}
end{tikzpicture}
end{document}


enter image description here



Awesome ... TikZ code is serene.



documentclass[12pt,border=15pt]{standalone}
usepackage{pst-poly,pst-eucl}
begin{document}
begin{pspicture}(-4,-3.5)(4,3.5)
psset{unit=3.5cm,PstPicture=false,dotsize=.03}
PstHexagon[PolyName=A]
pspolygon(A1)(A3)(A5)
pspolygon(A2)(A4)(A6)
foreach m/n/p/q in
{3/2/1/90,2/1/2/45,1/6/3/-45,6/5/4/-90,5/4/5/-135,4/3/6/135}{%
pstMiddleAB[PosAngle=q]{Am}{An}{Mp}}
foreach m/n/p in {0/1/3,70/2/2,110/3/1,180/4/6,-110/5/5,-70/6/4}
{uput[m](An){$A_p$}}
foreach m/n/p/q/t/r in {1/3/4/2/90/1,2/6/1/3/45/2,1/5/2/6/-45/3,1/5/4/6/-90/4,3/5/4/6/-135/5,2/4/3/5/135/6}{pstInterLL[PosAngle=t]{Am}{An}{Ap}{Aq}{Cr}}
foreach m/n/p/q/r in
{1/3/6/2/1,1/3/2/4/2,3/5/2/4/3,3/5/4/6/4,5/1/4/6/5,5/1/6/2/6}
{pstInterLL[PointName=none,PointSymbol=none]{Mm}{Cn}{Mp}{Cq}{ir}}
pspolygon*[linecolor=green](i1)(i2)(i3)(i4)(i5)(i6)
foreach m/n in {1/3,2/4,3/5,4/6,5/1,6/2}{ncLine{Mm}{Cn}}
foreach i in {1,...,6}{psdot(Ai)}
end{pspicture}
end{document}


enter image description here







pstricks






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday







chishimotoji

















asked 2 days ago









chishimotojichishimotoji

595318




595318








  • 2




    If this were TikZ, I would use the intersections library to find the vertices.
    – John Kormylo
    2 days ago














  • 2




    If this were TikZ, I would use the intersections library to find the vertices.
    – John Kormylo
    2 days ago








2




2




If this were TikZ, I would use the intersections library to find the vertices.
– John Kormylo
2 days ago




If this were TikZ, I would use the intersections library to find the vertices.
– John Kormylo
2 days ago










4 Answers
4






active

oldest

votes


















3














Trivial lines are intentionally ignored for the sake of fun.



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

begin{document}
pspicture(-5,-5)(5,5)
foreach i in {1,...,6}{%
pstGeonode[PointName=A_i,PosAngle=thenumexpr(-i+1)*60+120](!5 pscalculate{(-i+1)*60+120} PtoC){Athenumexpri-1}
pstGeonode[PointName=M_i,PosAngle=thenumexpr(-i+1)*60+90](!5 60 sin mul pscalculate{(-i+1)*60+90} PtoC){Mthenumexpri-1}
pstGeonode[PointName=C_i,PosAngle=thenumexpr(-i+1)*60+90](!3 pscalculate{(-i+1)*60+90} PtoC){Cthenumexpri-1}
}
psnpolygon(0,5){A}
psnpolygon(0,5){C}
psset{PointName=none,PointSymbol=none}
pstInterLL{C0}{M4}{C1}{M5}{N0}
pnode(0,0){O}
foreach i in {1,...,5}{pstRotation[RotAngle=thenumexpr60*i]{O}{N0}[Ni]}
psnpolygon[fillstyle=solid,fillcolor=yellow](0,5){N}
endpspicture
end{document}


enter image description here






share|improve this answer

















  • 1




    psnpolygon(startindex,stopindex){nodenameprefix} creates a polygon based on a series of consecutive nodes.
    – God Must Be Crazy
    2 days ago










  • I made the labels radially outward because it is good.
    – God Must Be Crazy
    2 days ago










  • I got one down vote.
    – God Must Be Crazy
    yesterday



















5














This is in the case you do not want to compute things by yourself and let TikZ find the contour.



documentclass[12pt,border=15pt]{standalone}
usepackage{tikz}
usetikzlibrary{intersections,backgrounds}
begin{document}
begin{tikzpicture}
defr{3}
pgfmathsetmacro{rm}{r *sqrt(3)/2}
pgfmathsetmacro{rc}{rm *2/3}
foreach i in {1,...,6}{
draw (180-60*i:r) coordinate[label=180-60*i:$A_{i}$] (ai) --(120-60*i:r);
draw (180-60*i:r)--(60-60*i:r);
draw[name path global=i-path] (150-60*i:rm) coordinate[label=150-60*i:$M_{i}$] (mi) --(30-60*i:rc);
draw (150-60*i:rc) coordinate[label=150-60*i:$C_{i}$] (ci) --(90-60*i:rc);
fill[black] (ai) circle (0.05);
fill[black] (mi) circle (0.05);
fill[black] (ci) circle (0.05);
}
foreach i [remember=i as j (initially 6)] in {1,...,6}
{
path[name intersections={of=i-path and j-path,by=i-i}];
}
begin{scope}[on background layer]
fill[blue] plot[variable=i,samples=6,domain=1:6] (i-i);
end{scope}
end{tikzpicture}
end{document}


enter image description here






share|improve this answer



















  • 1




    Making radially outward labels might make it look nicer. :-)
    – God Must Be Crazy
    2 days ago






  • 1




    @GodMustBeCrazy You're right. Thanks! (Really easy to implement with TikZ.)
    – marmot
    2 days ago



















4














The shapes library can easily make hexagons:



documentclass[12pt,border=15pt]{standalone}
usepackage{tikz}
usetikzlibrary{shapes}
begin{document}
begin{tikzpicture}
node[fill=green!50!black,regular polygon, regular polygon sides=6,
inner sep=0.73cm,rotate=-7] at (0,0) {};
defr{3}
pgfmathsetmacro{rm}{r *sqrt(3)/2}
pgfmathsetmacro{rc}{rm *2/3}
foreach i in {1,...,6}{
draw (180-60*i:r) coordinate[label=$A_{i}$] (ai) --(120-60*i:r);
draw (180-60*i:r)--(60-60*i:r);
draw (150-60*i:rm) coordinate[label=$M_{i}$] (mi) --(30-60*i:rc);
draw (150-60*i:rc) coordinate[label=$C_{i}$] (ci) --(90-60*i:rc);
fill[black] (ai) circle (0.05);
fill[black] (mi) circle (0.05);
fill[black] (ci) circle (0.05);
}
end{tikzpicture}
end{document}


enter image description here






share|improve this answer





























    3














    Can be simplified with some psforeach



    documentclass[12pt,border=15pt]{standalone}
    usepackage{pst-eucl}
    begin{document}
    begin{pspicture}(-4,-3.5)(4,3.5)
    degrees[6]
    multido{iA=1+1}{6}{pnode(3;iA){AiA}uput[iA]{0}(AiA){$A_iA$}}
    multido{iA=1+1,iB=2+1}{5}{psLNode(AiA)(AiB){0.5}{MiA}uput[iA]{0}(MiA){$M_iA$}}
    psLNode(A6)(A1){0.5}{M6}uput[6]{0}(M6){$M_6$}
    pspolygon[linejoin=2](A1)(A3)(A5)(A6)(A2)(A4)(A6)(A5)(A4)(A3)(A2)(A1)(A5)(A6)
    multido{iA=1+1,iB=3+1}{4}{%
    psLNode(AiA)(AiB){0.333}{CiA}qdisk(CiA){2pt}%
    uput[iA]{0}(CiA){$C_iA$}}
    psLNode(A5)(A1){0.333}{C5}qdisk(C5){2pt}uput[5]{0}(C5){$C_5$}
    psLNode(A6)(A2){0.333}{C6}qdisk(C6){2pt}uput[6]{0}(C6){$C_6$}
    multido{iA=3+1,iB=1+1}{4}{psline(MiA)(CiB)}
    psline(M1)(C5)psline(M2)(C6)
    psset{PointName=none,PointSymbol=none}
    pstInterLL{M1}{C5}{M2}{C6}{i1} pstInterLL{M2}{C6}{M3}{C1}{i2}
    pstInterLL{M3}{C1}{M4}{C2}{i3} pstInterLL{M4}{C2}{M5}{C3}{i4}
    pstInterLL{M5}{C3}{M6}{C4}{i5} pstInterLL{M6}{C4}{M1}{C5}{i6}
    pspolygon*[linecolor=blue](i1)(i2)(i3)(i4)(i5)(i6)
    end{pspicture}

    end{document}


    enter image description here



    and a shorter version without intersections:



    begin{pspicture}(-4,-3.5)(4,3.5)
    degrees[6]
    multido{iA=1+1}{6}{pnode(3;iA){AiA}uput[iA]{0}(AiA){$A_iA$}}
    multido{iA=1+1,iB=2+1}{5}{psLNode(AiA)(AiB){0.5}{MiA}uput[iA]{0}(MiA){$M_iA$}}
    psLNode(A6)(A1){0.5}{M6}uput[6]{0}(M6){$M_6$}
    pspolygon(A1)(A2)(A3)(A4)(A5)(A6)pspolygon(A1)(A3)(A5)pspolygon(A2)(A4)(A6)
    multido{iA=1+1,iB=3+1}{4}{%
    psLNode(AiA)(AiB){0.333}{CiA}qdisk(CiA){2pt}%
    uput[iA]{0}(CiA){$C_iA$}}
    psLNode(A5)(A1){0.333}{C5}qdisk(C5){2pt}uput[5]{0}(C5){$C_5$}
    psLNode(A6)(A2){0.333}{C6}qdisk(C6){2pt}uput[6]{0}(C6){$C_6$}
    multido{iA=3+1,iB=1+1}{4}{psline(MiA)(CiB)}
    psline(M1)(C5)psline(M2)(C6)
    pspolygon*[linecolor=red!40]%
    (1.19;0.9)(1.19;1.9)(1.19;2.9)(1.19;3.9)(1.19;4.9)(1.19;5.9)
    end{pspicture}





    share|improve this answer























    • Yes, thank you ...
      – chishimotoji
      yesterday










    • OP's node names are placed clockwise and you forgot the line A2-A4.
      – God Must Be Crazy
      19 hours ago











    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f469184%2fhow-to-fill-a-hexagon-with-vertices-obtained-from-intersecting-lines%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    4 Answers
    4






    active

    oldest

    votes








    4 Answers
    4






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    Trivial lines are intentionally ignored for the sake of fun.



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

    begin{document}
    pspicture(-5,-5)(5,5)
    foreach i in {1,...,6}{%
    pstGeonode[PointName=A_i,PosAngle=thenumexpr(-i+1)*60+120](!5 pscalculate{(-i+1)*60+120} PtoC){Athenumexpri-1}
    pstGeonode[PointName=M_i,PosAngle=thenumexpr(-i+1)*60+90](!5 60 sin mul pscalculate{(-i+1)*60+90} PtoC){Mthenumexpri-1}
    pstGeonode[PointName=C_i,PosAngle=thenumexpr(-i+1)*60+90](!3 pscalculate{(-i+1)*60+90} PtoC){Cthenumexpri-1}
    }
    psnpolygon(0,5){A}
    psnpolygon(0,5){C}
    psset{PointName=none,PointSymbol=none}
    pstInterLL{C0}{M4}{C1}{M5}{N0}
    pnode(0,0){O}
    foreach i in {1,...,5}{pstRotation[RotAngle=thenumexpr60*i]{O}{N0}[Ni]}
    psnpolygon[fillstyle=solid,fillcolor=yellow](0,5){N}
    endpspicture
    end{document}


    enter image description here






    share|improve this answer

















    • 1




      psnpolygon(startindex,stopindex){nodenameprefix} creates a polygon based on a series of consecutive nodes.
      – God Must Be Crazy
      2 days ago










    • I made the labels radially outward because it is good.
      – God Must Be Crazy
      2 days ago










    • I got one down vote.
      – God Must Be Crazy
      yesterday
















    3














    Trivial lines are intentionally ignored for the sake of fun.



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

    begin{document}
    pspicture(-5,-5)(5,5)
    foreach i in {1,...,6}{%
    pstGeonode[PointName=A_i,PosAngle=thenumexpr(-i+1)*60+120](!5 pscalculate{(-i+1)*60+120} PtoC){Athenumexpri-1}
    pstGeonode[PointName=M_i,PosAngle=thenumexpr(-i+1)*60+90](!5 60 sin mul pscalculate{(-i+1)*60+90} PtoC){Mthenumexpri-1}
    pstGeonode[PointName=C_i,PosAngle=thenumexpr(-i+1)*60+90](!3 pscalculate{(-i+1)*60+90} PtoC){Cthenumexpri-1}
    }
    psnpolygon(0,5){A}
    psnpolygon(0,5){C}
    psset{PointName=none,PointSymbol=none}
    pstInterLL{C0}{M4}{C1}{M5}{N0}
    pnode(0,0){O}
    foreach i in {1,...,5}{pstRotation[RotAngle=thenumexpr60*i]{O}{N0}[Ni]}
    psnpolygon[fillstyle=solid,fillcolor=yellow](0,5){N}
    endpspicture
    end{document}


    enter image description here






    share|improve this answer

















    • 1




      psnpolygon(startindex,stopindex){nodenameprefix} creates a polygon based on a series of consecutive nodes.
      – God Must Be Crazy
      2 days ago










    • I made the labels radially outward because it is good.
      – God Must Be Crazy
      2 days ago










    • I got one down vote.
      – God Must Be Crazy
      yesterday














    3












    3








    3






    Trivial lines are intentionally ignored for the sake of fun.



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

    begin{document}
    pspicture(-5,-5)(5,5)
    foreach i in {1,...,6}{%
    pstGeonode[PointName=A_i,PosAngle=thenumexpr(-i+1)*60+120](!5 pscalculate{(-i+1)*60+120} PtoC){Athenumexpri-1}
    pstGeonode[PointName=M_i,PosAngle=thenumexpr(-i+1)*60+90](!5 60 sin mul pscalculate{(-i+1)*60+90} PtoC){Mthenumexpri-1}
    pstGeonode[PointName=C_i,PosAngle=thenumexpr(-i+1)*60+90](!3 pscalculate{(-i+1)*60+90} PtoC){Cthenumexpri-1}
    }
    psnpolygon(0,5){A}
    psnpolygon(0,5){C}
    psset{PointName=none,PointSymbol=none}
    pstInterLL{C0}{M4}{C1}{M5}{N0}
    pnode(0,0){O}
    foreach i in {1,...,5}{pstRotation[RotAngle=thenumexpr60*i]{O}{N0}[Ni]}
    psnpolygon[fillstyle=solid,fillcolor=yellow](0,5){N}
    endpspicture
    end{document}


    enter image description here






    share|improve this answer












    Trivial lines are intentionally ignored for the sake of fun.



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

    begin{document}
    pspicture(-5,-5)(5,5)
    foreach i in {1,...,6}{%
    pstGeonode[PointName=A_i,PosAngle=thenumexpr(-i+1)*60+120](!5 pscalculate{(-i+1)*60+120} PtoC){Athenumexpri-1}
    pstGeonode[PointName=M_i,PosAngle=thenumexpr(-i+1)*60+90](!5 60 sin mul pscalculate{(-i+1)*60+90} PtoC){Mthenumexpri-1}
    pstGeonode[PointName=C_i,PosAngle=thenumexpr(-i+1)*60+90](!3 pscalculate{(-i+1)*60+90} PtoC){Cthenumexpri-1}
    }
    psnpolygon(0,5){A}
    psnpolygon(0,5){C}
    psset{PointName=none,PointSymbol=none}
    pstInterLL{C0}{M4}{C1}{M5}{N0}
    pnode(0,0){O}
    foreach i in {1,...,5}{pstRotation[RotAngle=thenumexpr60*i]{O}{N0}[Ni]}
    psnpolygon[fillstyle=solid,fillcolor=yellow](0,5){N}
    endpspicture
    end{document}


    enter image description here







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered 2 days ago









    God Must Be CrazyGod Must Be Crazy

    6,02511039




    6,02511039








    • 1




      psnpolygon(startindex,stopindex){nodenameprefix} creates a polygon based on a series of consecutive nodes.
      – God Must Be Crazy
      2 days ago










    • I made the labels radially outward because it is good.
      – God Must Be Crazy
      2 days ago










    • I got one down vote.
      – God Must Be Crazy
      yesterday














    • 1




      psnpolygon(startindex,stopindex){nodenameprefix} creates a polygon based on a series of consecutive nodes.
      – God Must Be Crazy
      2 days ago










    • I made the labels radially outward because it is good.
      – God Must Be Crazy
      2 days ago










    • I got one down vote.
      – God Must Be Crazy
      yesterday








    1




    1




    psnpolygon(startindex,stopindex){nodenameprefix} creates a polygon based on a series of consecutive nodes.
    – God Must Be Crazy
    2 days ago




    psnpolygon(startindex,stopindex){nodenameprefix} creates a polygon based on a series of consecutive nodes.
    – God Must Be Crazy
    2 days ago












    I made the labels radially outward because it is good.
    – God Must Be Crazy
    2 days ago




    I made the labels radially outward because it is good.
    – God Must Be Crazy
    2 days ago












    I got one down vote.
    – God Must Be Crazy
    yesterday




    I got one down vote.
    – God Must Be Crazy
    yesterday











    5














    This is in the case you do not want to compute things by yourself and let TikZ find the contour.



    documentclass[12pt,border=15pt]{standalone}
    usepackage{tikz}
    usetikzlibrary{intersections,backgrounds}
    begin{document}
    begin{tikzpicture}
    defr{3}
    pgfmathsetmacro{rm}{r *sqrt(3)/2}
    pgfmathsetmacro{rc}{rm *2/3}
    foreach i in {1,...,6}{
    draw (180-60*i:r) coordinate[label=180-60*i:$A_{i}$] (ai) --(120-60*i:r);
    draw (180-60*i:r)--(60-60*i:r);
    draw[name path global=i-path] (150-60*i:rm) coordinate[label=150-60*i:$M_{i}$] (mi) --(30-60*i:rc);
    draw (150-60*i:rc) coordinate[label=150-60*i:$C_{i}$] (ci) --(90-60*i:rc);
    fill[black] (ai) circle (0.05);
    fill[black] (mi) circle (0.05);
    fill[black] (ci) circle (0.05);
    }
    foreach i [remember=i as j (initially 6)] in {1,...,6}
    {
    path[name intersections={of=i-path and j-path,by=i-i}];
    }
    begin{scope}[on background layer]
    fill[blue] plot[variable=i,samples=6,domain=1:6] (i-i);
    end{scope}
    end{tikzpicture}
    end{document}


    enter image description here






    share|improve this answer



















    • 1




      Making radially outward labels might make it look nicer. :-)
      – God Must Be Crazy
      2 days ago






    • 1




      @GodMustBeCrazy You're right. Thanks! (Really easy to implement with TikZ.)
      – marmot
      2 days ago
















    5














    This is in the case you do not want to compute things by yourself and let TikZ find the contour.



    documentclass[12pt,border=15pt]{standalone}
    usepackage{tikz}
    usetikzlibrary{intersections,backgrounds}
    begin{document}
    begin{tikzpicture}
    defr{3}
    pgfmathsetmacro{rm}{r *sqrt(3)/2}
    pgfmathsetmacro{rc}{rm *2/3}
    foreach i in {1,...,6}{
    draw (180-60*i:r) coordinate[label=180-60*i:$A_{i}$] (ai) --(120-60*i:r);
    draw (180-60*i:r)--(60-60*i:r);
    draw[name path global=i-path] (150-60*i:rm) coordinate[label=150-60*i:$M_{i}$] (mi) --(30-60*i:rc);
    draw (150-60*i:rc) coordinate[label=150-60*i:$C_{i}$] (ci) --(90-60*i:rc);
    fill[black] (ai) circle (0.05);
    fill[black] (mi) circle (0.05);
    fill[black] (ci) circle (0.05);
    }
    foreach i [remember=i as j (initially 6)] in {1,...,6}
    {
    path[name intersections={of=i-path and j-path,by=i-i}];
    }
    begin{scope}[on background layer]
    fill[blue] plot[variable=i,samples=6,domain=1:6] (i-i);
    end{scope}
    end{tikzpicture}
    end{document}


    enter image description here






    share|improve this answer



















    • 1




      Making radially outward labels might make it look nicer. :-)
      – God Must Be Crazy
      2 days ago






    • 1




      @GodMustBeCrazy You're right. Thanks! (Really easy to implement with TikZ.)
      – marmot
      2 days ago














    5












    5








    5






    This is in the case you do not want to compute things by yourself and let TikZ find the contour.



    documentclass[12pt,border=15pt]{standalone}
    usepackage{tikz}
    usetikzlibrary{intersections,backgrounds}
    begin{document}
    begin{tikzpicture}
    defr{3}
    pgfmathsetmacro{rm}{r *sqrt(3)/2}
    pgfmathsetmacro{rc}{rm *2/3}
    foreach i in {1,...,6}{
    draw (180-60*i:r) coordinate[label=180-60*i:$A_{i}$] (ai) --(120-60*i:r);
    draw (180-60*i:r)--(60-60*i:r);
    draw[name path global=i-path] (150-60*i:rm) coordinate[label=150-60*i:$M_{i}$] (mi) --(30-60*i:rc);
    draw (150-60*i:rc) coordinate[label=150-60*i:$C_{i}$] (ci) --(90-60*i:rc);
    fill[black] (ai) circle (0.05);
    fill[black] (mi) circle (0.05);
    fill[black] (ci) circle (0.05);
    }
    foreach i [remember=i as j (initially 6)] in {1,...,6}
    {
    path[name intersections={of=i-path and j-path,by=i-i}];
    }
    begin{scope}[on background layer]
    fill[blue] plot[variable=i,samples=6,domain=1:6] (i-i);
    end{scope}
    end{tikzpicture}
    end{document}


    enter image description here






    share|improve this answer














    This is in the case you do not want to compute things by yourself and let TikZ find the contour.



    documentclass[12pt,border=15pt]{standalone}
    usepackage{tikz}
    usetikzlibrary{intersections,backgrounds}
    begin{document}
    begin{tikzpicture}
    defr{3}
    pgfmathsetmacro{rm}{r *sqrt(3)/2}
    pgfmathsetmacro{rc}{rm *2/3}
    foreach i in {1,...,6}{
    draw (180-60*i:r) coordinate[label=180-60*i:$A_{i}$] (ai) --(120-60*i:r);
    draw (180-60*i:r)--(60-60*i:r);
    draw[name path global=i-path] (150-60*i:rm) coordinate[label=150-60*i:$M_{i}$] (mi) --(30-60*i:rc);
    draw (150-60*i:rc) coordinate[label=150-60*i:$C_{i}$] (ci) --(90-60*i:rc);
    fill[black] (ai) circle (0.05);
    fill[black] (mi) circle (0.05);
    fill[black] (ci) circle (0.05);
    }
    foreach i [remember=i as j (initially 6)] in {1,...,6}
    {
    path[name intersections={of=i-path and j-path,by=i-i}];
    }
    begin{scope}[on background layer]
    fill[blue] plot[variable=i,samples=6,domain=1:6] (i-i);
    end{scope}
    end{tikzpicture}
    end{document}


    enter image description here







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 2 days ago

























    answered 2 days ago









    marmotmarmot

    90.3k4104195




    90.3k4104195








    • 1




      Making radially outward labels might make it look nicer. :-)
      – God Must Be Crazy
      2 days ago






    • 1




      @GodMustBeCrazy You're right. Thanks! (Really easy to implement with TikZ.)
      – marmot
      2 days ago














    • 1




      Making radially outward labels might make it look nicer. :-)
      – God Must Be Crazy
      2 days ago






    • 1




      @GodMustBeCrazy You're right. Thanks! (Really easy to implement with TikZ.)
      – marmot
      2 days ago








    1




    1




    Making radially outward labels might make it look nicer. :-)
    – God Must Be Crazy
    2 days ago




    Making radially outward labels might make it look nicer. :-)
    – God Must Be Crazy
    2 days ago




    1




    1




    @GodMustBeCrazy You're right. Thanks! (Really easy to implement with TikZ.)
    – marmot
    2 days ago




    @GodMustBeCrazy You're right. Thanks! (Really easy to implement with TikZ.)
    – marmot
    2 days ago











    4














    The shapes library can easily make hexagons:



    documentclass[12pt,border=15pt]{standalone}
    usepackage{tikz}
    usetikzlibrary{shapes}
    begin{document}
    begin{tikzpicture}
    node[fill=green!50!black,regular polygon, regular polygon sides=6,
    inner sep=0.73cm,rotate=-7] at (0,0) {};
    defr{3}
    pgfmathsetmacro{rm}{r *sqrt(3)/2}
    pgfmathsetmacro{rc}{rm *2/3}
    foreach i in {1,...,6}{
    draw (180-60*i:r) coordinate[label=$A_{i}$] (ai) --(120-60*i:r);
    draw (180-60*i:r)--(60-60*i:r);
    draw (150-60*i:rm) coordinate[label=$M_{i}$] (mi) --(30-60*i:rc);
    draw (150-60*i:rc) coordinate[label=$C_{i}$] (ci) --(90-60*i:rc);
    fill[black] (ai) circle (0.05);
    fill[black] (mi) circle (0.05);
    fill[black] (ci) circle (0.05);
    }
    end{tikzpicture}
    end{document}


    enter image description here






    share|improve this answer


























      4














      The shapes library can easily make hexagons:



      documentclass[12pt,border=15pt]{standalone}
      usepackage{tikz}
      usetikzlibrary{shapes}
      begin{document}
      begin{tikzpicture}
      node[fill=green!50!black,regular polygon, regular polygon sides=6,
      inner sep=0.73cm,rotate=-7] at (0,0) {};
      defr{3}
      pgfmathsetmacro{rm}{r *sqrt(3)/2}
      pgfmathsetmacro{rc}{rm *2/3}
      foreach i in {1,...,6}{
      draw (180-60*i:r) coordinate[label=$A_{i}$] (ai) --(120-60*i:r);
      draw (180-60*i:r)--(60-60*i:r);
      draw (150-60*i:rm) coordinate[label=$M_{i}$] (mi) --(30-60*i:rc);
      draw (150-60*i:rc) coordinate[label=$C_{i}$] (ci) --(90-60*i:rc);
      fill[black] (ai) circle (0.05);
      fill[black] (mi) circle (0.05);
      fill[black] (ci) circle (0.05);
      }
      end{tikzpicture}
      end{document}


      enter image description here






      share|improve this answer
























        4












        4








        4






        The shapes library can easily make hexagons:



        documentclass[12pt,border=15pt]{standalone}
        usepackage{tikz}
        usetikzlibrary{shapes}
        begin{document}
        begin{tikzpicture}
        node[fill=green!50!black,regular polygon, regular polygon sides=6,
        inner sep=0.73cm,rotate=-7] at (0,0) {};
        defr{3}
        pgfmathsetmacro{rm}{r *sqrt(3)/2}
        pgfmathsetmacro{rc}{rm *2/3}
        foreach i in {1,...,6}{
        draw (180-60*i:r) coordinate[label=$A_{i}$] (ai) --(120-60*i:r);
        draw (180-60*i:r)--(60-60*i:r);
        draw (150-60*i:rm) coordinate[label=$M_{i}$] (mi) --(30-60*i:rc);
        draw (150-60*i:rc) coordinate[label=$C_{i}$] (ci) --(90-60*i:rc);
        fill[black] (ai) circle (0.05);
        fill[black] (mi) circle (0.05);
        fill[black] (ci) circle (0.05);
        }
        end{tikzpicture}
        end{document}


        enter image description here






        share|improve this answer












        The shapes library can easily make hexagons:



        documentclass[12pt,border=15pt]{standalone}
        usepackage{tikz}
        usetikzlibrary{shapes}
        begin{document}
        begin{tikzpicture}
        node[fill=green!50!black,regular polygon, regular polygon sides=6,
        inner sep=0.73cm,rotate=-7] at (0,0) {};
        defr{3}
        pgfmathsetmacro{rm}{r *sqrt(3)/2}
        pgfmathsetmacro{rc}{rm *2/3}
        foreach i in {1,...,6}{
        draw (180-60*i:r) coordinate[label=$A_{i}$] (ai) --(120-60*i:r);
        draw (180-60*i:r)--(60-60*i:r);
        draw (150-60*i:rm) coordinate[label=$M_{i}$] (mi) --(30-60*i:rc);
        draw (150-60*i:rc) coordinate[label=$C_{i}$] (ci) --(90-60*i:rc);
        fill[black] (ai) circle (0.05);
        fill[black] (mi) circle (0.05);
        fill[black] (ci) circle (0.05);
        }
        end{tikzpicture}
        end{document}


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 days ago









        user177954user177954

        1256




        1256























            3














            Can be simplified with some psforeach



            documentclass[12pt,border=15pt]{standalone}
            usepackage{pst-eucl}
            begin{document}
            begin{pspicture}(-4,-3.5)(4,3.5)
            degrees[6]
            multido{iA=1+1}{6}{pnode(3;iA){AiA}uput[iA]{0}(AiA){$A_iA$}}
            multido{iA=1+1,iB=2+1}{5}{psLNode(AiA)(AiB){0.5}{MiA}uput[iA]{0}(MiA){$M_iA$}}
            psLNode(A6)(A1){0.5}{M6}uput[6]{0}(M6){$M_6$}
            pspolygon[linejoin=2](A1)(A3)(A5)(A6)(A2)(A4)(A6)(A5)(A4)(A3)(A2)(A1)(A5)(A6)
            multido{iA=1+1,iB=3+1}{4}{%
            psLNode(AiA)(AiB){0.333}{CiA}qdisk(CiA){2pt}%
            uput[iA]{0}(CiA){$C_iA$}}
            psLNode(A5)(A1){0.333}{C5}qdisk(C5){2pt}uput[5]{0}(C5){$C_5$}
            psLNode(A6)(A2){0.333}{C6}qdisk(C6){2pt}uput[6]{0}(C6){$C_6$}
            multido{iA=3+1,iB=1+1}{4}{psline(MiA)(CiB)}
            psline(M1)(C5)psline(M2)(C6)
            psset{PointName=none,PointSymbol=none}
            pstInterLL{M1}{C5}{M2}{C6}{i1} pstInterLL{M2}{C6}{M3}{C1}{i2}
            pstInterLL{M3}{C1}{M4}{C2}{i3} pstInterLL{M4}{C2}{M5}{C3}{i4}
            pstInterLL{M5}{C3}{M6}{C4}{i5} pstInterLL{M6}{C4}{M1}{C5}{i6}
            pspolygon*[linecolor=blue](i1)(i2)(i3)(i4)(i5)(i6)
            end{pspicture}

            end{document}


            enter image description here



            and a shorter version without intersections:



            begin{pspicture}(-4,-3.5)(4,3.5)
            degrees[6]
            multido{iA=1+1}{6}{pnode(3;iA){AiA}uput[iA]{0}(AiA){$A_iA$}}
            multido{iA=1+1,iB=2+1}{5}{psLNode(AiA)(AiB){0.5}{MiA}uput[iA]{0}(MiA){$M_iA$}}
            psLNode(A6)(A1){0.5}{M6}uput[6]{0}(M6){$M_6$}
            pspolygon(A1)(A2)(A3)(A4)(A5)(A6)pspolygon(A1)(A3)(A5)pspolygon(A2)(A4)(A6)
            multido{iA=1+1,iB=3+1}{4}{%
            psLNode(AiA)(AiB){0.333}{CiA}qdisk(CiA){2pt}%
            uput[iA]{0}(CiA){$C_iA$}}
            psLNode(A5)(A1){0.333}{C5}qdisk(C5){2pt}uput[5]{0}(C5){$C_5$}
            psLNode(A6)(A2){0.333}{C6}qdisk(C6){2pt}uput[6]{0}(C6){$C_6$}
            multido{iA=3+1,iB=1+1}{4}{psline(MiA)(CiB)}
            psline(M1)(C5)psline(M2)(C6)
            pspolygon*[linecolor=red!40]%
            (1.19;0.9)(1.19;1.9)(1.19;2.9)(1.19;3.9)(1.19;4.9)(1.19;5.9)
            end{pspicture}





            share|improve this answer























            • Yes, thank you ...
              – chishimotoji
              yesterday










            • OP's node names are placed clockwise and you forgot the line A2-A4.
              – God Must Be Crazy
              19 hours ago
















            3














            Can be simplified with some psforeach



            documentclass[12pt,border=15pt]{standalone}
            usepackage{pst-eucl}
            begin{document}
            begin{pspicture}(-4,-3.5)(4,3.5)
            degrees[6]
            multido{iA=1+1}{6}{pnode(3;iA){AiA}uput[iA]{0}(AiA){$A_iA$}}
            multido{iA=1+1,iB=2+1}{5}{psLNode(AiA)(AiB){0.5}{MiA}uput[iA]{0}(MiA){$M_iA$}}
            psLNode(A6)(A1){0.5}{M6}uput[6]{0}(M6){$M_6$}
            pspolygon[linejoin=2](A1)(A3)(A5)(A6)(A2)(A4)(A6)(A5)(A4)(A3)(A2)(A1)(A5)(A6)
            multido{iA=1+1,iB=3+1}{4}{%
            psLNode(AiA)(AiB){0.333}{CiA}qdisk(CiA){2pt}%
            uput[iA]{0}(CiA){$C_iA$}}
            psLNode(A5)(A1){0.333}{C5}qdisk(C5){2pt}uput[5]{0}(C5){$C_5$}
            psLNode(A6)(A2){0.333}{C6}qdisk(C6){2pt}uput[6]{0}(C6){$C_6$}
            multido{iA=3+1,iB=1+1}{4}{psline(MiA)(CiB)}
            psline(M1)(C5)psline(M2)(C6)
            psset{PointName=none,PointSymbol=none}
            pstInterLL{M1}{C5}{M2}{C6}{i1} pstInterLL{M2}{C6}{M3}{C1}{i2}
            pstInterLL{M3}{C1}{M4}{C2}{i3} pstInterLL{M4}{C2}{M5}{C3}{i4}
            pstInterLL{M5}{C3}{M6}{C4}{i5} pstInterLL{M6}{C4}{M1}{C5}{i6}
            pspolygon*[linecolor=blue](i1)(i2)(i3)(i4)(i5)(i6)
            end{pspicture}

            end{document}


            enter image description here



            and a shorter version without intersections:



            begin{pspicture}(-4,-3.5)(4,3.5)
            degrees[6]
            multido{iA=1+1}{6}{pnode(3;iA){AiA}uput[iA]{0}(AiA){$A_iA$}}
            multido{iA=1+1,iB=2+1}{5}{psLNode(AiA)(AiB){0.5}{MiA}uput[iA]{0}(MiA){$M_iA$}}
            psLNode(A6)(A1){0.5}{M6}uput[6]{0}(M6){$M_6$}
            pspolygon(A1)(A2)(A3)(A4)(A5)(A6)pspolygon(A1)(A3)(A5)pspolygon(A2)(A4)(A6)
            multido{iA=1+1,iB=3+1}{4}{%
            psLNode(AiA)(AiB){0.333}{CiA}qdisk(CiA){2pt}%
            uput[iA]{0}(CiA){$C_iA$}}
            psLNode(A5)(A1){0.333}{C5}qdisk(C5){2pt}uput[5]{0}(C5){$C_5$}
            psLNode(A6)(A2){0.333}{C6}qdisk(C6){2pt}uput[6]{0}(C6){$C_6$}
            multido{iA=3+1,iB=1+1}{4}{psline(MiA)(CiB)}
            psline(M1)(C5)psline(M2)(C6)
            pspolygon*[linecolor=red!40]%
            (1.19;0.9)(1.19;1.9)(1.19;2.9)(1.19;3.9)(1.19;4.9)(1.19;5.9)
            end{pspicture}





            share|improve this answer























            • Yes, thank you ...
              – chishimotoji
              yesterday










            • OP's node names are placed clockwise and you forgot the line A2-A4.
              – God Must Be Crazy
              19 hours ago














            3












            3








            3






            Can be simplified with some psforeach



            documentclass[12pt,border=15pt]{standalone}
            usepackage{pst-eucl}
            begin{document}
            begin{pspicture}(-4,-3.5)(4,3.5)
            degrees[6]
            multido{iA=1+1}{6}{pnode(3;iA){AiA}uput[iA]{0}(AiA){$A_iA$}}
            multido{iA=1+1,iB=2+1}{5}{psLNode(AiA)(AiB){0.5}{MiA}uput[iA]{0}(MiA){$M_iA$}}
            psLNode(A6)(A1){0.5}{M6}uput[6]{0}(M6){$M_6$}
            pspolygon[linejoin=2](A1)(A3)(A5)(A6)(A2)(A4)(A6)(A5)(A4)(A3)(A2)(A1)(A5)(A6)
            multido{iA=1+1,iB=3+1}{4}{%
            psLNode(AiA)(AiB){0.333}{CiA}qdisk(CiA){2pt}%
            uput[iA]{0}(CiA){$C_iA$}}
            psLNode(A5)(A1){0.333}{C5}qdisk(C5){2pt}uput[5]{0}(C5){$C_5$}
            psLNode(A6)(A2){0.333}{C6}qdisk(C6){2pt}uput[6]{0}(C6){$C_6$}
            multido{iA=3+1,iB=1+1}{4}{psline(MiA)(CiB)}
            psline(M1)(C5)psline(M2)(C6)
            psset{PointName=none,PointSymbol=none}
            pstInterLL{M1}{C5}{M2}{C6}{i1} pstInterLL{M2}{C6}{M3}{C1}{i2}
            pstInterLL{M3}{C1}{M4}{C2}{i3} pstInterLL{M4}{C2}{M5}{C3}{i4}
            pstInterLL{M5}{C3}{M6}{C4}{i5} pstInterLL{M6}{C4}{M1}{C5}{i6}
            pspolygon*[linecolor=blue](i1)(i2)(i3)(i4)(i5)(i6)
            end{pspicture}

            end{document}


            enter image description here



            and a shorter version without intersections:



            begin{pspicture}(-4,-3.5)(4,3.5)
            degrees[6]
            multido{iA=1+1}{6}{pnode(3;iA){AiA}uput[iA]{0}(AiA){$A_iA$}}
            multido{iA=1+1,iB=2+1}{5}{psLNode(AiA)(AiB){0.5}{MiA}uput[iA]{0}(MiA){$M_iA$}}
            psLNode(A6)(A1){0.5}{M6}uput[6]{0}(M6){$M_6$}
            pspolygon(A1)(A2)(A3)(A4)(A5)(A6)pspolygon(A1)(A3)(A5)pspolygon(A2)(A4)(A6)
            multido{iA=1+1,iB=3+1}{4}{%
            psLNode(AiA)(AiB){0.333}{CiA}qdisk(CiA){2pt}%
            uput[iA]{0}(CiA){$C_iA$}}
            psLNode(A5)(A1){0.333}{C5}qdisk(C5){2pt}uput[5]{0}(C5){$C_5$}
            psLNode(A6)(A2){0.333}{C6}qdisk(C6){2pt}uput[6]{0}(C6){$C_6$}
            multido{iA=3+1,iB=1+1}{4}{psline(MiA)(CiB)}
            psline(M1)(C5)psline(M2)(C6)
            pspolygon*[linecolor=red!40]%
            (1.19;0.9)(1.19;1.9)(1.19;2.9)(1.19;3.9)(1.19;4.9)(1.19;5.9)
            end{pspicture}





            share|improve this answer














            Can be simplified with some psforeach



            documentclass[12pt,border=15pt]{standalone}
            usepackage{pst-eucl}
            begin{document}
            begin{pspicture}(-4,-3.5)(4,3.5)
            degrees[6]
            multido{iA=1+1}{6}{pnode(3;iA){AiA}uput[iA]{0}(AiA){$A_iA$}}
            multido{iA=1+1,iB=2+1}{5}{psLNode(AiA)(AiB){0.5}{MiA}uput[iA]{0}(MiA){$M_iA$}}
            psLNode(A6)(A1){0.5}{M6}uput[6]{0}(M6){$M_6$}
            pspolygon[linejoin=2](A1)(A3)(A5)(A6)(A2)(A4)(A6)(A5)(A4)(A3)(A2)(A1)(A5)(A6)
            multido{iA=1+1,iB=3+1}{4}{%
            psLNode(AiA)(AiB){0.333}{CiA}qdisk(CiA){2pt}%
            uput[iA]{0}(CiA){$C_iA$}}
            psLNode(A5)(A1){0.333}{C5}qdisk(C5){2pt}uput[5]{0}(C5){$C_5$}
            psLNode(A6)(A2){0.333}{C6}qdisk(C6){2pt}uput[6]{0}(C6){$C_6$}
            multido{iA=3+1,iB=1+1}{4}{psline(MiA)(CiB)}
            psline(M1)(C5)psline(M2)(C6)
            psset{PointName=none,PointSymbol=none}
            pstInterLL{M1}{C5}{M2}{C6}{i1} pstInterLL{M2}{C6}{M3}{C1}{i2}
            pstInterLL{M3}{C1}{M4}{C2}{i3} pstInterLL{M4}{C2}{M5}{C3}{i4}
            pstInterLL{M5}{C3}{M6}{C4}{i5} pstInterLL{M6}{C4}{M1}{C5}{i6}
            pspolygon*[linecolor=blue](i1)(i2)(i3)(i4)(i5)(i6)
            end{pspicture}

            end{document}


            enter image description here



            and a shorter version without intersections:



            begin{pspicture}(-4,-3.5)(4,3.5)
            degrees[6]
            multido{iA=1+1}{6}{pnode(3;iA){AiA}uput[iA]{0}(AiA){$A_iA$}}
            multido{iA=1+1,iB=2+1}{5}{psLNode(AiA)(AiB){0.5}{MiA}uput[iA]{0}(MiA){$M_iA$}}
            psLNode(A6)(A1){0.5}{M6}uput[6]{0}(M6){$M_6$}
            pspolygon(A1)(A2)(A3)(A4)(A5)(A6)pspolygon(A1)(A3)(A5)pspolygon(A2)(A4)(A6)
            multido{iA=1+1,iB=3+1}{4}{%
            psLNode(AiA)(AiB){0.333}{CiA}qdisk(CiA){2pt}%
            uput[iA]{0}(CiA){$C_iA$}}
            psLNode(A5)(A1){0.333}{C5}qdisk(C5){2pt}uput[5]{0}(C5){$C_5$}
            psLNode(A6)(A2){0.333}{C6}qdisk(C6){2pt}uput[6]{0}(C6){$C_6$}
            multido{iA=3+1,iB=1+1}{4}{psline(MiA)(CiB)}
            psline(M1)(C5)psline(M2)(C6)
            pspolygon*[linecolor=red!40]%
            (1.19;0.9)(1.19;1.9)(1.19;2.9)(1.19;3.9)(1.19;4.9)(1.19;5.9)
            end{pspicture}






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 14 hours ago

























            answered 2 days ago









            HerbertHerbert

            270k24408718




            270k24408718












            • Yes, thank you ...
              – chishimotoji
              yesterday










            • OP's node names are placed clockwise and you forgot the line A2-A4.
              – God Must Be Crazy
              19 hours ago


















            • Yes, thank you ...
              – chishimotoji
              yesterday










            • OP's node names are placed clockwise and you forgot the line A2-A4.
              – God Must Be Crazy
              19 hours ago
















            Yes, thank you ...
            – chishimotoji
            yesterday




            Yes, thank you ...
            – chishimotoji
            yesterday












            OP's node names are placed clockwise and you forgot the line A2-A4.
            – God Must Be Crazy
            19 hours ago




            OP's node names are placed clockwise and you forgot the line A2-A4.
            – God Must Be Crazy
            19 hours ago


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f469184%2fhow-to-fill-a-hexagon-with-vertices-obtained-from-intersecting-lines%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            1300-talet

            1300-talet

            Display a custom attribute below product name in the front-end Magento 1.9.3.8