Rotate ASCII Art by 45 DegreesRotate an ASCII art imageAnti-aliasing ASCII artGenerate ASCII art from textFrame this nice ASCII-ArtItalicize ASCII artLemon-Limify a StringSome ASCII art for N64's 20th B-DayRead ASCII-Art TextASCII-Art Venn DiagramASCII Art Octagons

How to aggregate categorical data in R?

Forgetting the musical notes while performing in concert

What do you call someone who asks many questions?

Am I breaking OOP practice with this architecture?

Were days ever written as ordinal numbers when writing day-month-year?

How to show a landlord what we have in savings?

What are the G forces leaving Earth orbit?

How do conventional missiles fly?

how do we prove that a sum of two periods is still a period?

How can I prove that a state of equilibrium is unstable?

How to compactly explain secondary and tertiary characters without resorting to stereotypes?

Obtaining database information and values in extended properties

Sums of two squares in arithmetic progressions

OP Amp not amplifying audio signal

Car headlights in a world without electricity

What reasons are there for a Capitalist to oppose a 100% inheritance tax?

Notepad++ delete until colon for every line with replace all

Is there a hemisphere-neutral way of specifying a season?

What historical events would have to change in order to make 19th century "steampunk" technology possible?

Do creatures with a speed 0ft., fly 30ft. (hover) ever touch the ground?

Machine learning testing data

Why were 5.25" floppy drives cheaper than 8"?

Rotate ASCII Art by 45 Degrees

Should I tell management that I intend to leave due to bad software development practices?



Rotate ASCII Art by 45 Degrees


Rotate an ASCII art imageAnti-aliasing ASCII artGenerate ASCII art from textFrame this nice ASCII-ArtItalicize ASCII artLemon-Limify a StringSome ASCII art for N64's 20th B-DayRead ASCII-Art TextASCII-Art Venn DiagramASCII Art Octagons













6












$begingroup$


Your task is to take an ASCII art image and output it rotated clockwise by 45 degrees and scaled by a factor of $sqrt 2$. The scaling comes from using a lattice pattern which introduces space between the characters.



To explain it visually, a $3 times 3$ block would be processed like so:



123
456
789


becomes



 1
4 2
7 5 3
8 6
9


Characters will not be transformed, so boxes will look strange after rotation:



+-+
| |
+-+


becomes



 +
| -
+ +
- |
+


To explain the process more explicitly, the output consists of a diamond lattice pattern where the top row corresponds to the top-left character of the input, the next row corresponds with the right and below neighbors, next row is those neighbors, and so forth until all of the characters have been placed on the lattice.



Examples



 FISHKISSFISHKIS 
SFISHKISSFISHKISSFISH F
ISHK ISSFISHKISSFISHKISS FI
SHKISS FISHKISSFISHKISSFISS FIS
HKISSFISHKISSFISHKISSFISHKISSFISH KISS
FISHKISSFISHKISSFISHKISSFISHKISS FISHK
SSFISHKISSFISHKISSFISHKISSFISHKISSF
ISHKISSFISHKISSFISHKISSFISHKISSF ISHKI
SSFISHKISSFISHKISSFISHKISSFISHKIS SFIS
HKISSFISHKISSFISHKISSFISHKISS FIS
HKISSFISHKISSFISHKISSFISHK IS
SFISHKISSFISHKISSFISH K
ISSFISHKISSFISHK


Source



Becomes



 H
