[Question]
  [
[Sandbox](https://codegolf.meta.stackexchange.com/a/18353/71546)
### What is Hexagonification™?
Hexagonification™ is a transformation that creates a hexagon with 3 copies of a rectangle block, each skewed to the right by 30 degrees and then rotated by 0, 120 and 240 degrees respectively, as shown in the following image. A triangle hole may appear in the middle, but that isn't a great deal.
[![enter image description here](https://i.stack.imgur.com/N13HQ.png)](https://i.stack.imgur.com/N13HQ.png)
### Challenge
Write a program or function that receives a block of string as an input and outputs the hexagonified™ input. You may assume that the input consists of only ASCII characters and new lines, and each line of the input has been padded so that all lines are of equal length. Empty spaces should be filled with space characters. 
The input and output formats are flexible. You may receive a single string, a list of lines or a 2D array as input, and output a single string or a list of lines. You may have leading/trailing spaces on each line and leading/trailing newlines, provided that the hexagon is properly formed. See Sample IO for how the blocks should be positioned.
### Sample IO
Input:
```
3x3
squ
are
```
Output:
```
   3 x 3
  e s q u
 u r a r e
3 q a a s 3
 x s r q x
  3 e u 3
```
Input:
```
longer.....
rectangular
block......
```
Output:
```
   l o n g e r . . . . .
  . r e c t a n g u l a r
 r . b l o c k . . . . . .
. a .                 b r l
 . l .               l e o
  . u .             o c n
   . g .           c t g
    . n k         k a e
     r a c       . n r
      e t o     . g .
       g c l   . u .
        n e b . l .
         o r . a .
          l . r .
```
Input:
```
vb
el
ro
tc
ik
c2
ax
l8
```
Output:
```
        v b
       8 e l
      x l r o
     2 a   t c
    k c     i k
   c i       c 2 
  o t         a x
 l r           l 8
b e l a c i t r e v
 v 8 x 2 k c o l b   
```
Input:
```
1.line
```
Output:
```
 1 . l i n e
e           1
 n         .
  i       l
   l     i
    .   n
     1 e
```
Input:
```
1
.
l
i
n
e
```
Output:
```
      1
     e .
    n   l
   i     i
  l       n
 .         e
1 e n i l . 1
```
### Scoring
Your score will be the area of the hexagonified™ source code (including the triangle hole). Assuming your code can just fit inside a rectangle of width \$w\$ and height \$h\$, the score will be:
$$3wh+\frac{(w-h)(w-h+1)}{2}$$
### Winning Criteria
The submission with the lowest score in each language wins. No standard loopholes.
  
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), score ~~235~~ 168
```
→ＷＳ⊞υιＦυＦ
«Ｐ↙ιＭ²←»Ｆ
Ｍ⊖⌈ＥυＬκ↙Ｆ
Ｆυ«Ｐ↖κ↗»Ｆ
Ｍ⊖⌈ＥυＬκ↖Ｆ
Ｆυ«Ｐ⪫κ ↘»
```
[Try it online!](https://tio.run/##S85ILErOT8z5//9R26T3e7a/37P5Ude8863ndr7fs@x8K5DgOrT6/Z4Nj9pmgoTWHtr0qG3Cod0gcSDvUde0Rz0d7/csBalcc24XUBVEBqgVqm0aSHQ6Hh3T0HSsWn1ul8KjthmHdg9GN3H9100EAA "Charcoal – Try It Online") Takes input as a newline-terminated list. Charcoal's problem here is that a newline is a command, so I can't just throw newlines in arbitrarily. Instead, I'm passing them as arguments to the `For` command, which loops over each character in the string, which here is just the one character, therefore not modifying the behaviour of the program (except to change the implicit loop variables). As such, these dummy `For` instructions are not included in the explanation. Explanation:
```
→
```
Another no-op, just to make the code exactly rectangular.
```
ＷＳ⊞υι
```
Input the list.
```
Ｆυ«Ｐ↙ιＭ²←»
```
Print the lower right diagonal side.
```
Ｍ⊖⌈ＥυＬκ↙
```
Move to the bottom.
```
Ｆυ«Ｐ↖κ↗»
```
Print the lower left diagonal side.
```
Ｍ⊖⌈ＥυＬκ↖
```
Move to the top left.
```
Ｆυ«Ｐ⪫κ ↘»
```
Print the top side.
[Answer]
# [Python 2](https://docs.python.org/2/), score 918
```
m=input()
d={};h=len(m)
w=len(m[0])
r=range
for i in r(h*w):
 j,i=divmod(i,h)
 d[(i,i+j*2)]=d[
(h+j,h+2*w-2*i-j
-2)]=d[(w-j+h+~i
,w+i-j+~h)]=m[i
][j]
y,x=zip(
*d.keys())
for i in r(min
(y),max(y)+1):
 print''.join(d
.get((i,j),' ')
for j in r(min
(x),max(x)+1))
```
[Try it online!](https://tio.run/##TVDBboMwDL37K1AvSUhAK9OkaRNfgjhQkhWnkLCUFti0/nrnlEsj5cV59rOtN65T511xb7025W63uw8luvEycQG6/P377MreOD4ImLegeqkFhDI07mjgy4cEE3RJ4F06iw9IrMJS43XwmqPqBCS6ogClTQtRl7oC3kmrOlmkc1akmFnItgSfMys7eUNQsyRe3jrihwqhrmwNq1rKHxw5pDo/mfXMhXiePqADvgo1NAs9ch9XGQO6ibHcenRcQ340E6ddrFAsYZvaPqmXTb1Etbg/xEB@AJjFtEm0J327V@x1eWWKnb8vhE0wrIaK9Z7MCHk8xAbTTuTOpW8C/Q69b0/5lou11wORpo91nmBqCfBE0Bax40LQvz8q93mPbhuwJza2jjKk62IPVv8D "Python 2 – Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), Score (8 by ~~9~~ 8) = ~~216~~ 192
```
¹¹ẈṀ_$⁶ẋ
ŒdṙLC$UŻ
ÇżUṚżZṚ$
ÇṚUF€ḟ€0
0ẋṂ;r/_Ṃ
Z,$ẈÇṖ⁶ẋ
4ĿŒHj¥"Ç
ỴÇµÑżK€Y
```
A full-program which prints the result.
**[Try it online!](https://tio.run/##ZU9NS8NAEL3vrxgkR6lV6wd4FETQaw/2UtI0BtrQQmgP3moRK/RkwbbrRVHqQT2qmDQgJOaH7PyR@JI2WOsGZjbvY95szbTtszgO3MBV3pVyO2WNzz@U1xfRoKpcebyvFaOpCHuRX1TubeSXUDX8oxUPuPuqPu9Q8yIPj3K7e85aGU2UVjXMS2TD@bzC91c0OKwFk5WwJ9T0LewF7@F15B/BfhLHRGRTkxpkkUkO5bJPEKoDzKAW6SnfhlInR6SySmozqP5rgSkHQY6WTwUOW4Cw/5E2EpppVnuJS4Y3wAC2/lDJQlZCAG0gPzt1ZJspjjgdstlJRM4MRlYLcykbOkdxNbDIfIkMhM3E5unSYmGr5PH6IpS@Cmi8zvJ5g0f9TZaPBZZPW3x5s81jf4fH3q5g@aKzvK/w0DNYTqrc8U0eXZyCtCAU6PDACiFMoKEGgaGQc@cBYpZd2BHxAw "Jelly – Try It Online")** Or see the [test-suite](https://tio.run/##xVAxS8NQGNzvZ0hGjY11EBwFEXTN0C4ljY@S9JHgs5V2s11S6GQFQRcHcXPU4GuDgZe8H/LyR55fsf/Bb7jjju9uuJhxPrVWSSXNemHkfc9pZrlZL6FX10Y@X505vt6gynThG/miiy6hQ5rIP2/mH@b7lbCFFmWMnJ@Kwx4RuvsO9W3fnnZ9x3WpVxexet@rMpjNZ5Wpr@pBF5cU71ivLqEfjXxrZj8qV/lBXZIf75S17UkbtzdjBIIBPE0GTLjbg2DhKEgGYx4I9HkaDt0/H3d9MA6RYhQiGiI8QjABPwE8l0cJtXhwwREhAYn/HuAX "Jelly – Try It Online").
### How?
Starts at the Main (unnumbered) Link, which is the bottom line of code.
```
¹¹ẈṀ_$⁶ẋ - Link 1: the output lines without leading spaces, A
¹        - no-op -> A
 ¹       - no-op -> A
  Ẉ      - length of each (A)
     $   - last two links as a monad - f(Ẉ(A))
   Ṁ     -   maximum
    _    -   subtract (vectorises)
      ⁶  - literal space character
       ẋ - repeat (vectorises)
ŒdṙLC$UŻ - Link 2: lines
Œd       - anti-diagonals (e.g. ["abcd","1234"] -> ["d3","c2","b1","a4"])
     $   - last two links as a monad - f(lines)
   L     -   length
    C    -   complement (1 - that)
  ṙ      - rotate (anti-diagonals) left by (1 - length(lines))
              i.e. rotate right by (#lines - 1)
      U  - reverse each
       Ż - prepend a zero (allows us to start the join one further
                           down - removed in Link 4 with ḟ€0)
ÇżUṚżZṚ$ - Link 3: lines
Ç        - call the last Link (2) as a monad = Link_2(lines)
  U      - reverse each (lines)
 ż       - zip together
       $ - last two links as a monad - f(lines)
     Z   -   transpose (lines)
      Ṛ  -   reverse
    ż    - zip together
ÇṚUF€ḟ€0 - Link 4: lines
Ç        - call the last Link (3) as a monad = Link_3(lines)
 Ṛ       - reverse
  U      - reverse each
   F€    - flatten each
     ḟ€0 - remove zeros from each
0ẋṂ;r/_Ṃ - Link 5: [w,h]       e.g. [8,3]
0        - literal zero             0
  Ṃ      - minimum (of w and h)     3
 ẋ       - repeat                   [0,0,0]
     /   - reduce ([w,h]) by:
    r    -   inclusive range        [8,7,6,5,4,3]
   ;     - concatenate              [0,0,0,8,7,6,5,4,3]
       Ṃ - minimum (of w and h)     3
      _  - subtract                 [-3,-3,-3,5,4,3,2,1,0]
Z,$ẈÇṖ⁶ẋ - Link 6: lines
  $      - last two links as a monad:
Z        -   transpose
 ,       -   pair
   Ẉ     - length of each - i.e. [w=width(S), h=height(S)]
    Ç    - call the last Link (5) as a monad = f([w,h])
     Ṗ   - pop (remove rightmost)
      ⁶  - literal space character
       ẋ - repeat (vectorises) - Note: z ẋ -n = []
4ĿŒHj¥"Ç - Link 7: lines 
4Ŀ       - call Link 4 as a monad = Link_4(lines)
       Ç - call the last Link (6) as a monad = Link_6(lines)
      "  - zip with - i.e. for i in [1..] f(left[i],right[i]):
     ¥   -   last two links as a dyad:
  ŒH     -     split (Link_4(lines)[i]) into two halves
    j    -     join with (Link_6(lines)[i])
ỴÇµÑżK€Y - Main Link: List of characters, S
Ỵ        - split (S) at newline characters
 Ç       - call the last Link (7) as a monad = Link_7(lines)
  µ      - start a new monadic chain - i.e. f(Link_7(lines))
   Ñ     - call the next Link (1) as a monad = Link_1(Link_7(lines))
     K€  - join each (line) with space characters
    ż    - zip these together
       Y - join with newline characters
         - implicit print
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), width × height = ~~9 × 9~~ 9 × 6, score = ~~243~~ 168
```
ṚZÑṚŻL}¡ 
J’0ẋ;"K€ 
ṚÇḟ€⁶ZUÇŻ
Z,ṖẈ+L0ẋ 
Ṫ;Ɱ";⁶o/ 
U¹ƭṛĿ¥Ɱ4Ç
```
[Try it online!](https://tio.run/##y0rNyan8///hzllRhycCyaO7fWoPLVTg8nrUMNPg4a5uayXvR01rFLiAUofbH@6YD@Q8atwWFXq4/ehuriidhzunPdzVoe0DUgpStMr60cZ1StZAJfn6Clyhh3YeW/tw5@wj@w8tBYqbHG7//3D3lsPtkVxHJz/cufhR475D2w5tO9wONDQLyvn/37jCmKu4sJQrsSiViysnPy89tUgPBLiKUpNLEvPSS3MSi7iScvKTs/Ug4lxlSVypOVxF@VwlyVyZ2VzJRlyJFVw5Flxchno5mXlAUwy59LhyuDK58riAHDSvHtpJjl@BulA9CxTA9C0A "Jelly – Try It Online")
A set of links that takes a list of Jelly strings as its input and returns a list of Jelly strings. 
# An alternative 8 × 7 with score of 169:
```
ṚZÑṚŻL}¡
J’0ẋ;"K€
ṚÇḟ€⁶ZUÇ
Z,ṖẈ+L0ẋ
Ṫ;Ɱ";⁶o/
ṛĿ"JŻ€3¦
U3Ð¡ṚÇ5Ŀ
```
[Try it online!](https://tio.run/##y0rNyan8///hzllRhycCyaO7fWoPLeTyetQw0@Dhrm5rJe9HTWu4gBKH2x/umA9kP2rcFhV6uJ0rSufhzmkPd3Vo@4DUAVWssn60cZ2SNVA@Xx/InX1kv5LX0d1AHcaHlnGFGh@ecGgh2BjTI/v/P9y95XB7JNfRyQ93Ln7UuO/QtkPbDrcDlWZBOf//G1cYcxUXlnIlFqVyceXk56WnFumBAFdRanJJYl56aU5iEVdSTn5yth5EnKssiSs1h6son6skmSszmyvZiCuxgivHgovLUC8nMw9oiiGXHlcOVyZXHheQQ18PAwA "Jelly – Try It Online")
]