I think this question is very simple and will be closed, but I'm left with doubts.
transform = CoordinateTransformData["Polar" -> "Cartesian", "Mapping"];
{p1, p2, p3, p4, p5, p6} =
transform[{2 Sqrt[3], # Degree}] & /@ Most[Subdivide[360, 6] + 30] //
N
$\left( \begin{array}{cc} 3. & 1.73205 \\ 0. & 3.4641 \\ -3. & 1.73205 \\ -3. & -1.73205 \\ 0. & -3.4641 \\ 3. & -1.73205 \\ \end{array} \right)$
How could I apply the insert function to get this result?
Join[{{3., 1.7320508075688772, 0}, {0., 3.4641016151377544, 0}, {-3.,
1.7320508075688772, 0}, {-3., -1.7320508075688772,
0}, {0., -3.4641016151377544, 0},
{3., -1.7320508075688772, 0}}, {{3., 1.7320508075688772,
15}, {0., 3.4641016151377544, 15}, {-3., 1.7320508075688772,
15}, {-3., -1.7320508075688772, 15}, {0., -3.4641016151377544, 15},
{3., -1.7320508075688772, 15}}]
$\left( \begin{array}{ccc} 3. & 1.73205 & 0 \\ 0. & 3.4641 & 0 \\ -3. & 1.73205 & 0 \\ -3. & -1.73205 & 0 \\ 0. & -3.4641 & 0 \\ 3. & -1.73205 & 0 \\ 3. & 1.73205 & 15 \\ 0. & 3.4641 & 15 \\ -3. & 1.73205 & 15 \\ -3. & -1.73205 & 15 \\ 0. & -3.4641 & 15 \\ 3. & -1.73205 & 15 \\ \end{array} \right)$
PadRight
? $\endgroup$Insert
only. Otherwise there are plenty of solutions. I would do something like this :Join[Insert[#, 0, -1] & /@ {p1, p2, p3, p4, p5, p6}, Insert[#, 15, -1] & /@ {p1, p2, p3, p4, p5, p6}]
$\endgroup$