K S
I H I
F S K S
S I S I H S
S I S F S K F
F S H I S I
H I H K S S F
K S K S I H H I
I H I S S K I K S
H S K S F S I F S I H
K S I S I F S I S S K
I F S F S I S S F S I
S I S I H S F H I F S
S S S F S K H I K S I S
F F H I H I K S I H S F
I I K S K S I H S K H I
I S S I H I S S K S I K S
S H H S K S F S I F S I H
S K K S I S I F S I S S K
F I I F S F S I S S F S I
I S S I S I H S F H I F S
S S S S F S K H I K S I
H F F H I H I K S I H S
K I I K S K S I H S K H
I S S I H I S S K S I
S H H S K S F S I F S
S K K S I S I F S I S
F I I F S F S I S S
I S S I S I H S F S
S S S S F S K H I
H F F H I H I K S
K I I K S K S I H
S S I H I S S
H H S K S F S
K S I S I
S F S
H F K F F F
K I I I I
I I S S S
S S H S
S H S K
F K F
F I I
I S
I S
S
K



 _,,ddF"""Ybb,,_ 
,d@#@#@#@g, `"Yb,
,d#@#V``V@#@#b "b,
d@#@#I I@#@8 "b
d@#@#@#A..A@#@#P `b
8#@#@#@#@#@#@8" 8
8@#@#@#@#@#@J 8
8#@#@#@#@#P 8
Y@#@#@#@#P ,db, ,P
Y@#@#@#@) @DWB aP
"Y#@#@#b `69' aP"
"Y@#@#g,, _,dP"
`""YBBgggddP""'


Source



Becomes



 d d ,
8 @ @ d ,
8 # # # # d _
8 @ @ @ @ @ @ ,
Y # # # # # # # ,
@ @ @ @ @ I V @ d
Y # # # # # ` # d
@ @ @ @ @ A ` @ F
" # # # # # . V # "
Y @ @ @ @ @ . @ @ "
# # # # # # A I # g "
" @ @ @ @ @ @ @ @ @ , Y
Y # # # # # # # # # b
@ @ @ P P @ @ @ @ b b
` # # ) J 8 # 8 ,
" @ b " P ` ,
" # " _
Y g Y
B , , b
B , @ d ,
g ` D b "
g 6 W , b
g 9 B ,
d ' "
d b
P _ `
" , b
" d 8
' P a 8
" P a , 8
" P P



 ...,?77??!~~~~!???77?<~....
..?7` `7!..
.,=` ..~7^` I ?1.
........ ..^ ?` ..?7!1 . ...??7
. .7` .,777.. .I. . .! .,7!
.. .? .^ .l ?i. . .` .,^
b .! .= .?7???7~. .>r . .=
.,.?4 , .^ 1 ` 4...
J ^ , 5 ` ?<.
.%.7; .` ., .; .=.
.+^ ., .% MML F ., ?,
P ,, J .MMN F 6 4.
l d, , .MMM! .t .. ,,
, JMa..` MMM` . .! .;
r .M# .M# .% . .~ .,
dMMMNJ..! .P7! .> . . ,,
.WMMMMMm ?^.. ..,?! .. .. , Z7` `?^.. ,,
?THB3 ?77?! .Yr . .! ?, ?^C
?, .,^.` .% .^ 5.
7, .....?7 .^ ,` ?.
`<. .= .`' 1
....dn... ... ...,7..J=!7, .,
..= G.,7 ..,o.. .? J. F
.J. .^ ,,,t ,^ ?^. .^ `?~. F
r %J. $ 5r J ,r.1 .=. .%
r .77=?4. ``, l ., 1 .. <. 4.,
.$.. .X.. .n.. ., J. r .` J. `'
.?` .5 `` .% .% .' L.' t
,. ..1JL ., J .$.?` .
1. .=` ` .J7??7<.. .;
JS.. ..^ L 7.:
`> .. J. 4.
+ r `t r ~=..G.
= $ ,. J
2 r t .;
.,7! r t`7~.. j..
j 7~L...$=.?7r r ;?1.
8. .= j ..,^ ..
r G .
.,7, j, .>=.
.J??, `T....... % ..
..^ <. ~. ,. .D
.?` 1 L .7.........?Ti..l
,` L . .% .`! `j,
.^ . .. .` .^ .?7!?7+. 1
.` . .`..`7. .^ ,` .i.;
.7<..........~<<3?7!` 4. r ` G%
J.` .! %
JiJ .`
.1. J
?1. .'
7<..%


Source



Becomes



 . .
. .
. .
b .
. .
, .
. J . .
. % ? .
+ . 4 . .
P ^ 7 ! ? .
l ; ^ 7 .
, . ` .
d , ^ .
. M r , ,
W M , =
M M d ` .
M N J , .
? M J . M ?
T M . M a , . 7
H M . # . = . ` .
? B m ! . . . , . ^ . .
, 3 ` , J % ` ^ . , .
? 7 ,
7 ? 7 7 ?
r . , ^ ? 7 7
. r J . . ? . ? 7
, ? . % . . ` . ? . ` . ?
. ` $ . J = . < . 7 . . ?
. 7 . . . . M , ~ l . ~ !
. . 7 . . ? . M M . I . 7 ~
. . = $ ^ . 7 M M L . . ^ ~
1 5 ? d 7 M M N 1 ? ` ~
J 4 , n ? . M M ? 7 ~
L . , G . ! M M ! 5 i ! !
. , . . . # ` . . 1 ?
. . 1 X 5 t , . . . ; . . I ?
. ` ^ , . . . r 7 . , F > . . ?
7 ` ? . J . . . ? . F r . 7
< ` . S ` J , . . ! . . . t . ! 7
. ^ . . . ` ^ . . . P % . ` ?
. J j , ` . ` , . ? . 7 ` <
. ? . 7 > ` . , . 7 . . ! ` ~
. ? , r 8 ! + n o . , . . .
. , 7 . = . . . . . ^ Y .
. , 7 2 . . % . . , . r . . .
. < ~ r . , 7 ` > , .
. . ` L r . l . . . 6 4 .
. 1 T . $ ^ . . . . = . . . . . . = . `
. . . r ` = . , . ? ? J ^ % . . . , 7
~ L ~ . . t t ` J % , ^ = . . ! . ^ . !
< . . . . $ ` , J . ! ` . ~ , .
< . L . G = = 7 . ` . . . 1 7 ' , . . , ? 7 .
3 . . . ~ t J $ ' , , ` ^ ! < ! .
? . . j ? . r . . . r r . J . .
7 . . . , 7 . J L J ? L . . ^ . Z . ?
! ` , r . ~ 7 ` . . . 1 7 . ? 1
` . . % j ; = 4 ? ' ` ? ` = ? .
. . . j . . ? < ` , . 7
` . % 7 . . . 7 . ?
7 ` . . r . G < J ~ 5 ?
. . , . . . . . . ,
4 . ^ ; . t ?
. . ? . . . 4
J . . . . 1 7 . = 1 .
. r ^ ^ ` . . . ; . . ,
` ! . . : , ` ,
J . . . . 4 F ? .
i . ` , . . > . . F ^ ;
J ! ` ? ? = ` , % . .
. 7 T . ' . ,
1 ! i . . ,
. ? . D . ,
7 . ? ,
? + ` l ^ ,
1 . j C
. . ,
i 1
.
7 G ;
< %
. . %
. . J `
% '


Rules and Notes



  • Input and output may be in any convenient format and character encoding as long as it supports all printable ASCII characters (U+0020 - U+007E, LF)

  • You may assume the input contains only printable ASCII characters (defined above)

  • You must support art up to $100 times 100$ characters.

  • You may assume the input is right-padded, as to be a perfect rectangular grid of characters.

    • If it conveniences you, you may also assume the input is padded to be exactly $100 times 100$ characters.


  • Use the ASCII space to align and space characters.

  • Characters may be overpadded (or even underpadded) in any direction as long as the result is properly aligned.

Happy Golfing!










share|improve this question









$endgroup$







  • 1




    $begingroup$
    Poor Sonic, he just wanted to live D:
    $endgroup$
    – Benjamin Urquhart
    1 hour ago















6












$begingroup$


Your task is to take an ASCII art image and output it rotated clockwise by 45 degrees and scaled by a factor of $sqrt 2$. The scaling comes from using a lattice pattern which introduces space between the characters.



To explain it visually, a $3 times 3$ block would be processed like so:



123
456
789


becomes



 1
4 2
7 5 3
8 6
9


Characters will not be transformed, so boxes will look strange after rotation:



+-+
| |
+-+


becomes



 +
| -
+ +
- |
+


To explain the process more explicitly, the output consists of a diamond lattice pattern where the top row corresponds to the top-left character of the input, the next row corresponds with the right and below neighbors, next row is those neighbors, and so forth until all of the characters have been placed on the lattice.



Examples



 FISHKISSFISHKIS 
SFISHKISSFISHKISSFISH F
ISHK ISSFISHKISSFISHKISS FI
SHKISS FISHKISSFISHKISSFISS FIS
HKISSFISHKISSFISHKISSFISHKISSFISH KISS
FISHKISSFISHKISSFISHKISSFISHKISS FISHK
SSFISHKISSFISHKISSFISHKISSFISHKISSF
ISHKISSFISHKISSFISHKISSFISHKISSF ISHKI
SSFISHKISSFISHKISSFISHKISSFISHKIS SFIS
HKISSFISHKISSFISHKISSFISHKISS FIS
HKISSFISHKISSFISHKISSFISHK IS
SFISHKISSFISHKISSFISH K
ISSFISHKISSFISHK


Source



Becomes



 H
K S
I H I
F S K S
S I S I H S
S I S F S K F
F S H I S I
H I H K S S F
K S K S I H H I
I H I S S K I K S
H S K S F S I F S I H
K S I S I F S I S S K
I F S F S I S S F S I
S I S I H S F H I F S
S S S F S K H I K S I S
F F H I H I K S I H S F
I I K S K S I H S K H I
I S S I H I S S K S I K S
S H H S K S F S I F S I H
S K K S I S I F S I S S K
F I I F S F S I S S F S I
I S S I S I H S F H I F S
S S S S F S K H I K S I
H F F H I H I K S I H S
K I I K S K S I H S K H
I S S I H I S S K S I
S H H S K S F S I F S
S K K S I S I F S I S
F I I F S F S I S S
I S S I S I H S F S
S S S S F S K H I
H F F H I H I K S
K I I K S K S I H
S S I H I S S
H H S K S F S
K S I S I
S F S
H F K F F F
K I I I I
I I S S S
S S H S
S H S K
F K F
F I I
I S
I S
S
K



 _,,ddF"""Ybb,,_ 
