Jelly, 24 bytes
R+’μạṀx@6ドルżx@K\€"*$F€ŒḄY
Jelly is ashamed of the fact that it does not have a centralization atom, so it's beaten by 05AB1E and V. By 11 and 7 bytes respectively!
If you find any way to golf this, please comment. Any help is appreciated.
Explanation:
R+’μạṀx@6ドルżx@K\€"*$F€ŒḄY Main link. Arguments: z.
R+’ The sizes of the hexagon's rows. (implicit argument)
μ Start a new monadic chain with the above argument.
ȧṀx@6ドル The spaces you must prepend to each row. (implicit argument)
x@K\€"*$ The stars (points) of each row, space-joined, as a single link. (implicit argument)
ż F€ Conjoin and merge the leading spaces with the stars appropriately.
ŒḄ Create the second half of the hexagon without the middle row.
Y Join the rows with newlines. This makes the shape look like a hexagon.Bonus: To find how many stars are there in a hexagon, use this:
×ばつ6S‘
Jelly, 24 bytes
R+’μạṀx@6ドルżx@K\€"*$F€ŒḄY
Jelly is ashamed of the fact that it does not have a centralization atom, so it's beaten by 05AB1E and V. By 11 and 7 bytes respectively!
If you find any way to golf this, please comment. Any help is appreciated.
Explanation:
R+’μạṀx@6ドルżx@K\€"*$F€ŒḄY Main link. Arguments: z.
R+’ The sizes of the hexagon's rows. (implicit argument)
μ Start a new monadic chain with the above argument.
ȧṀx@6ドル The spaces you must prepend to each row. (implicit argument)
x@K\€"*$ The stars (points) of each row, space-joined, as a single link. (implicit argument)
ż F€ Conjoin and merge the leading spaces with the stars appropriately.
ŒḄ Create the second half of the hexagon without the middle row.
Y Join the rows with newlines. This makes the shape look like a hexagon.
Jelly, 24 bytes
R+’μạṀx@6ドルżx@K\€"*$F€ŒḄY
Jelly is ashamed of the fact that it does not have a centralization atom, so it's beaten by 05AB1E and V. By 11 and 7 bytes respectively!
If you find any way to golf this, please comment. Any help is appreciated.
Explanation:
R+’μạṀx@6ドルżx@K\€"*$F€ŒḄY Main link. Arguments: z.
R+’ The sizes of the hexagon's rows. (implicit argument)
μ Start a new monadic chain with the above argument.
ȧṀx@6ドル The spaces you must prepend to each row. (implicit argument)
x@K\€"*$ The stars (points) of each row, space-joined, as a single link. (implicit argument)
ż F€ Conjoin and merge the leading spaces with the stars appropriately.
ŒḄ Create the second half of the hexagon without the middle row.
Y Join the rows with newlines. This makes the shape look like a hexagon.Bonus: To find how many stars are there in a hexagon, use this:
×ばつ6S‘
Jelly, 24 bytes
R+’μạṀx@6ドルżx@K\€"*$F€ŒḄY
Jelly is ashamed of the fact that it does not have a centralization atom, so it's beaten by 05AB1E and V. By 11 and 7 bytes respectively!
If you find any way to golf this, please comment. Any help is appreciated.
Explanation:
R+’μạṀx@6ドルżx@K\€"*$F€ŒḄY Main link. Arguments: z.
R+’ The sizes of the hexagon's rows. (implicit argument)
μ Start a new monadic chain with the above argument.
ȧṀx@6ドル The spaces you must prepend to each row. (implicit argument)
x@K\€"*$ The stars (points) of each row, space-joined, as a single link. (implicit argument)
ż F€ Conjoin and merge the leading spaces with the stars appropriately.
ŒḄ Create the second half of the hexagon without the middle row.
Y Join the rows with newlines. This makes the shape look like a hexagon.
Jelly, 24 bytes
R+’μạṀx@6ドルżx@K\€"*$F€ŒḄY
Jelly is ashamed of the fact that it does not have a centralization atom, so it's beaten by 05AB1E and V. By 11 and 7 bytes respectively!
If you find any way to golf this, please comment. Any help is appreciated.
Jelly, 24 bytes
R+’μạṀx@6ドルżx@K\€"*$F€ŒḄY
Jelly is ashamed of the fact that it does not have a centralization atom, so it's beaten by 05AB1E and V. By 11 and 7 bytes respectively!
If you find any way to golf this, please comment. Any help is appreciated.
Explanation:
R+’μạṀx@6ドルżx@K\€"*$F€ŒḄY Main link. Arguments: z.
R+’ The sizes of the hexagon's rows. (implicit argument)
μ Start a new monadic chain with the above argument.
ȧṀx@6ドル The spaces you must prepend to each row. (implicit argument)
x@K\€"*$ The stars (points) of each row, space-joined, as a single link. (implicit argument)
ż F€ Conjoin and merge the leading spaces with the stars appropriately.
ŒḄ Create the second half of the hexagon without the middle row.
Y Join the rows with newlines. This makes the shape look like a hexagon.
Jelly, 24 bytes
R+’μạṀx@6ドルżx@K\€"*$F€ŒḄY
Jelly is ashamed of the fact that it does not have a centralization atom, so it's beaten by 05AB1E and V. By 11 and 7 bytes respectively!
If you find any way to golf this, please comment. Any help is appreciated.