,d@#@#@#@g, `"Yb,
,d#@#V``V@#@#b "b,
d@#@#I I@#@8 "b
d@#@#@#A..A@#@#P `b
8#@#@#@#@#@#@8" 8
8@#@#@#@#@#@J 8
8#@#@#@#@#P 8
Y@#@#@#@#P ,db, ,P
Y@#@#@#@) @DWB aP
"Y#@#@#b `69' aP"
"Y@#@#g,, _,dP"
`""YBBgggddP""'


Source



Becomes



 d d ,
8 @ @ d ,
8 # # # # d _
8 @ @ @ @ @ @ ,
Y # # # # # # # ,
@ @ @ @ @ I V @ d
Y # # # # # ` # d
@ @ @ @ @ A ` @ F
" # # # # # . V # "
Y @ @ @ @ @ . @ @ "
# # # # # # A I # g "
" @ @ @ @ @ @ @ @ @ , Y
Y # # # # # # # # # b
@ @ @ P P @ @ @ @ b b
` # # ) J 8 # 8 ,
" @ b " P ` ,
" # " _
Y g Y
B , , b
B , @ d ,
g ` D b "
g 6 W , b
g 9 B ,
d ' "
d b
P _ `
" , b
" d 8
' P a 8
" P a , 8
" P P



 ...,?77??!~~~~!???77?<~....
..?7` `7!..
.,=` ..~7^` I ?1.
........ ..^ ?` ..?7!1 . ...??7
. .7` .,777.. .I. . .! .,7!
.. .? .^ .l ?i. . .` .,^
b .! .= .?7???7~. .>r . .=
.,.?4 , .^ 1 ` 4...
J ^ , 5 ` ?<.
.%.7; .` ., .; .=.
.+^ ., .% MML F ., ?,
P ,, J .MMN F 6 4.
l d, , .MMM! .t .. ,,
, JMa..` MMM` . .! .;
r .M# .M# .% . .~ .,
dMMMNJ..! .P7! .> . . ,,
.WMMMMMm ?^.. ..,?! .. .. , Z7` `?^.. ,,
?THB3 ?77?! .Yr . .! ?, ?^C
?, .,^.` .% .^ 5.
7, .....?7 .^ ,` ?.
`<. .= .`' 1
....dn... ... ...,7..J=!7, .,
..= G.,7 ..,o.. .? J. F
.J. .^ ,,,t ,^ ?^. .^ `?~. F
r %J. $ 5r J ,r.1 .=. .%
r .77=?4. ``, l ., 1 .. <. 4.,
.$.. .X.. .n.. ., J. r .` J. `'
.?` .5 `` .% .% .' L.' t
,. ..1JL ., J .$.?` .
1. .=` ` .J7??7<.. .;
JS.. ..^ L 7.:
`> .. J. 4.
+ r `t r ~=..G.
= $ ,. J
2 r t .;
.,7! r t`7~.. j..
j 7~L...$=.?7r r ;?1.
8. .= j ..,^ ..
r G .
.,7, j, .>=.
.J??, `T....... % ..
..^ <. ~. ,. .D
.?` 1 L .7.........?Ti..l
,` L . .% .`! `j,
.^ . .. .` .^ .?7!?7+. 1
.` . .`..`7. .^ ,` .i.;
.7<..........~<<3?7!` 4. r ` G%
J.` .! %
JiJ .`
.1. J
?1. .'
7<..%


Source



Becomes



 . .
. .
. .
b .
. .
, .
. J . .
. % ? .
+ . 4 . .
P ^ 7 ! ? .
l ; ^ 7 .
, . ` .
d , ^ .
. M r , ,
W M , =
M M d ` .
M N J , .
? M J . M ?
T M . M a , . 7
H M . # . = . ` .
? B m ! . . . , . ^ . .
, 3 ` , J % ` ^ . , .
? 7 ,
7 ? 7 7 ?
r . , ^ ? 7 7
. r J . . ? . ? 7
, ? . % . . ` . ? . ` . ?
. ` $ . J = . < . 7 . . ?
. 7 . . . . M , ~ l . ~ !
. . 7 . . ? . M M . I . 7 ~
. . = $ ^ . 7 M M L . . ^ ~
1 5 ? d 7 M M N 1 ? ` ~
J 4 , n ? . M M ? 7 ~
L . , G . ! M M ! 5 i ! !
. , . . . # ` . . 1 ?
. . 1 X 5 t , . . . ; . . I ?
. ` ^ , . . . r 7 . , F > . . ?
7 ` ? . J . . . ? . F r . 7
< ` . S ` J , . . ! . . . t . ! 7
. ^ . . . ` ^ . . . P % . ` ?
. J j , ` . ` , . ? . 7 ` <
. ? . 7 > ` . , . 7 . . ! ` ~
. ? , r 8 ! + n o . , . . .
. , 7 . = . . . . . ^ Y .
. , 7 2 . . % . . , . r . . .
. < ~ r . , 7 ` > , .
. . ` L r . l . . . 6 4 .
. 1 T . $ ^ . . . . = . . . . . . = . `
. . . r ` = . , . ? ? J ^ % . . . , 7
~ L ~ . . t t ` J % , ^ = . . ! . ^ . !
< . . . . $ ` , J . ! ` . ~ , .
< . L . G = = 7 . ` . . . 1 7 ' , . . , ? 7 .
3 . . . ~ t J $ ' , , ` ^ ! < ! .
? . . j ? . r . . . r r . J . .
7 . . . , 7 . J L J ? L . . ^ . Z . ?
! ` , r . ~ 7 ` . . . 1 7 . ? 1
` . . % j ; = 4 ? ' ` ? ` = ? .
. . . j . . ? < ` , . 7
` . % 7 . . . 7 . ?
7 ` . . r . G < J ~ 5 ?
. . , . . . . . . ,
4 . ^ ; . t ?
. . ? . . . 4
J . . . . 1 7 . = 1 .
. r ^ ^ ` . . . ; . . ,
` ! . . : , ` ,
J . . . . 4 F ? .
i . ` , . . > . . F ^ ;
J ! ` ? ? = ` , % . .
. 7 T . ' . ,
1 ! i . . ,
. ? . D . ,
7 . ? ,
? + ` l ^ ,
1 . j C
. . ,
i 1
.
7 G ;
< %
. . %
. . J `
% '


Rules and Notes



  • Input and output may be in any convenient format and character encoding as long as it supports all printable ASCII characters (U+0020 - U+007E, LF)

  • You may assume the input contains only printable ASCII characters (defined above)

  • You must support art up to $100 times 100$ characters.

  • You may assume the input is right-padded, as to be a perfect rectangular grid of characters.

    • If it conveniences you, you may also assume the input is padded to be exactly $100 times 100$ characters.


  • Use the ASCII space to align and space characters.

  • Characters may be overpadded (or even underpadded) in any direction as long as the result is properly aligned.

Happy Golfing!










share|improve this question









$endgroup$







  • 1




    $begingroup$
    Poor Sonic, he just wanted to live D:
    $endgroup$
    – Benjamin Urquhart
    1 hour ago













6












6








6





$begingroup$


Your task is to take an ASCII art image and output it rotated clockwise by 45 degrees and scaled by a factor of $sqrt 2$. The scaling comes from using a lattice pattern which introduces space between the characters.



To explain it visually, a $3 times 3$ block would be processed like so:



123
456
789


becomes



 1
4 2
7 5 3
8 6
9


Characters will not be transformed, so boxes will look strange after rotation:



+-+
| |
+-+


becomes



 +
| -
+ +
- |
+


To explain the process more explicitly, the output consists of a diamond lattice pattern where the top row corresponds to the top-left character of the input, the next row corresponds with the right and below neighbors, next row is those neighbors, and so forth until all of the characters have been placed on the lattice.



Examples



 FISHKISSFISHKIS 
SFISHKISSFISHKISSFISH F
ISHK ISSFISHKISSFISHKISS FI
SHKISS FISHKISSFISHKISSFISS FIS
HKISSFISHKISSFISHKISSFISHKISSFISH KISS
FISHKISSFISHKISSFISHKISSFISHKISS FISHK
SSFISHKISSFISHKISSFISHKISSFISHKISSF
ISHKISSFISHKISSFISHKISSFISHKISSF ISHKI
SSFISHKISSFISHKISSFISHKISSFISHKIS SFIS
HKISSFISHKISSFISHKISSFISHKISS FIS
HKISSFISHKISSFISHKISSFISHK IS
SFISHKISSFISHKISSFISH K
ISSFISHKISSFISHK


Source



Becomes



 H
K S
I H I
F S K S
S I S I H S
S I S F S K F
F S H I S I
H I H K S S F
K S K S I H H I
I H I S S K I K S
H S K S F S I F S I H
K S I S I F S I S S K
I F S F S I S S F S I
S I S I H S F H I F S
S S S F S K H I K S I S
F F H I H I K S I H S F
I I K S K S I H S K H I
I S S I H I S S K S I K S
S H H S K S F S I F S I H
S K K S I S I F S I S S K
F I I F S F S I S S F S I
I S S I S I H S F H I F S
S S S S F S K H I K S I
H F F H I H I K S I H S
K I I K S K S I H S K H
I S S I H I S S K S I
S H H S K S F S I F S
S K K S I S I F S I S
F I I F S F S I S S
I S S I S I H S F S
S S S S F S K H I
H F F H I H I K S
K I I K S K S I H
S S I H I S S
H H S K S F S
K S I S I
S F S
H F K F F F
K I I I I
I I S S S
S S H S
S H S K
F K F
F I I
I S
I S
S
K



 _,,ddF"""Ybb,,_ 
,d@#@#@#@g, `"Yb,
,d#@#V``V@#@#b "b,
d@#@#I I@#@8 "b
d@#@#@#A..A@#@#P `b
8#@#@#@#@#@#@8" 8
8@#@#@#@#@#@J 8
8#@#@#@#@#P 8
Y@#@#@#@#P ,db, ,P
Y@#@#@#@) @DWB aP
"Y#@#@#b `69' aP"
"Y@#@#g,, _,dP"
`""YBBgggddP""'


Source



Becomes



 d d ,
8 @ @ d ,
8 # # # # d _
8 @ @ @ @ @ @ ,
Y # # # # # # # ,
@ @ @ @ @ I V @ d
Y # # # # # ` # d
@ @ @ @ @ A ` @ F
" # # # # # . V # "
Y @ @ @ @ @ . @ @ "
# # # # # # A I # g "
" @ @ @ @ @ @ @ @ @ , Y
Y # # # # # # # # # b
@ @ @ P P @ @ @ @ b b
` # # ) J 8 # 8 ,
" @ b " P ` ,
" # " _
Y g Y
B , , b
B , @ d ,
g ` D b "
g 6 W , b
g 9 B ,
d ' "
d b
P _ `
" , b
" d 8
' P a 8
" P a , 8
" P P



 ...,?77??!~~~~!???77?<~....
..?7` `7!..
.,=` ..~7^` I ?1.
........ ..^ ?` ..?7!1 . ...??7
. .7` .,777.. .I. . .! .,7!
.. .? .^ .l ?i. . .` .,^
b .! .= .?7???7~. .>r . .=
.,.?4 , .^ 1 ` 4...
J ^ , 5 ` ?<.
.%.7; .` ., .; .=.
.+^ ., .% MML F ., ?,
P ,, J .MMN F 6 4.
l d, , .MMM! .t .. ,,
, JMa..` MMM` . .! .;
r .M# .M# .% . .~ .,
dMMMNJ..! .P7! .> . . ,,
.WMMMMMm ?^.. ..,?! .. .. , Z7` `?^.. ,,
?THB3 ?77?! .Yr . .! ?, ?^C
?, .,^.` .% .^ 5.
7, .....?7 .^ ,` ?.
`<. .= .`' 1
....dn... ... ...,7..J=!7, .,
..= G.,7 ..,o.. .? J. F
.J. .^ ,,,t ,^ ?^. .^ `?~. F
r %J. $ 5r J ,r.1 .=. .%
r .77=?4. ``, l ., 1 .. <. 4.,
.$.. .X.. .n.. ., J. r .` J. `'
.?` .5 `` .% .% .' L.' t
,. ..1JL ., J .$.?` .
1. .=` ` .J7??7<.. .;
JS.. ..^ L 7.:
`> .. J. 4.
+ r `t r ~=..G.
= $ ,. J
2 r t .;
.,7! r t`7~.. j..
j 7~L...$=.?7r r ;?1.
8. .= j ..,^ ..
r G .
.,7, j, .>=.
.J??, `T....... % ..
..^ <. ~. ,. .D
.?` 1 L .7.........?Ti..l
,` L . .% .`! `j,
.^ . .. .` .^ .?7!?7+. 1
.` . .`..`7. .^ ,` .i.;
.7<..........~<<3?7!` 4. r ` G%
J.` .! %
JiJ .`
.1. J
?1. .'
7<..%


Source



Becomes



 . .
. .
. .
b .
. .
, .
. J . .
. % ? .
+ . 4 . .
P ^ 7 ! ? .
l ; ^ 7 .
, . ` .
d , ^ .
. M r , ,
W M , =
M M d ` .
M N J , .
? M J . M ?
T M . M a , . 7
H M . # . = . ` .
? B m ! . . . , . ^ . .
, 3 ` , J % ` ^ . , .
? 7 ,
7 ? 7 7 ?
r . , ^ ? 7 7
. r J . . ? . ? 7
, ? . % . . ` . ? . ` . ?
. ` $ . J = . < . 7 . . ?
. 7 . . . . M , ~ l . ~ !
. . 7 . . ? . M M . I . 7 ~
. . = $ ^ . 7 M M L . . ^ ~
1 5 ? d 7 M M N 1 ? ` ~
J 4 , n ? . M M ? 7 ~
L . , G . ! M M ! 5 i ! !
. , . . . # ` . . 1 ?
. . 1 X 5 t , . . . ; . . I ?
. ` ^ , . . . r 7 . , F > . . ?
7 ` ? . J . . . ? . F r . 7
< ` . S ` J , . . ! . . . t . ! 7
. ^ . . . ` ^ . . . P % . ` ?
. J j , ` . ` , . ? . 7 ` <
. ? . 7 > ` . , . 7 . . ! ` ~
. ? , r 8 ! + n o . , . . .
. , 7 . = . . . . . ^ Y .
. , 7 2 . . % . . , . r . . .
. < ~ r . , 7 ` > , .
. . ` L r . l . . . 6 4 .
. 1 T . $ ^ . . . . = . . . . . . = . `
. . . r ` = . , . ? ? J ^ % . . . , 7
~ L ~ . . t t ` J % , ^ = . . ! . ^ . !
< . . . . $ ` , J . ! ` . ~ , .
< . L . G = = 7 . ` . . . 1 7 ' , . . , ? 7 .
3 . . . ~ t J $ ' , , ` ^ ! < ! .
? . . j ? . r . . . r r . J . .
7 . . . , 7 . J L J ? L . . ^ . Z . ?
! ` , r . ~ 7 ` . . . 1 7 . ? 1
` . . % j ; = 4 ? ' ` ? ` = ? .
. . . j . . ? < ` , . 7
` . % 7 . . . 7 . ?
7 ` . . r . G < J ~ 5 ?
. . , . . . . . . ,
4 . ^ ; . t ?
. . ? . . . 4
J . . . . 1 7 . = 1 .
. r ^ ^ ` . . . ; . . ,
` ! . . : , ` ,
J . . . . 4 F ? .
i . ` , . . > . . F ^ ;
J ! ` ? ? = ` , % . .
. 7 T . ' . ,
1 ! i . . ,
. ? . D . ,
7 . ? ,
? + ` l ^ ,
1 . j C
. . ,
i 1
.
7 G ;
< %
. . %
. . J `
% '


Rules and Notes



  • Input and output may be in any convenient format and character encoding as long as it supports all printable ASCII characters (U+0020 - U+007E, LF)

  • You may assume the input contains only printable ASCII characters (defined above)

  • You must support art up to $100 times 100$ characters.

  • You may assume the input is right-padded, as to be a perfect rectangular grid of characters.

    • If it conveniences you, you may also assume the input is padded to be exactly $100 times 100$ characters.


  • Use the ASCII space to align and space characters.

  • Characters may be overpadded (or even underpadded) in any direction as long as the result is properly aligned.

Happy Golfing!










share|improve this question









$endgroup$




Your task is to take an ASCII art image and output it rotated clockwise by 45 degrees and scaled by a factor of $sqrt 2$. The scaling comes from using a lattice pattern which introduces space between the characters.



To explain it visually, a $3 times 3$ block would be processed like so:



123
456
789


becomes



 1
4 2
7 5 3
8 6
9


Characters will not be transformed, so boxes will look strange after rotation:



+-+
| |
+-+


becomes



 +
| -
+ +
- |
+


To explain the process more explicitly, the output consists of a diamond lattice pattern where the top row corresponds to the top-left character of the input, the next row corresponds with the right and below neighbors, next row is those neighbors, and so forth until all of the characters have been placed on the lattice.



Examples



 FISHKISSFISHKIS 
SFISHKISSFISHKISSFISH F
ISHK ISSFISHKISSFISHKISS FI
SHKISS FISHKISSFISHKISSFISS FIS
HKISSFISHKISSFISHKISSFISHKISSFISH KISS
FISHKISSFISHKISSFISHKISSFISHKISS FISHK
SSFISHKISSFISHKISSFISHKISSFISHKISSF
ISHKISSFISHKISSFISHKISSFISHKISSF ISHKI
SSFISHKISSFISHKISSFISHKISSFISHKIS SFIS
HKISSFISHKISSFISHKISSFISHKISS FIS
HKISSFISHKISSFISHKISSFISHK IS
SFISHKISSFISHKISSFISH K
ISSFISHKISSFISHK


Source



Becomes



 H
K S
I H I
F S K S
S I S I H S
S I S F S K F
F S H I S I
H I H K S S F
K S K S I H H I
I H I S S K I K S
H S K S F S I F S I H
K S I S I F S I S S K
I F S F S I S S F S I
S I S I H S F H I F S
S S S F S K H I K S I S
F F H I H I K S I H S F
I I K S K S I H S K H I
I S S I H I S S K S I K S
S H H S K S F S I F S I H
S K K S I S I F S I S S K
F I I F S F S I S S F S I
I S S I S I H S F H I F S
S S S S F S K H I K S I
H F F H I H I K S I H S
K I I K S K S I H S K H
I S S I H I S S K S I
S H H S K S F S I F S
S K K S I S I F S I S
F I I F S F S I S S
I S S I S I H S F S
S S S S F S K H I
H F F H I H I K S
K I I K S K S I H
S S I H I S S
H H S K S F S
K S I S I
S F S
H F K F F F
K I I I I
I I S S S
S S H S
S H S K
F K F
F I I
I S
I S
S
K



 _,,ddF"""Ybb,,_ 
,d@#@#@#@g, `"Yb,
,d#@#V``V@#@#b "b,
d@#@#I I@#@8 "b
d@#@#@#A..A@#@#P `b
8#@#@#@#@#@#@8" 8
8@#@#@#@#@#@J 8
8#@#@#@#@#P 8
Y@#@#@#@#P ,db, ,P
Y@#@#@#@) @DWB aP
"Y#@#@#b `69' aP"
"Y@#@#g,, _,dP"
`""YBBgggddP""'


Source



Becomes



 d d ,
8 @ @ d ,
8 # # # # d _
8 @ @ @ @ @ @ ,
Y # # # # # # # ,
@ @ @ @ @ I V @ d
Y # # # # # ` # d
@ @ @ @ @ A ` @ F
" # # # # # . V # "
Y @ @ @ @ @ . @ @ "
# # # # # # A I # g "
" @ @ @ @ @ @ @ @ @ , Y
Y # # # # # # # # # b
@ @ @ P P @ @ @ @ b b
` # # ) J 8 # 8 ,
" @ b " P ` ,
" # " _
Y g Y
B , , b
B , @ d ,
g ` D b "
g 6 W , b
g 9 B ,
d ' "
d b
P _ `
" , b
" d 8
' P a 8
" P a , 8
" P P



 ...,?77??!~~~~!???77?<~....
..?7` `7!..
.,=` ..~7^` I ?1.
........ ..^ ?` ..?7!1 . ...??7
. .7` .,777.. .I. . .! .,7!
.. .? .^ .l ?i. . .` .,^
b .! .= .?7???7~. .>r . .=
.,.?4 , .^ 1 ` 4...
J ^ , 5 ` ?<.
.%.7; .` ., .; .=.
.+^ ., .% MML F ., ?,
P ,, J .MMN F 6 4.
l d, , .MMM! .t .. ,,
, JMa..` MMM` . .! .;
r .M# .M# .% . .~ .,
dMMMNJ..! .P7! .> . . ,,
.WMMMMMm ?^.. ..,?! .. .. , Z7` `?^.. ,,
?THB3 ?77?! .Yr . .! ?, ?^C
?, .,^.` .% .^ 5.
7, .....?7 .^ ,` ?.
`<. .= .`' 1
....dn... ... ...,7..J=!7, .,
..= G.,7 ..,o.. .? J. F
.J. .^ ,,,t ,^ ?^. .^ `?~. F
r %J. $ 5r J ,r.1 .=. .%
r .77=?4. ``, l ., 1 .. <. 4.,
.$.. .X.. .n.. ., J. r .` J. `'
.?` .5 `` .% .% .' L.' t
,. ..1JL ., J .$.?` .
1. .=` ` .J7??7<.. .;
JS.. ..^ L 7.:
`> .. J. 4.
+ r `t r ~=..G.
= $ ,. J
2 r t .;
.,7! r t`7~.. j..
j 7~L...$=.?7r r ;?1.
8. .= j ..,^ ..
r G .
.,7, j, .>=.
.J??, `T....... % ..
..^ <. ~. ,. .D
.?` 1 L .7.........?Ti..l
,` L . .% .`! `j,
.^ . .. .` .^ .?7!?7+. 1
.` . .`..`7. .^ ,` .i.;
.7<..........~<<3?7!` 4. r ` G%
J.` .! %
JiJ .`
.1. J
?1. .'
7<..%


Source



Becomes



 . .
. .
. .
b .
. .
, .
. J . .
. % ? .
+ . 4 . .
P ^ 7 ! ? .
l ; ^ 7 .
, . ` .
d , ^ .
. M r , ,
W M , =
M M d ` .
M N J , .
? M J . M ?
T M . M a , . 7
H M . # . = . ` .
? B m ! . . . , . ^ . .
, 3 ` , J % ` ^ . , .
? 7 ,
7 ? 7 7 ?
r . , ^ ? 7 7
. r J . . ? . ? 7
, ? . % . . ` . ? . ` . ?
. ` $ . J = . < . 7 . . ?
. 7 . . . . M , ~ l . ~ !
. . 7 . . ? . M M . I . 7 ~
. . = $ ^ . 7 M M L . . ^ ~
1 5 ? d 7 M M N 1 ? ` ~
J 4 , n ? . M M ? 7 ~
L . , G . ! M M ! 5 i ! !
. , . . . # ` . . 1 ?
. . 1 X 5 t , . . . ; . . I ?
. ` ^ , . . . r 7 . , F > . . ?
7 ` ? . J . . . ? . F r . 7
< ` . S ` J , . . ! . . . t . ! 7
. ^ . . . ` ^ . . . P % . ` ?
. J j , ` . ` , . ? . 7 ` <
. ? . 7 > ` . , . 7 . . ! ` ~
. ? , r 8 ! + n o . , . . .
. , 7 . = . . . . . ^ Y .
. , 7 2 . . % . . , . r . . .
. < ~ r . , 7 ` > , .
. . ` L r . l . . . 6 4 .
. 1 T . $ ^ . . . . = . . . . . . = . `
. . . r ` = . , . ? ? J ^ % . . . , 7
~ L ~ . . t t ` J % , ^ = . . ! . ^ . !
< . . . . $ ` , J . ! ` . ~ , .
< . L . G = = 7 . ` . . . 1 7 ' , . . , ? 7 .
3 . . . ~ t J $ ' , , ` ^ ! < ! .
? . . j ? . r . . . r r . J . .
7 . . . , 7 . J L J ? L . . ^ . Z . ?
! ` , r . ~ 7 ` . . . 1 7 . ? 1
` . . % j ; = 4 ? ' ` ? ` = ? .
. . . j . . ? < ` , . 7
` . % 7 . . . 7 . ?
7 ` . . r . G < J ~ 5 ?
. . , . . . . . . ,
4 . ^ ; . t ?
. . ? . . . 4
J . . . . 1 7 . = 1 .
. r ^ ^ ` . . . ; . . ,
` ! . . : , ` ,
J . . . . 4 F ? .
i . ` , . . > . . F ^ ;
J ! ` ? ? = ` , % . .
. 7 T . ' . ,
1 ! i . . ,
. ? . D . ,
7 . ? ,
? + ` l ^ ,
1 . j C
. . ,
i 1
.
7 G ;
< %
. . %
. . J `
% '


Rules and Notes



  • Input and output may be in any convenient format and character encoding as long as it supports all printable ASCII characters (U+0020 - U+007E, LF)

  • You may assume the input contains only printable ASCII characters (defined above)

  • You must support art up to $100 times 100$ characters.

  • You may assume the input is right-padded, as to be a perfect rectangular grid of characters.

    • If it conveniences you, you may also assume the input is padded to be exactly $100 times 100$ characters.


  • Use the ASCII space to align and space characters.

  • Characters may be overpadded (or even underpadded) in any direction as long as the result is properly aligned.

Happy Golfing!







code-golf ascii-art






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 5 hours ago









BeefsterBeefster

2,272937




2,272937







  • 1




    $begingroup$
    Poor Sonic, he just wanted to live D:
    $endgroup$
    – Benjamin Urquhart
    1 hour ago












  • 1




    $begingroup$
    Poor Sonic, he just wanted to live D:
    $endgroup$
    – Benjamin Urquhart
    1 hour ago







1




1




$begingroup$
Poor Sonic, he just wanted to live D:
$endgroup$
– Benjamin Urquhart
1 hour ago




$begingroup$
Poor Sonic, he just wanted to live D:
$endgroup$
– Benjamin Urquhart
1 hour ago










4 Answers
4






active

oldest

votes


















3












$begingroup$


Canvas, 6 bytes



/⤢ *\⤢


Try it here!



/ pad each line with one less space than the previous
⤢ transpose the object
* place a space between every character
pad each line with one more space than the previous
⤢ transpose the object back


Example:



123
456
789
/:
123
456
789
⤢:
7
48
159
26
3
*:
7
4 8
1 5 9
2 6
3
:
7
4 8
1 5 9
2 6
3
⤢:


1
4 2
7 5 3
8 6
9







share|improve this answer











$endgroup$












  • $begingroup$
    Are your code and explanation not using differing slashes?
    $endgroup$
    – Adám
    3 hours ago










  • $begingroup$
    @Adám I usually ASCII-fy the explanations for them to align better
    $endgroup$
    – dzaima
    3 hours ago


















2












$begingroup$


Python 3, 109 bytes





lambda a:[" "*abs(len(a)+~i)+" ".join(a[i-j][j]for j in range(i+1)if j<len(a)>i-j)for i in range(len(a)*2-1)]


Try it online!



I'm sure this should be shorter...






share|improve this answer









$endgroup$




















    1












    $begingroup$


    Charcoal, 2 bytes



    ↘A


    Try it online! Link is to verbose version of code. Takes input as either a single newline-delimited string literal or as an array of strings. Explanation: reads the input and outputs it in the desired diagonal direction. Version which accepts a blank-line terminated list of lines from STDIN:



    WS⊞υι↘υ


    Try it online! Link is to verbose version of code.






    share|improve this answer









    $endgroup$




















      0












      $begingroup$


      Jelly, 26 bytes



      JU’;ZJ$x@€⁶ðżµUŒDUṙLN‘ƊṚK€


      Try it online!






      share|improve this answer









      $endgroup$













        Your Answer





        StackExchange.ifUsing("editor", function ()
        return StackExchange.using("mathjaxEditing", function ()
        StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
        StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
        );
        );
        , "mathjax-editing");

        StackExchange.ifUsing("editor", function ()
        StackExchange.using("externalEditor", function ()
        StackExchange.using("snippets", function ()
        StackExchange.snippets.init();
        );
        );
        , "code-snippets");

        StackExchange.ready(function()
        var channelOptions =
        tags: "".split(" "),
        id: "200"
        ;
        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%2fcodegolf.stackexchange.com%2fquestions%2f182540%2frotate-ascii-art-by-45-degrees%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












        $begingroup$


        Canvas, 6 bytes



        /⤢ *\⤢


        Try it here!



        / pad each line with one less space than the previous
        ⤢ transpose the object
        * place a space between every character
        pad each line with one more space than the previous
        ⤢ transpose the object back


        Example:



        123
        456
        789
        /:
        123
        456
        789
        ⤢:
        7
        48
        159
        26
        3
        *:
        7
        4 8
        1 5 9
        2 6
        3
        :
        7
        4 8
        1 5 9
        2 6
        3
        ⤢:


        1
        4 2
        7 5 3
        8 6
        9







        share|improve this answer











        $endgroup$












        • $begingroup$
          Are your code and explanation not using differing slashes?
          $endgroup$
          – Adám
          3 hours ago










        • $begingroup$
          @Adám I usually ASCII-fy the explanations for them to align better
          $endgroup$
          – dzaima
          3 hours ago















        3












        $begingroup$


        Canvas, 6 bytes



        /⤢ *\⤢


        Try it here!



        / pad each line with one less space than the previous
        ⤢ transpose the object
        * place a space between every character
        pad each line with one more space than the previous
        ⤢ transpose the object back


        Example:



        123
        456
        789
        /:
        123
        456
        789
        ⤢:
        7
        48
        159
        26
        3
        *:
        7
        4 8
        1 5 9
        2 6
        3
        :
        7
        4 8
        1 5 9
        2 6
        3
        ⤢:


        1
        4 2
        7 5 3
        8 6
        9







        share|improve this answer











        $endgroup$












        • $begingroup$
          Are your code and explanation not using differing slashes?
          $endgroup$
          – Adám
          3 hours ago










        • $begingroup$
          @Adám I usually ASCII-fy the explanations for them to align better
          $endgroup$
          – dzaima
          3 hours ago













        3












        3








        3





        $begingroup$


        Canvas, 6 bytes



        /⤢ *\⤢


        Try it here!



        / pad each line with one less space than the previous
        ⤢ transpose the object
        * place a space between every character
        pad each line with one more space than the previous
        ⤢ transpose the object back


        Example:



        123
        456
        789
        /:
        123
        456
        789
        ⤢:
        7
        48
        159
        26
        3
        *:
        7
        4 8
        1 5 9
        2 6
        3
        :
        7
        4 8
        1 5 9
        2 6
        3
        ⤢:


        1
        4 2
        7 5 3
        8 6
        9







        share|improve this answer











        $endgroup$




        Canvas, 6 bytes



        /⤢ *\⤢


        Try it here!



        / pad each line with one less space than the previous
        ⤢ transpose the object
        * place a space between every character
        pad each line with one more space than the previous
        ⤢ transpose the object back


        Example:



        123
        456
        789
        /:
        123
        456
        789
        ⤢:
        7
        48
        159
        26
        3
        *:
        7
        4 8
        1 5 9
        2 6
        3
        :
        7
        4 8
        1 5 9
        2 6
        3
        ⤢:


        1
        4 2
        7 5 3
        8 6
        9








        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 3 hours ago

























        answered 3 hours ago









        dzaimadzaima

        16k22060




        16k22060











        • $begingroup$
          Are your code and explanation not using differing slashes?
          $endgroup$
          – Adám
          3 hours ago










        • $begingroup$
          @Adám I usually ASCII-fy the explanations for them to align better
          $endgroup$
          – dzaima
          3 hours ago
















        • $begingroup$
          Are your code and explanation not using differing slashes?
          $endgroup$
          – Adám
          3 hours ago










        • $begingroup$
          @Adám I usually ASCII-fy the explanations for them to align better
          $endgroup$
          – dzaima
          3 hours ago















        $begingroup$
        Are your code and explanation not using differing slashes?
        $endgroup$
        – Adám
        3 hours ago




        $begingroup$
        Are your code and explanation not using differing slashes?
        $endgroup$
        – Adám
        3 hours ago












        $begingroup$
        @Adám I usually ASCII-fy the explanations for them to align better
        $endgroup$
        – dzaima
        3 hours ago




        $begingroup$
        @Adám I usually ASCII-fy the explanations for them to align better
        $endgroup$
        – dzaima
        3 hours ago











        2












        $begingroup$


        Python 3, 109 bytes





        lambda a:[" "*abs(len(a)+~i)+" ".join(a[i-j][j]for j in range(i+1)if j<len(a)>i-j)for i in range(len(a)*2-1)]


        Try it online!



        I'm sure this should be shorter...






        share|improve this answer









        $endgroup$

















          2












          $begingroup$


          Python 3, 109 bytes





          lambda a:[" "*abs(len(a)+~i)+" ".join(a[i-j][j]for j in range(i+1)if j<len(a)>i-j)for i in range(len(a)*2-1)]


          Try it online!



          I'm sure this should be shorter...






          share|improve this answer









          $endgroup$















            2












            2








            2





            $begingroup$


            Python 3, 109 bytes





            lambda a:[" "*abs(len(a)+~i)+" ".join(a[i-j][j]for j in range(i+1)if j<len(a)>i-j)for i in range(len(a)*2-1)]


            Try it online!



            I'm sure this should be shorter...






            share|improve this answer









            $endgroup$




            Python 3, 109 bytes





            lambda a:[" "*abs(len(a)+~i)+" ".join(a[i-j][j]for j in range(i+1)if j<len(a)>i-j)for i in range(len(a)*2-1)]


            Try it online!



            I'm sure this should be shorter...







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 4 hours ago









            HyperNeutrinoHyperNeutrino

            18.9k437147




            18.9k437147





















                1












                $begingroup$


                Charcoal, 2 bytes



                ↘A


                Try it online! Link is to verbose version of code. Takes input as either a single newline-delimited string literal or as an array of strings. Explanation: reads the input and outputs it in the desired diagonal direction. Version which accepts a blank-line terminated list of lines from STDIN:



                WS⊞υι↘υ


                Try it online! Link is to verbose version of code.






                share|improve this answer









                $endgroup$

















                  1












                  $begingroup$


                  Charcoal, 2 bytes



                  ↘A


                  Try it online! Link is to verbose version of code. Takes input as either a single newline-delimited string literal or as an array of strings. Explanation: reads the input and outputs it in the desired diagonal direction. Version which accepts a blank-line terminated list of lines from STDIN:



                  WS⊞υι↘υ


                  Try it online! Link is to verbose version of code.






                  share|improve this answer









                  $endgroup$















                    1












                    1








                    1





                    $begingroup$


                    Charcoal, 2 bytes



                    ↘A


                    Try it online! Link is to verbose version of code. Takes input as either a single newline-delimited string literal or as an array of strings. Explanation: reads the input and outputs it in the desired diagonal direction. Version which accepts a blank-line terminated list of lines from STDIN:



                    WS⊞υι↘υ


                    Try it online! Link is to verbose version of code.






                    share|improve this answer









                    $endgroup$




                    Charcoal, 2 bytes



                    ↘A


                    Try it online! Link is to verbose version of code. Takes input as either a single newline-delimited string literal or as an array of strings. Explanation: reads the input and outputs it in the desired diagonal direction. Version which accepts a blank-line terminated list of lines from STDIN:



                    WS⊞υι↘υ


                    Try it online! Link is to verbose version of code.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered 2 hours ago









                    NeilNeil

                    82.2k745178




                    82.2k745178





















                        0












                        $begingroup$


                        Jelly, 26 bytes



                        JU’;ZJ$x@€⁶ðżµUŒDUṙLN‘ƊṚK€


                        Try it online!






                        share|improve this answer









                        $endgroup$

















                          0












                          $begingroup$


                          Jelly, 26 bytes



                          JU’;ZJ$x@€⁶ðżµUŒDUṙLN‘ƊṚK€


                          Try it online!






                          share|improve this answer









                          $endgroup$















                            0












                            0








                            0





                            $begingroup$


                            Jelly, 26 bytes



                            JU’;ZJ$x@€⁶ðżµUŒDUṙLN‘ƊṚK€


                            Try it online!






                            share|improve this answer









                            $endgroup$




                            Jelly, 26 bytes



                            JU’;ZJ$x@€⁶ðżµUŒDUṙLN‘ƊṚK€


                            Try it online!







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered 1 hour ago









                            Nick KennedyNick Kennedy

                            1,23649




                            1,23649



























                                draft saved

                                draft discarded
















































                                If this is an answer to a challenge…



                                • …Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.


                                • …Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
                                  Explanations of your answer make it more interesting to read and are very much encouraged.


                                • …Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.


                                More generally…



                                • …Please make sure to answer the question and provide sufficient detail.


                                • …Avoid asking for help, clarification or responding to other answers (use comments instead).




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f182540%2frotate-ascii-art-by-45-degrees%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

                                Category:Fedor von Bock Media in category "Fedor von Bock"Navigation menuUpload mediaISNI: 0000 0000 5511 3417VIAF ID: 24712551GND ID: 119294796Library of Congress authority ID: n96068363BnF ID: 12534305fSUDOC authorities ID: 034604189Open Library ID: OL338253ANKCR AUT ID: jn19990000869National Library of Israel ID: 000514068National Thesaurus for Author Names ID: 341574317ReasonatorScholiaStatistics

                                Reverse int within the 32-bit signed integer range: [−2^31, 2^31 − 1]Combining two 32-bit integers into one 64-bit integerDetermine if an int is within rangeLossy packing 32 bit integer to 16 bitComputing the square root of a 64-bit integerKeeping integer addition within boundsSafe multiplication of two 64-bit signed integersLeetcode 10: Regular Expression MatchingSigned integer-to-ascii x86_64 assembler macroReverse the digits of an Integer“Add two numbers given in reverse order from a linked list”

                                Kiel Indholdsfortegnelse Historie | Transport og færgeforbindelser | Sejlsport og anden sport | Kultur | Kendte personer fra Kiel | Noter | Litteratur | Eksterne henvisninger | Navigationsmenuwww.kiel.de54°19′31″N 10°8′26″Ø / 54.32528°N 10.14056°Ø / 54.32528; 10.14056Oberbürgermeister Dr. Ulf Kämpferwww.statistik-nord.deDen danske Stats StatistikKiels hjemmesiderrrWorldCat312794080n790547494030481-4