Write language name in 3D ASCII: Difference between revisions
m
→{{header|Binary Lambda Calculus}}
m (→{{header|Scala}}: Rm Scala imp category) |
|||
(134 intermediate revisions by 57 users not shown) | |||
Line 1:
{{task}}
{{omit from|GUISS}}
{{omit from|TUSCRIPT}}
;Task:
Write/display a language's name in '''3D''' ASCII.
(We can leave the definition of "3D ASCII" fuzzy,
so long as the result is interesting or amusing,
not a cheap hack to satisfy the task.)
;Related tasks:
* [[Draw_a_sphere|draw a sphere]]
* [[Draw_a_cuboid|draw a cuboid]]
* [[Draw_a_rotating_cube|draw a rotating cube]]
* [[Death_Star|draw a Deathstar]]
<br><br>
=={{header|11l}}==
<syntaxhighlight lang="11l">V s =
|‘ XX
X
X
X
X
X
XXXXX’
V lines = s.split("\n")
V width = max(lines.map(l -> l.len))
L(line) lines
print((‘ ’ * (lines.len - L.index - 1))‘’(line.ljust(width).replace(‘ ’, ‘ ’).replace(‘X’, ‘__/’) * 3))</syntaxhighlight>
{{out}}
<pre>
__/__/ __/__/ __/__/
__/ __/ __/
__/ __/ __/
__/ __/ __/
__/ __/ __/
__/ __/ __/
__/__/__/__/__/ __/__/__/__/__/ __/__/__/__/__/
</pre>
=={{header|360 Assembly}}==
3D EBCDIC. This program does nothing clever in any way: it just prints out strings.
<syntaxhighlight lang="360asm">THREED CSECT
STM 14,12,12(13)
BALR 12,0
USING *,12
XPRNT =CL23'0 ####. #. ###.',23
XPRNT =CL24'1 #. #. #. #.',24
XPRNT =CL24'1 ##. # ##. #. #.',24
XPRNT =CL24'1 #. #. #. #. #.',24
XPRNT =CL23'1 ####. ###. ###.',23
LM 14,12,12(13)
BR 14
LTORG
END</syntaxhighlight>
{{out}}
<pre>
####. #. ###.
#. #. #. #.
##. # ##. #. #.
#. #. #. #. #.
####. ###. ###.
</pre>
=={{header|Action!}}==
Atari 8-bit computers use [https://en.wikipedia.org/wiki/ATASCII ATASCII] character set which is a variation of ASCII.
<syntaxhighlight lang="action!">BYTE ARRAY data = [
$00 $00 $00 $00 $4E $4E $4E $00 $00 $00 $00 $00 $00 $00 $00 $00 $4E $00 $00 $00 $00 $4E $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $4E $00 $00 $00
$00 $00 $00 $46 $47 $00 $00 $47 $00 $00 $00 $00 $00 $00 $00 $42 $47 $47 $00 $00 $42 $47 $47 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $42 $47 $47 $00 $00
$00 $00 $42 $47 $48 $80 $80 $80 $4A $00 $00 $4E $4E $4E $00 $42 $00 $80 $4E $00 $00 $47 $80 $00 $00 $4E $4E $00 $00 $00 $4E $4E $4E $00 $00 $42 $00 $80 $00 $00
$00 $00 $42 $00 $80 $00 $42 $00 $80 $00 $46 $47 $00 $00 $47 $42 $00 $80 $00 $47 $00 $4E $00 $00 $46 $47 $00 $47 $00 $42 $47 $00 $00 $47 $00 $42 $00 $80 $00 $00
$00 $00 $42 $00 $80 $00 $42 $00 $80 $42 $47 $48 $80 $80 $80 $42 $00 $80 $80 $80 $42 $47 $47 $42 $47 $48 $80 $80 $4A $42 $00 $80 $80 $80 $4A $42 $00 $80 $00 $00
$00 $00 $42 $00 $80 $4D $4D $47 $80 $42 $00 $80 $00 $00 $00 $42 $00 $80 $00 $00 $42 $00 $80 $42 $00 $80 $42 $00 $80 $42 $00 $80 $42 $00 $80 $42 $00 $80 $00 $00
$00 $00 $42 $00 $80 $80 $80 $80 $80 $42 $00 $80 $00 $00 $00 $42 $00 $80 $00 $00 $42 $00 $80 $42 $00 $80 $42 $00 $80 $42 $00 $80 $42 $00 $80 $00 $47 $80 $00 $00
$00 $00 $42 $00 $80 $00 $42 $00 $80 $42 $00 $80 $4E $4E $00 $42 $00 $80 $4E $00 $42 $00 $80 $42 $00 $80 $42 $00 $80 $42 $00 $80 $42 $00 $80 $00 $4E $00 $00 $00
$00 $00 $42 $00 $80 $00 $42 $00 $80 $00 $47 $80 $00 $00 $47 $00 $47 $80 $00 $47 $42 $00 $80 $00 $47 $80 $4D $47 $80 $42 $00 $80 $42 $00 $80 $42 $47 $47 $00 $00
$00 $00 $00 $47 $80 $00 $00 $47 $80 $00 $00 $CA $80 $80 $80 $00 $00 $CA $80 $80 $00 $47 $80 $00 $00 $CA $80 $80 $C8 $00 $47 $80 $00 $47 $80 $00 $47 $80 $00 $00]
PROC Main()
BYTE POINTER ptr
Graphics(0)
SetColor(2,0,2)
ptr=PeekC(88)+280
MoveBlock(ptr,data,400)
RETURN</syntaxhighlight>
{{out}}
[https://gitlab.com/amarok8bit/action-rosetta-code/-/raw/master/images/Write_language_name_in_3D_ASCII.png Screenshot from Atari 8-bit computer]
=={{header|Ada}}==
Quotes are not escaped by \ in ada (nor does \ have any meaning in strings),
so this turns out highlighting funny.
<syntaxhighlight lang="ada">with Ada.Text_IO; use Ada.Text_IO;
with Ada.Strings.Fixed; use Ada.Strings.Fixed;
procedure AsciiArt is
Line 20 ⟶ 116:
if i mod 3 = 0 then New_Line; Put(i/3*' '); end if;
end loop;
end AsciiArt;</
{{out}}
<pre>
Line 32 ⟶ 128:
\/\\\ \/\\\ \/\\\\\\\\\\\\ \/\\\\\\\\\\\\
\/// \/// \//////////// \////////////</pre>
=={{header|Arturo}}==
<syntaxhighlight lang="rebol">print {:
______ __
/\ _ \ /\ \__
\ \ \L\ \ _ __\ \ ,_\ __ __ _ __ ___
\ \ __ \/\`'__\ \ \/ /\ \/\ \/\`'__\/ __`\
\ \ \/\ \ \ \/ \ \ \_\ \ \_\ \ \ \//\ \L\ \
\ \_\ \_\ \_\ \ \__\\ \____/\ \_\\ \____/
\/_/\/_/\/_/ \/__/ \/___/ \/_/ \/___/
:}</syntaxhighlight>
{{out}}
<pre> ______ __
/\ _ \ /\ \__
\ \ \L\ \ _ __\ \ ,_\ __ __ _ __ ___
\ \ __ \/\`'__\ \ \/ /\ \/\ \/\`'__\/ __`\
\ \ \/\ \ \ \/ \ \ \_\ \ \_\ \ \ \//\ \L\ \
\ \_\ \_\ \_\ \ \__\\ \____/\ \_\\ \____/
\/_/\/_/\/_/ \/__/ \/___/ \/_/ \/___/</pre>
=={{header|AutoHotkey}}==
<
draw =
(
Line 51 ⟶ 169:
GuiClose:
ExitApp</
{{out}}
<pre> ______ __ __ __ __
/\ __ \/\ \_\ \/\ \/ /
Line 61 ⟶ 179:
=={{header|AWK}}==
<syntaxhighlight lang="awk">
# syntax: GAWK -f WRITE_LANGUAGE_NAME_IN_3D_ASCII.AWK
BEGIN {
Line 80 ⟶ 198:
exit(0)
}
</syntaxhighlight>
{{out}}
<pre>
_/_/_/_/ _/ _/ _/ _/
Line 92 ⟶ 210:
_/ _/ _/ _/ _/ _/
</pre>
=={{header|BASIC}}==
==={{header|Applesoft BASIC}}===
Ported from [[Write language name in 3D ASCII#ZX Spectrum Basic|ZX Spectrum Basic]].<
20 DIM B(5,5) : REM OUR BIGMAP CHARACTERS
30 FOR L = 1 TO 5 : REM 5 CHARACTERS
Line 154 ⟶ 262:
9030 DATA 31,4,4,4,31: REM I
9040 DATA 14,17,16,17,14: REM C
</syntaxhighlight>
==={{header|BBC BASIC}}===
{{works with|BBC BASIC for Windows}}
Uses the built-in '''BBC Micro'''-compatible character generator, so any text can be specified.
<
END
Line 180 ⟶ 288:
PRINT
NEXT row%
ENDPROC</
{{out}}
<pre>
##### ##### #### ##### #### #### ###### ####
Line 193 ⟶ 301:
</pre>
==={{header|
freebasic is quite a long name, so I have done a combi.
<syntaxhighlight lang="freebasic">dim as integer yres=hiword(width)
dim as integer xres=loword(width)
Line 224 ⟶ 330:
print "BASIC"
Sleep
</syntaxhighlight>
{{out}}
<pre> \ \ \ \ \ \ \ \ \ \ \ \
\\ \ \ \\ \\\ \\ \ \ \\ \ \
\\\ \ \ \\\ \\\ \\\ \ \ \\\ \ \
Line 243 ⟶ 348:
\\# # \\# # # \\# # \\# #
\# \# \ \#\ \ \#\ \
# # # # # # BASIC</pre>
==={{header|Liberty BASIC}}===
<syntaxhighlight lang="lb">
r=21:s=9:c=s
For i=1 To 11
Line 267 ⟶ 370:
Next
Data 479667712,311470336,485697536,311699712,476292608,0,1976518785,1160267905,1171157123,1160267909,1171223529
</syntaxhighlight>
{{out}}
Line 298 ⟶ 401:
==={{header|Locomotive Basic}}===
<syntaxhighlight lang="locobasic">10 mode 2:defint a-z
20 locate 1,25
30 print "Basic";
Line 323 ⟶ 425:
230 locate xp,yp+1
240 print "\\/";
250 return</
{{Out}}
Line 337 ⟶ 439:
</pre>
==={{header|
<syntaxhighlight lang="ti83b">Disp “ .....+ .....+
Disp “ +o+ooo +o+ooo
Disp “ .o .o
Disp “ .o ...+.+
Disp “ +o +ooooo
Disp “
Disp “ BASIC</syntaxhighlight>
Replace . + o with 0x81,0x80,and 0x7F http://tibasicdev.wikidot.com/one-byte-tokens
These can be found in the Catalog (2ND 0) menu, near the end
==={{header|ZX Spectrum Basic}}===
We have used an extended (non-ASCII) character in this example to produce
an inverted space symbol (143 on the spectrum character table), for simplicity.
We could substitute another character, and change the handler
to cause a colour switch using a traditional space (ascii 32),
but the output would still look the same.
Fixed the error and removed the need for 2^z.
<syntaxhighlight lang="zxbasic"> 10 DIM b(5,5): REM our bigmap characters
20 FOR l=1 TO 5: REM 5 characters
30 FOR m=1 TO 5: REM 5 rows
40 READ b(m,l)
50 NEXT m
60 NEXT l
70 PAPER 0: BORDER 0: REM black background and border
80 INK 2: REM our shadow will be red
90 CLS
100 LET r=8: REM shadow will start on row 8
110 LET c=1: REM shadow will start at column 1
120 GO SUB 2000: REM draw shadow
130 INK 6: REM our foreground will be yellow
140 LET r=9: REM foreground will start on row 9
150 LET c=2: REM foreground will start on column 2
160 GO SUB 2000: REM display the language name
999 STOP
1000 REM convert to binary bigmap
1010 LET
1020 IF t>=z THEN PRINT AT r+l-1,c+c1;CHR$ (143);: LET t=t-z: REM 143 is a block
1040
1050 IF z>=1 THEN GO TO 1020
1060 RETURN
2000 REM display the big letters
2010 FOR l=1 TO 5: LET c1=0: REM our 5 rows
2030 FOR m=1 TO 5: REM bigmap for each character
2040 LET
2050 GO SUB 1000
2060 LET c1=c1+1: REM PRINT
2070 NEXT m
2080 NEXT
2090
9000 DATA 30,17,30,17,30: REM B
9010 DATA 14,17,31,17,17: REM A
9020 DATA 15,16,14,1,30: REM S
9030 DATA 31,4,4,4,31: REM I
9040 DATA 14,17,16,17,14: REM C</
To me it does not work. So I bring my particular solution:
<syntaxhighlight lang="zxbasic">5 PAPER 0: CLS
10 LET d=0: INK 1: GO SUB 40
20 LET d=1: INK 6: GO SUB 40
30 STOP
40 RESTORE
50 FOR n=1 TO 5
60 READ a$
70 FOR j=1 TO LEN a$
80 PRINT AT n+7,j+5+d;
90 IF a$(j)="X" THEN PRINT CHR$ 143: REM Equivalent to 219 in ASCII extended for IBM PC
100 NEXT j
110 NEXT n
120 RETURN
130 DATA "XXX XXXX XXX X XXX"
140 DATA "X X X X X X X "
150 DATA "XXX XXXX XXX X X "
160 DATA "X X X X X X X "
170 DATA "XXX X X XXX X XXX"</syntaxhighlight>
[[File:Basic.jpg]]
=={{header|Batch File}}==
<syntaxhighlight lang="dos">@echo off
for %%b in (
""
" /####### ###### /######## ###### /## /##"
"| ##__ ## /##__ ##|__ ##__/ /##__ ##| ## | ##"
"| ## | ##| ## | ## | ## | ## \__/| ## | ##"
"| ####### | ######## | ## | ## | ########"
"| ##__ ##| ##__ ## | ## | ## | ##__ ##"
"| ## | ##| ## | ## | ## | ## /##| ## | ##"
"| #######/| ## | ## | ## | ######/| ## | ##"
"|_______/ |__/ |__/ |__/ \______/ |__/ |__/"
""
) do echo(%%~b
pause</syntaxhighlight>
=={{header|Befunge}}==
===Befunge-93===
<syntaxhighlight lang="befunge">0" &7&%h&'&%| &7&%7%&%&'&%&'&%&7&%"v
v"'%$%'%$%3$%$%7% 0%&7&%&7&(%$%'%$"<
>"%$%7%$%&%$%&'&%7%$%7%$%, '&+(%$%"v
v"+&'&%+('%$%$%'%$%$%$%$%$%$%$%'%$"<
>"(%$%$%'%$%$%( %$+(%&%$+(%&%$+(%&"v
v"(; $%$%(+$%&%(+$%$%'%$%+&%$%$%$%"<
? ";(;(+(+$%+(%&(;(3%$%&$ 7`+( ":v >
^v!:-1<\,:g7+*63%4 \/_#4:_v#:-*84_$@
$_\:,\^ >55+,$:^:$</syntaxhighlight>
{{out}}
<pre>
__ _____
/\ \____ ______ /\ __\ __ __ ______ ______ ______
\ \ __ \/\ __ \ \_\ \__/\ \ \ \/\ __ \/\ __ \/\ __ \
\ \ \_\ \ \ __/_/\__ _\ \ \_\ \ \ \ \ \ \ \_\ \ \ __/_
\ \_____\ \_____\/_/\ \/\ \_____\ \_\ \_\ \____ \ \_____\
\/_____/\/_____/ \ \_\ \/_____/\/_/\/_/\/\_____\/_____/
\/_/ \/_____/
</pre>
===Befunge-98===
Bit of a long one,but it works and it does something other than taking strings and simply copying to STDOUT.
(It adds line offset to those strings,and the strings are encoded with numbers just because.)
{{works with|CCBI|2.1}}
<syntaxhighlight lang="befunge">
v THE DATA IMAGE.(totally useless after loading into stack)
>89 v Made by gamemanj
Line 429 ⟶ 598:
" "
^ $,< < < (code path reuse here,all 3 end in ,$ so I merged them)
</syntaxhighlight>
{{out}}
<pre>
Line 439 ⟶ 608:
\-- \ --- \-- -
</pre>
=={{header|Binary Lambda Calculus}}==
Using the fact that an asterisk at the start of a program copies the rest to stdout:
<pre>* ____
/\ _`\ __
\ \ \L\ \ /\_\ ___ __ _ __ __ __
\ \ _ <'\/\ \ /' _ `\ /'__`\ /\`'__\/\ \/\ \
\ \ \L\ \\ \ \/\ \/\ \/\ \L\.\_\ \ \/ \ \ \_\ \
\ \____/ \ \_\ \_\ \_\ \__/.\_\\ \_\ \/`____ \
\/___/ \/_/\/_/\/_/\/__/\/_/ \/_/ `/___/> \
__ __ __ /\___/
/\ \ /\ \ /\ \ \/__/
\ \ \ __ ___ ___\ \ \____ \_\ \ __
\ \ \ __ /'__`\ /' __` __`\ \ '__`\ /'_` \ /'__`\
\ \ \L\ \/\ \L\.\_/\ \/\ \/\ \ \ \L\ \/\ \L\ \/\ \L\.\_
\ \____/\ \__/.\_\ \_\ \_\ \_\ \_,__/\ \___,_\ \__/.\_\
\/___/ \/__/\/_/\/_/\/_/\/_/\/___/ \/__,_ /\/__/\/_/
____ ___ ___
/\ _`\ /\_ \ /\_ \
\ \ \/\_\ __ \//\ \ ___ __ __\//\ \ __ __ ____
\ \ \/_/_ /'__`\ \ \ \ /'___\/\ \/\ \ \ \ \ /\ \/\ \ /',__\
\ \ \L\ \/\ \L\.\_ \_\ \_/\ \__/\ \ \_\ \ \_\ \_\ \ \_\ \/\__, `\
\ \____/\ \__/.\_\/\____\ \____\\ \____/ /\____\\ \____/\/\____/
\/___/ \/__/\/_/\/____/\/____/ \/___/ \/____/ \/___/ \/___/</pre>
=={{header|Brainf***}}==
Coming up with decent 3D font was honestly the hardest part.
<syntaxhighlight lang="bf">++++[>++++>++<[>>++>+++>++++++> ++++++<<<<<-]<-]>>++>..>->---->
-...[<]<+++[>++++[>>...<<-]<-]> >>..>>>.....<<<..>>>...[<]++[>>
.....>>>...<<<<<-]>.>.>.>.<<..> >.[<]<+++++[>++++[>>.<<-]<-]>>>
..>>>...[<]+++++[>>..<<-]+++>>. >.<..>>>...<.[[>]<.<.<<..>>.>..
<<<.<<-]+++>.>.>>.<<.>>.<<..>>. >....<<<.>>>...<<<..>>>...<<<.>
>>......<<.>.>..<.<<..>>>..<<<. .>>>....<.<<..>>.>..<<.[[>]<<.>
..<<<...>>>.<.<<<<-]+++>.>..>>. <<.>>.<<...>>>..<<<.>>..<<..>>.
<.<.>>>..<..>...<<<...>>.<<.>>> .<<.>>.<<.<..>>.<.<.>>>.<<<..>>
.>.<<<...>>>..<.>.<<.>.>..<.<.. >>.<<.>.>..<.<..>>.<<.>.>..<.<.
<<.>...>>.<<.>>.<<..>>.<.>.<<.> >..<<...>.>>..<<..>>...<.<<...>
>..<<..>>..<<...>.<.>>.<<..>>.. <<..>>.>.<<.<[[>]<<<<.>>.<.>>..
<<.<..<<-]>.>....>>.<<.>>.<<..> >.>.<.<<.>>..<<..>>.<<...>.>.<<
..>>>.<<<....>>..<<..>>..<<..>> ..<<.>>.<<..>>..<<..>>.<<<.>...
..>>.<<.>>.>......<..>..<.<<..> >.<<.>>.>...<<.>.>..<..>..<..>.
.<..<<.>>.>..<..>..<.<<<.>..... .>>.<.>>......<<..>>..<<.<...>>
.<.>>..<<.>.<.>>..<<..>>..<<..> >..<<.<.>>.<.>>..<<..>>..<<.<<.</syntaxhighlight>
{{out}}
<pre>
___ _____ ___ ___ ___
/\ \ ___ / ___\_\ \__ _\ \__ _\ \__
\ \ \____ ___ ___ ______/\__\ __ ____\ \__/\__ _\\__ _\\__ _\
\ \ __ \\ \/ __\\___ \ _/_/ \/ _ \_ __\_/\__\//_/\__\//_/\__\/
\ \ \/\ \\ /__//___\ \\ \\ / \ \\ \_/ \/__/ \/__/ \/__/
\ \ \_\ \\ \ /\ _ \\ \\ \\ \ \\ \
\ \______\\__\ \ \___/\__\\__\\__\\ \__\\__\
\/______//__/ \/__/\/__//__//__/ \/__//__/
</pre>
=={{header|C}}==
3D enough?<
const char*s = " _____\n /____/\\\n/ ___\\/\n\\ \\/__/\n \\____/";
int main(){ puts(s); return 0; }</
{{out}}
<pre>
_____
Line 454 ⟶ 679:
</pre>
=={{header|C sharp|C#}}==
<syntaxhighlight lang="csharp">using System;
using System.Text;
namespace Language_name_in_3D_ascii
{
public class F5
{
char[] z = { ' ', ' ', '_', '/', };
long[,] f ={
{87381,87381,87381,87381,87381,87381,87381,},
{349525,375733,742837,742837,375733,349525,349525,},
{742741,768853,742837,742837,768853,349525,349525,},
{349525,375733,742741,742741,375733,349525,349525,},
{349621,375733,742837,742837,375733,349525,349525,},
{349525,375637,768949,742741,375733,349525,349525,},
{351157,374101,768949,374101,374101,349525,349525,},
{349525,375733,742837,742837,375733,349621,351157,},
{742741,768853,742837,742837,742837,349525,349525,},
{181,85,181,181,181,85,85,},
{1461,1365,1461,1461,1461,1461,2901,},
{742741,744277,767317,744277,742837,349525,349525,},
{181,181,181,181,181,85,85,},
{1431655765,3149249365L,3042661813L,3042661813L,3042661813L,1431655765,1431655765,},
{349525,768853,742837,742837,742837,349525,349525,},
{349525,375637,742837,742837,375637,349525,349525,},
{349525,768853,742837,742837,768853,742741,742741,},
{349525,375733,742837,742837,375733,349621,349621,},
{349525,744373,767317,742741,742741,349525,349525,},
{349525,375733,767317,351157,768853,349525,349525,},
{374101,768949,374101,374101,351157,349525,349525,},
{349525,742837,742837,742837,375733,349525,349525,},
{5592405,11883957,11883957,5987157,5616981,5592405,5592405,},
{366503875925L,778827027893L,778827027893L,392374737749L,368114513237L,366503875925L,366503875925L,},
{349525,742837,375637,742837,742837,349525,349525,},
{349525,742837,742837,742837,375733,349621,375637,},
{349525,768949,351061,374101,768949,349525,349525,},
{375637,742837,768949,742837,742837,349525,349525,},
{768853,742837,768853,742837,768853,349525,349525,},
{375733,742741,742741,742741,375733,349525,349525,},
{192213,185709,185709,185709,192213,87381,87381,},
{1817525,1791317,1817429,1791317,1817525,1398101,1398101,},
{768949,742741,768853,742741,742741,349525,349525,},
{375733,742741,744373,742837,375733,349525,349525,},
{742837,742837,768949,742837,742837,349525,349525,},
{48053,23381,23381,23381,48053,21845,21845,},
{349621,349621,349621,742837,375637,349525,349525,},
{742837,744277,767317,744277,742837,349525,349525,},
{742741,742741,742741,742741,768949,349525,349525,},
{11883957,12278709,11908533,11883957,11883957,5592405,5592405,},
{11883957,12277173,11908533,11885493,11883957,5592405,5592405,},
{375637,742837,742837,742837,375637,349525,349525,},
{768853,742837,768853,742741,742741,349525,349525,},
{6010197,11885397,11909973,11885397,6010293,5592405,5592405,},
{768853,742837,768853,742837,742837,349525,349525,},
{375733,742741,375637,349621,768853,349525,349525,},
{12303285,5616981,5616981,5616981,5616981,5592405,5592405,},
{742837,742837,742837,742837,375637,349525,349525,},
{11883957,11883957,11883957,5987157,5616981,5592405,5592405,},
{3042268597L,3042268597L,3042661813L,1532713813,1437971797,1431655765,1431655765,},
{11883957,5987157,5616981,5987157,11883957,5592405,5592405,},
{11883957,5987157,5616981,5616981,5616981,5592405,5592405,},
{12303285,5593941,5616981,5985621,12303285,5592405,5592405,}
};
private F5(string s)
{
StringBuilder[] o = new StringBuilder[7];
for (int i = 0; i < 7; i++) o[i] = new StringBuilder();
for (int i = 0, l = s.Length; i < l; i++)
{
int c = s[i];
if (65 <= c && c <= 90) c -= 39;
else if (97 <= c && c <= 122) c -= 97;
else c = -1;
long[] d = new long[7];
Buffer.BlockCopy(f, (++c * sizeof(long) * 7), d, 0, 7 * sizeof(long));
for (int j = 0; j < 7; j++)
{
StringBuilder b = new StringBuilder();
long v = d[j];
while (v > 0)
{
b.Append(z[(int)(v & 3)]);
v >>= 2;
}
char[] charArray = b.ToString().ToCharArray();
Array.Reverse(charArray);
o[j].Append(new string(charArray));
}
}
for (int i = 0; i < 7; i++)
{
for (int j = 0; j < 7 - i; j++)
System.Console.Write(' ');
System.Console.WriteLine(o[i]);
}
}
public static void Main(string[] args)
{
new F5(args.Length > 0 ? args[0] : "C sharp");
}
}
}</syntaxhighlight>
Output:
<pre> _/_/_/ _/
_/ _/_/_/ _/_/_/ _/_/_/ _/ _/_/ _/_/_/
_/ _/_/ _/ _/ _/ _/ _/_/ _/ _/
_/ _/_/ _/ _/ _/ _/ _/ _/ _/
_/_/_/ _/_/_/ _/ _/ _/_/_/ _/ _/_/_/
_/
_/</pre>
=={{header|C++}}==
<
#include <windows.h>
#include <iostream>
Line 486 ⟶ 825:
}
//--------------------------------------------------------------------------------------------------
</syntaxhighlight>
{{out}}
<pre>
______ ______
Line 504 ⟶ 843:
</pre>
Another solution:
<
// @author Martin Ettl (http://www.martinettl.de)
// @date 2013-07-26
Line 528 ⟶ 867:
return 0;
}
</syntaxhighlight>
{{out}}
<pre>
/$$$$$$ /$$$$$$$ /$$$$$$$
Line 544 ⟶ 883:
=={{header|Clojure}}==
{{libheader|clj-figlet}}
<
(println
(render-to-string
(load-flf "ftp://ftp.figlet.org/pub/figlet/fonts/contributed/larry3d.flf")
"Clojure"))</
{{out}}
Line 562 ⟶ 901:
\/___/
</pre>
=={{header|COBOL}}==
This displays 'COBOL' in 3D with a shadow effect. The font is 'Slant Relief' from [http://http://patorjk.com/software/taag/ here].
{{works with|OpenCOBOL}}
<
PROGRAM-ID. cobol-3d.
Line 644 ⟶ 982:
GOBACK
.</
<pre>
_______'''_/'''\\\\\\\\\_______'''_/'''\\\\\_______'''_/'''\\\\\\\\\\\\\_________'''_/'''\\\\\_______'''_/'''\\\_____________
____'''_/'''\\\'''////////'''______'''_/'''\\\'''///'''\\\____'''_\/'''\\\'''/////////'''\\\_____'''_/'''\\\'''///'''\\\____'''_\/'''\\\_____________
Line 656 ⟶ 995:
___'''_\////'''\\\\\\\\\____'''_\///'''\\\\\/_____'''_\/'''\\\\\\\\\\\\\'''/'''_____'''_\///'''\\\\\'''/'''_____'''_\/'''\\\\\\\\\\\\\\\_
______'''_\/////////'''_______'''_\/////'''_______'''_\/////////////'''_________'''_\/////'''_______'''_\///////////////'''__
Press enter to stop appreciating COBOL in 3D.</pre>
=={{header|Common Lisp}}==
{{libheader|cl-ppcre}}
<syntaxhighlight lang="lisp">
(ql:quickload :cl-ppcre)
(defvar txt
"
xxxx xxxx x x x x xxxx x x x x xxxx xxxxx
x x x x xx xx xx xx x x xx x x x x x x
x x x x xx x x xx x x x x x x x x xxx x x
x x x x x x x x x x x x x x xxx xxxxx
x x x x x x x x x x x xx x x x x x
xxxx xxxx x x x x xxxx x x xxxxx x xxxx x
"
)
(princ (cl-ppcre:regex-replace-all " " (cl-ppcre:regex-replace-all "x" txt "_/") " " ))
</syntaxhighlight>
{{out}}
<pre>
_/_/_/_/ _/_/_/_/ _/ _/ _/ _/ _/_/_/_/ _/ _/ _/ _/ _/_/_/_/ _/_/_/_/_/
_/ _/ _/ _/ _/_/ _/_/ _/_/ _/_/ _/ _/ _/_/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/_/ _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/_/ _/ _/
_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/_/ _/_/_/_/_/
_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/
_/_/_/_/ _/_/_/_/ _/ _/ _/ _/ _/_/_/_/ _/ _/ _/_/_/_/_/ _/ _/_/_/_/ _/
</pre>
=={{header|ContextFree}}==
<syntaxhighlight lang="contextfree">
startshape START
shape START {
loop i = 6 [y -1 x -1 z 10] NAME [b 1-((i+1)*0.11)]
}
shape NAME {
C [ x 34 z 1]
O [ x 46 z 2]
N [ x 64 z 3]
T [ x 85 z 4]
E [ x 95 z 5]
X [ x 106 z 6]
T [ x 125 z 7]
HYPHEN[x 135]
F [ x 145 z 8]
R [ x 158 z 9]
E [ x 175 z 10]
E [ x 188 z 11]
}
shape C {
ARCL [ y 12 flip 90 ]
ARCL [ y 12 r 180 ]
}
shape E {
LINE [ s 0.9 ]
LINE [ s 0.9 -1 y 24 ]
LINE [ s 0.4 r -90 y 0 ]
LINE [ s 0.4 r -90 y 12 ]
LINE [ s 0.4 r -90 y 24 ]
}
shape F {
LINE [ s 0.9 -1 y 24 ]
LINE [ s 0.4 r -90 y 12 ]
LINE [ s 0.4 r -90 y 24 ]
}
shape M {
LINE [ y 24 r 180 ]
LINE [ y 24 r -160 s 0.75 ]
LINE [ y 24 x 12 r 160 s 0.75 ]
LINE [ y 24 x 12 r 180 ]
}
shape N {
LINE [ y 24 r 180 ]
LINE [ y 24 r -160 ]
LINE [ y 24 x 9 r 180 ]
}
shape O {
ARCL [ y 12 flip 90]
ARCL [ y 12 r 180 ]
ARCL [ y 12 x 14 r 180 flip 90]
ARCL [ y 12 x 14 ]
}
shape R {
LINE [ s 0.9 -1 y 24 ]
LINE [ s 0.4 r -90 y 12 ]
LINE [ s 0.4 r -90 y 24 ]
LINE [ y 12 r -140 s 0.65 ]
ARCL [ y 18 x 12 r 180 flip 90 s 0.8 0.5]
ARCL [ y 18 x 12 s 0.8 0.5 ]
}
shape T {
LINE [ s 0.9 -1 y 24 ]
LINE [ s 0.4 r -90 y 24 ]
LINE [ s 0.4 r 90 y 24 ]
}
shape X {
LINE [ x 8 y 24 r 160 ]
LINE [ y 24 r -160 ]
}
shape HYPHEN{
SQUARE[y 11.5 s 4 0.5]
}
shape LINE {
TRIANGLE [[ s 1 30 y 0.26 ]]
}
shape ARCL {
SQUARE [ ]
ARCL [ size 0.97 y 0.55 r 1.5 ]
}
</syntaxhighlight>
{{out}}
[https://www.contextfreeart.org/gallery/view.php?id=4205 Output Image]
=={{header|D}}==
This generates a single image ASCII stereogram.
<
// by Jan Hubicka and Thomas Marsh
// (GNU General Public License)
Line 718 ⟶ 1,191:
writeln();
}
}</
{{out}}
<pre>nguageDLangunguageDLangunguageDLangunguageDLangung
Line 732 ⟶ 1,205:
geDLanguageDgeDLanuageDgeDLanuageeDgeDLanuageeDgeD
guageDLanguaguageDLanguaguageDLanguaguageDLanguagu</pre>
=={{header|Dart}}==
<syntaxhighlight lang="dart">
void main(){
print("""
XXX XX XXX XXXX
X X X X X X X
X X XXXX XXX X
XXX X X X X X
""".replaceAll('X','_/'));
}
</syntaxhighlight>
{{out}}
<pre>
_/_/_/ _/_/ _/_/_/ _/_/_/_/
_/ _/ _/ _/ _/ _/ _/
_/ _/ _/_/_/_/ _/_/_/ _/
_/_/_/ _/ _/ _/ _/ _/
</pre>
=={{header|Delphi}}==
{{libheader| System.SysUtils}}
{{Trans|Java}}
<syntaxhighlight lang="delphi">
program Write_language_name_in_3D_ASCII;
{$APPTYPE CONSOLE}
uses
System.SysUtils;
const
z: TArray<char> = [' ', ' ', '_', '/'];
f: TArray<TArray<Cardinal>> = [[87381, 87381, 87381, 87381, 87381, 87381,
87381], [349525, 375733, 742837, 742837, 375733, 349525, 349525], [742741,
768853, 742837, 742837, 768853, 349525, 349525], [349525, 375733, 742741,
742741, 375733, 349525, 349525], [349621, 375733, 742837, 742837, 375733,
349525, 349525], [349525, 375637, 768949, 742741, 375733, 349525, 349525], [351157,
374101, 768949, 374101, 374101, 349525, 349525], [349525, 375733, 742837,
742837, 375733, 349621, 351157], [742741, 768853, 742837, 742837, 742837,
349525, 349525], [181, 85, 181, 181, 181, 85, 85], [1461, 1365, 1461, 1461,
1461, 1461, 2901], [742741, 744277, 767317, 744277, 742837, 349525, 349525],
[181, 181, 181, 181, 181, 85, 85], [1431655765, 3149249365, 3042661813,
3042661813, 3042661813, 1431655765, 1431655765], [349525, 768853, 742837,
742837, 742837, 349525, 349525], [349525, 375637, 742837, 742837, 375637,
349525, 349525], [349525, 768853, 742837, 742837, 768853, 742741, 742741], [349525,
375733, 742837, 742837, 375733, 349621, 349621], [349525, 744373, 767317,
742741, 742741, 349525, 349525], [349525, 375733, 767317, 351157, 768853,
349525, 349525], [374101, 768949, 374101, 374101, 351157, 349525, 349525], [349525,
742837, 742837, 742837, 375733, 349525, 349525], [5592405, 11883957,
11883957, 5987157, 5616981, 5592405, 5592405], [366503875925, 778827027893,
778827027893, 392374737749, 368114513237, 366503875925, 366503875925], [349525,
742837, 375637, 742837, 742837, 349525, 349525], [349525, 742837, 742837,
742837, 375733, 349621, 375637], [349525, 768949, 351061, 374101, 768949,
349525, 349525], [375637, 742837, 768949, 742837, 742837, 349525, 349525], [768853,
742837, 768853, 742837, 768853, 349525, 349525], [375733, 742741, 742741,
742741, 375733, 349525, 349525], [192213, 185709, 185709, 185709, 192213,
87381, 87381], [1817525, 1791317, 1817429, 1791317, 1817525, 1398101,
1398101], [768949, 742741, 768853, 742741, 742741, 349525, 349525], [375733,
742741, 744373, 742837, 375733, 349525, 349525], [742837, 742837, 768949,
742837, 742837, 349525, 349525], [48053, 23381, 23381, 23381, 48053, 21845,
21845], [349621, 349621, 349621, 742837, 375637, 349525, 349525], [742837,
744277, 767317, 744277, 742837, 349525, 349525], [742741, 742741, 742741,
742741, 768949, 349525, 349525], [11883957, 12278709, 11908533, 11883957,
11883957, 5592405, 5592405], [11883957, 12277173, 11908533, 11885493,
11883957, 5592405, 5592405], [375637, 742837, 742837, 742837, 375637, 349525,
349525], [768853, 742837, 768853, 742741, 742741, 349525, 349525], [6010197,
11885397, 11909973, 11885397, 6010293, 5592405, 5592405], [768853, 742837,
768853, 742837, 742837, 349525, 349525], [375733, 742741, 375637, 349621,
768853, 349525, 349525], [12303285, 5616981, 5616981, 5616981, 5616981,
5592405, 5592405], [742837, 742837, 742837, 742837, 375637, 349525, 349525],
[11883957, 11883957, 11883957, 5987157, 5616981, 5592405, 5592405], [3042268597,
3042268597, 3042661813, 1532713813, 1437971797, 1431655765, 1431655765], [11883957,
5987157, 5616981, 5987157, 11883957, 5592405, 5592405], [11883957, 5987157,
5616981, 5616981, 5616981, 5592405, 5592405], [12303285, 5593941, 5616981,
5985621, 12303285, 5592405, 5592405]];
function ReverseString(s: string): string;
var
i, len: integer;
begin
len := s.Length;
SetLength(Result, len);
for i := 1 to len do
Result[len - i + 1] := s[i];
end;
procedure F5(s: ansistring);
begin
var o: TArray<TStringBuilder>;
SetLength(o, 7);
for var i := 0 to High(o) do
o[i] := TStringBuilder.Create;
var l := length(s);
for var i := 1 to l do
begin
var c: Integer := ord(s[i]);
if c in [65..90] then
c := c - 39
else if c in [97..122] then
c := c - 97
else
c := -1;
inc(c);
var d: TArray<Cardinal> := f[c];
for var j := 0 to 6 do
begin
var b := TStringBuilder.Create;
var v := d[j];
while v > 0 do
begin
b.Append(z[Trunc(v and 3)]);
v := v shr 2;
end;
o[j].Append(ReverseString(b.ToString));
b.Free;
end;
end;
for var i := 0 to 6 do
begin
for var j := 0 to 6 - i do
write(' ');
writeln(o[i].ToString);
end;
for var i := 0 to High(o) do
o[i].Free;
end;
begin
F5('Delphi');
F5('Thanks Java');
F5('guy');
readln;
end.</syntaxhighlight>
{{out}}
<pre> _/_/_/ _/ _/ _/
_/ _/ _/_/ _/ _/_/_/ _/_/_/
_/ _/ _/_/_/_/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/ _/ _/ _/
_/_/_/ _/_/_/ _/ _/_/_/ _/ _/ _/
_/
_/
_/_/_/_/_/ _/ _/ _/
_/ _/_/_/ _/_/_/ _/_/_/ _/ _/ _/_/_/ _/ _/_/_/ _/ _/ _/_/_/
_/ _/ _/ _/ _/ _/ _/ _/_/ _/_/ _/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/_/_/ _/ _/ _/ _/ _/_/_/ _/_/ _/_/_/ _/ _/_/_/
_/_/_/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/
_/_/_/ _/_/_/ _/_/_/
_/ _/
_/_/ _/_/</pre>
=={{header|Elixir}}==
<syntaxhighlight lang="elixir">defmodule ASCII3D do
def decode(str) do
Regex.scan(~r/(\d+)(\D+)/, str)
|> Enum.map_join(fn[_,n,s] -> String.duplicate(s, String.to_integer(n)) end)
|> String.replace("B", "\\") # Backslash
end
end
data = "1 12_4 2_1\n1/B2 9_1B2 1/2B 3 2_18 2_1\nB2 B8_1/ 3 B2 1/B_B4 2_6 2_2 1/B_B6 4_1
3 B7_3 4 B2/_2 1/2B_1_2 1/B_B B2/_4 1/ 3_1B\n 2 B2 6_1B3 3 B2 1/B2 B1/_/B_B3/ 2 1/2B 1 /B B2_1/
2 3 B5_1/4 6 B3 1B/_/2 /1_2 6 B1\n3 3 B10_6 B3 3 /2B_1_6 B1
4 2 B11_2B 1B_B2 B1_B 3 /1B/_/B_B2 B B_B1\n6 1B/11_1/3 B/_/2 3 B/_/"
IO.puts ASCII3D.decode(data)</syntaxhighlight>
{{out}}
<pre>
____________ __
/\ _________\ /\ \ __ __
\ \ \________/ \ \ \ /\_\ __ __ /\_\ ____
\ \ \_______ \ \ \ \/_/_ /\_\__ /\_\ \/_/_ / ___\
\ \ ______\ \ \ \ /\ \ \/_/\_\/ / / /\ \ /\ \__/
\ \ \_____/ \ \ \ \ \ \ \/_/ / /_ \ \ \ \ \ \
\ \ \__________ \ \ \ \ \ \ / / /\_\__ \ \ \ \ \ \
\ \___________\ \ \_\ \ \_\ / / /\/_/\_\ \ \_\ \ \_\
\/___________/ \/_/ \/_/ \/_/ \/_/ \/_/ \/_/
</pre>
=={{header|Erlang}}==
<
-module(three_d).
-export([main/0]).
main() ->
io:format(" _____ _ \n| ___| | | \n| |__ _ __| | __ _ _ __ __ _ \n| __| '__| |/ _` | '_ \\ /
</syntaxhighlight>
{{out}}
<pre>
_____ _
| ___| | |
| |__ _ __| | __ _ _ __ __ _
| __| '__| |/ _` | '_ \ /
| |__| | | | (_| | | | | (_| |
|____/_| |_|\__,_|_| |
__/ |
|___/
</pre>
'''3D ASCII:'''
{{trans|Elixir}}
<syntaxhighlight lang="erlang">-module(ascii3d).
-export([decode/1]).
decode(Str) ->
Splited = re:split(Str, "(\\d+)(\\D+)", [{return,list},group,trim]),
Fun = fun([_,N,S]) -> {Num,_} = string:to_integer(N), lists:duplicate(Num, S) end,
Joined = string:join(lists:flatmap(Fun, Splited), ""),
Lines = binary:replace(binary:list_to_bin(Joined), <<"B">>, <<"\\">>, [global]),
io:format("~s~n", [Lines]).</syntaxhighlight>
{{out}}
<pre>
1> c("ascii3d.erl").
{ok,ascii3d}
2> Str = "1 11_10 2_1\n1/B2 8_1B8 1/B B\n2B 1B7_1/7 3 B1\n3 B7_6 3_3B 3 6_2 2_2 4_4 6_1\n2 2B 1 6_1B4 1/ 3_3B 1 / 4_1 B/B B/ 2_1 B2 1/ 4_1 B\n2 3 B5_1/3 1/B B2_1/B2 B1/B B2_1/3B 1 /_2/B B2_1/B B\n3 3 B8_3B 1 5 B1_B/ 8 B1_B/ B\n4 2 B10_1B B_B3 2B B_3_1/2B_B 2B B_3_1/B B\n6 1B/10_1/B/_/4 1B/_/B/3_2/B/_1/2 1B/_/B/3_1/2B 1B\n55 3_1B/2 1)\n54 1/B5_1/\n54 1B/4_1/\n".
"1 11_10 2_1\n1/B2 8_1B8 1/B B\n2B 1B7_1/7 3 B1\n3 B7_6 3_3B 3 6_2 2_2 4_4 6_1\n2 2B 1 6_1B4 1/ 3_3B 1 / 4_1 B/B B/ 2_1 B2 1/ 4_1 B\n2 3 B5_1/3 1/B B2_1/B2 B1/B B2_1/3B 1 /_2/B B2_1/B B\n3 3 B8_3B 1 5 B1_B/ 8 B1_B/ B\n4 2 B10_1B B_B3 2B B_3_1/2B_B 2B B_3_1/B B\n6 1B/10_1/B/_/4 1B/_/B/3_2/B/_1/2 1B/_/B/3_1/2B 1B\n55 3_1B/2 1)\n54 1/B5_1/\n54 1B/4_1/\n"
3> ascii3d:decode(Str).
___________ __
/\ ________\ /\ \
\ \ \_______/ \ \ \
\ \ \_______ ___\ \ \ ______ __ ____ ______
\ \ ______\ / ___\ \ \ / ____ \/\ \/ __ \ / ____ \
\ \ \_____/ /\ \__/\ \ \/\ \__/\ \ \ /_/\ \/\ \__/\ \
\ \ \________\ \ \ \ \ \ \ \_\/ \ \ \ \ \ \ \ \_\/ \
\ \__________\ \_\ \ \_\ \____/\_\ \_\ \ \_\ \____/\ \
\/__________/\/_/ \/_/\/___/\/_/\/_/ \/_/\/___/\ \ \
___\/ )
/\_____/
\/____/
ok
</pre>
=={{header|ERRE}}==
<syntaxhighlight lang="erre">PROGRAM 3D_NAME
DIM TBL$[17,1]
BEGIN
FOR I=0 TO 17 DO
READ(TBL$[I,0],TBL$[I,1])
END FOR
PRINT(CHR$(12);) ! CLS
FOR I=0 TO 17 DO
PRINT(TBL$[I,1];TBL$[I,0];TBL$[I,0];TBL$[I,1])
END FOR
DATA("_________________ ","_____________ ")
DATA("|\ \ ","|\ \ ")
DATA("|\\_______________\ ","|\\___________\ ")
DATA("|\\| \ ","|\\| | ")
DATA("|\\| ________ | ","|\\| ________| ")
DATA("|\\| | |\| | ","|\\| | ")
DATA("|\\| |______|\| | ","|\\| |____ ")
DATA("|\\| | \| | ","|\\| | \ ")
DATA("|\\| |________| | ","|\\| |_____\ ")
DATA("|\\| | ","|\\| | ")
DATA("|\\| ___ ____/ ","|\\| _____| ")
DATA("|\\| | \\\ \ ","|\\| | ")
DATA("|\\| | \\\ \ ","|\\| | ")
DATA("|\\| | \\\ \ ","|\\| |______ ")
DATA("|\\| | \\\ \ ","|\\| | \ ")
DATA("|\\| | \\\ \ ","|\\| |_______\ ")
DATA(" \\| | \\\ \ "," \\| | ")
DATA(" \|___| \\\___\"," \|___________| ")
END PROGRAM
</syntaxhighlight>
{{out}}
<pre>
_____________ _________________ _________________ _____________
|\ \ |\ \ |\ \ |\ \
|\\___________\ |\\_______________\ |\\_______________\ |\\___________\
|\\| | |\\| \ |\\| \ |\\| |
|\\| ________| |\\| ________ | |\\| ________ | |\\| ________|
|\\| | |\\| | |\| | |\\| | |\| | |\\| |
|\\| |____ |\\| |______|\| | |\\| |______|\| | |\\| |____
|\\| | \ |\\| | \| | |\\| | \| | |\\| | \
|\\| |_____\ |\\| |________| | |\\| |________| | |\\| |_____\
|\\| | |\\| | |\\| | |\\| |
|\\| _____| |\\| ___ ____/ |\\| ___ ____/ |\\| _____|
|\\| | |\\| | \\\ \ |\\| | \\\ \ |\\| |
|\\| | |\\| | \\\ \ |\\| | \\\ \ |\\| |
|\\| |______ |\\| | \\\ \ |\\| | \\\ \ |\\| |______
|\\| | \ |\\| | \\\ \ |\\| | \\\ \ |\\| | \
|\\| |_______\ |\\| | \\\ \ |\\| | \\\ \ |\\| |_______\
\\| | \\| | \\\ \ \\| | \\\ \ \\| |
\|___________| \|___| \\\___\ \|___| \\\___\ \|___________|
</pre>
=={{header|F_Sharp|F#}}==
<
let maxY = picture.Length
let maxX = picture |> List.maxBy String.length |> String.length
Line 795 ⟶ 1,555:
if x = 0 then printfn ""
printf "%c" c) a2
</syntaxhighlight>
{{out}}
<pre>
Line 809 ⟶ 1,569:
\\\/ \\\/ \\\/
</pre>
=={{header|Forth}}==
=== Text strings ===
<syntaxhighlight lang="forth">\ Rossetta Code Write language name in 3D ASCII
\ Simple Method
: l1 ." /\\\\\\\\\\\\\ /\\\\ /\\\\\\\ /\\\\\\\\\\\\\ /\\\ /\\\" CR ;
: l2 ." \/\\\///////// /\\\//\\\ /\\\/////\\\ \//////\\\//// \/\\\ \/\\\" CR ;
: l3 ." \/\\\ /\\\/ \///\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\" CR ;
: l4 ." \/\\\\\\\\\ /\\\ \//\\\ \/\\\\\\\\\/ \/\\\ \/\\\\\\\\\\\\\" CR ;
: l5 ." \/\\\///// \/\\\ \/\\\ \/\\\////\\\ \/\\\ \/\\\///////\\\" CR ;
: l6 ." \/\\\ \//\\\ /\\\ \/\\\ \//\\\ \/\\\ \/\\\ \/\\\" CR ;
: l7 ." \/\\\ \///\\\ /\\\ \/\\\ \//\\\ \/\\\ \/\\\ \/\\\" CR ;
: l8 ." \/\\\ \///\\\\/ \/\\\ \//\\\ \/\\\ \/\\\ \/\\\" CR ;
: l9 ." \/// \//// \/// \/// \/// \/// \///" CR ;
: "FORTH" cr L1 L2 L3 L4 L5 L6 L7 L8 l9 ;
( test at the console )
page "forth"
</syntaxhighlight>
{{out}}
<pre>
/\\\\\\\\\\\\\ /\\\\ /\\\\\\\ /\\\\\\\\\\\\\ /\\\ /\\\
\/\\\///////// /\\\//\\\ /\\\/////\\\ \//////\\\//// \/\\\ \/\\\
\/\\\ /\\\/ \///\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\
\/\\\\\\\\\ /\\\ \//\\\ \/\\\\\\\\\/ \/\\\ \/\\\\\\\\\\\\\
\/\\\///// \/\\\ \/\\\ \/\\\////\\\ \/\\\ \/\\\///////\\\
\/\\\ \//\\\ /\\\ \/\\\ \//\\\ \/\\\ \/\\\ \/\\\
\/\\\ \///\\\ /\\\ \/\\\ \//\\\ \/\\\ \/\\\ \/\\\
\/\\\ \///\\\\/ \/\\\ \//\\\ \/\\\ \/\\\ \/\\\
\/// \//// \/// \/// \/// \/// \///
ok
</pre>
=== Bit Matrix Method ===
<syntaxhighlight lang="forth">\ Original code: "Short phrases with BIG Characters by Wil Baden 2003-02-23
\ Modified BFox for simple 3D presentation 2015-07-14
\ Forth is a very low level language but by using primitive operations
\ we create new words in the language to solve the problem.
\ This solution coverts an acsii string to big text characters
HEX
: toUpper ( char -- char ) 05F and ;
: w, ( n -- ) CSWAP , ; \ compile 'n', a 16 bit integer, into memory in the correct order
CREATE Banner-Matrix
0000 w, 0000 w, 0000 w, 0000 w, 2020 w, 2020 w, 2000 w, 2000 w,
5050 w, 5000 w, 0000 w, 0000 w, 5050 w, F850 w, F850 w, 5000 w,
2078 w, A070 w, 28F0 w, 2000 w, C0C8 w, 1020 w, 4098 w, 1800 w,
40A0 w, A040 w, A890 w, 6800 w, 3030 w, 1020 w, 0000 w, 0000 w,
2040 w, 8080 w, 8040 w, 2000 w, 2010 w, 0808 w, 0810 w, 2000 w,
20A8 w, 7020 w, 70A8 w, 2000 w, 0020 w, 2070 w, 2020 w, 0000 w,
0000 w, 0030 w, 3010 w, 2000 w, 0000 w, 0070 w, 0000 w, 0000 w,
0000 w, 0000 w, 0030 w, 3000 w, 0008 w, 1020 w, 4080 w, 0000 w,
7088 w, 98A8 w, C888 w, 7000 w, 2060 w, 2020 w, 2020 w, 7000 w,
7088 w, 0830 w, 4080 w, F800 w, F810 w, 2030 w, 0888 w, 7000 w,
1030 w, 5090 w, F810 w, 1000 w, F880 w, F008 w, 0888 w, 7000 w,
3840 w, 80F0 w, 8888 w, 7000 w, F808 w, 1020 w, 4040 w, 4000 ,
7088 w, 8870 w, 8888 w, 7000 w, 7088 w, 8878 w, 0810 w, E000 w,
0060 w, 6000 w, 6060 w, 0000 w, 0060 w, 6000 w, 6060 w, 4000 w,
1020 w, 4080 w, 4020 w, 1000 w, 0000 w, F800 w, F800 w, 0000 w,
4020 w, 1008 w, 1020 w, 4000 w, 7088 w, 1020 w, 2000 w, 2000 w,
7088 w, A8B8 w, B080 w, 7800 w, 2050 w, 8888 w, F888 w, 8800 w,
F088 w, 88F0 w, 8888 w, F000 w, 7088 w, 8080 w, 8088 w, 7000 w,
F048 w, 4848 w, 4848 w, F000 w, F880 w, 80F0 w, 8080 w, F800 w,
F880 w, 80F0 w, 8080 w, 8000 w, 7880 w, 8080 w, 9888 w, 7800 w,
8888 w, 88F8 w, 8888 w, 8800 w, 7020 w, 2020 w, 2020 w, 7000 w,
0808 w, 0808 w, 0888 w, 7800 w, 8890 w, A0C0 w, A090 w, 8800 w,
8080 w, 8080 w, 8080 w, F800 w, 88D8 w, A8A8 w, 8888 w, 8800 w,
8888 w, C8A8 w, 9888 w, 8800 w, 7088 w, 8888 w, 8888 w, 7000 w,
F088 w, 88F0 w, 8080 w, 8000 w, 7088 w, 8888 w, A890 w, 6800 w,
F088 w, 88F0 w, A090 w, 8800 w, 7088 w, 8070 w, 0888 w, 7000 w,
F820 w, 2020 w, 2020 w, 2000 w, 8888 w, 8888 w, 8888 w, 7000 w,
8888 w, 8888 w, 8850 w, 2000 w, 8888 w, 88A8 w, A8D8 w, 8800 w,
8888 w, 5020 w, 5088 w, 8800 w, 8888 w, 5020 w, 2020 w, 2000 w,
F808 w, 1020 w, 4080 w, F800 w, 7840 w, 4040 w, 4040 w, 7800 w,
0080 w, 4020 w, 1008 w, 0000 w, F010 w, 1010 w, 1010 w, F000 w,
0000 w, 2050 w, 8800 w, 0000 w, 0000 w, 0000 w, 0000 w, 00F8 w,
: >col ( char -- ndx ) \ convert ascii char into column index in the matrix
toupper BL - 0 MAX ; \ Space char (BL) = 0. Index is clipped to 0 as minimum value
: ]banner-matrix ( row ascii -- addr ) \ convert Banner-matrix memory to a 2 dimensional matrix
>col 8 * Banner-matrix + + ;
: PLACE ( str len addr -- ) \ store a string with length at addr
2DUP 2>R 1+ SWAP MOVE 2R> C! ;
synonym len c@ \ fetch the 1st char of a counted string to return the length
: BIT? ( byte bit# -- -1 | 0) \ given a byte and bit# on stack, return true or false flag
1 swap lshift AND ;
DECIMAL
variable bannerstr 5 allot \ memory for the character string
\ Font selection characters stored as counted strings
: STARFONT S" *" bannerstr PLACE ;
: HASHFONT S" ##" bannerstr PLACE ;
: 3DFONT S" _/" bannerstr PLACE ;
: .BIGCHAR ( matrix-byte -- )
2 7 \ we use bits 7 to 2
DO
dup I bit? \ check bit I in the matrix-byte on stack
IF bannerstr count TYPE \ if BIT=TRUE
ELSE bannerstr len SPACES \ if BIT=false
THEN
-1 +LOOP \ loop backwards
DROP ; \ drop the matrix-byte
: BANNER ( str len -- )
8 0
DO CR \ str len
2dup
BOUNDS \ calc. begin & end addresses of string
DO
J I C@ ]Banner-Matrix C@ .BIGCHAR
LOOP \ str len
LOOP
2DROP ; \ drop str & len
\ test the solution in the Forth console
</syntaxhighlight>
{{out}}
<pre>
3DFONT s" FORTH" banner
_/_/_/_/_/ _/_/_/ _/_/_/_/ _/_/_/_/_/ _/ _/
_/ _/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/ _/ _/
_/_/_/_/ _/ _/ _/_/_/_/ _/ _/_/_/_/_/
_/ _/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/ _/ _/
_/ _/_/_/ _/ _/ _/ _/ _/
ok
hashfont ok
s" FORTH" BANNER
##### ### #### ##### # #
# # # # # # # #
# # # # # # # #
#### # # #### # #####
# # # # # # # #
# # # # # # # #
# ### # # # # #
ok
</pre>
=={{header|FutureBasic}}==
<syntaxhighlight lang="futurebasic">
_window = 1
begin enum 1
_asciiField
end enum
void local fn BuildWindow
CGRect r = fn CGRectMake( 0, 0, 610, 140 )
window _window, @"Rosetta Code — FutureBasic in 3D ASCII", r, NSWindowStyleMaskTitled + NSWindowStyleMaskClosable
WindowSetBackgroundColor( _window, fn ColorBlack )
CFStringRef asciiFB = @" ¬
/$$$$$$$$ / $$ /$$$$$$$ /$$ \n¬
| $$_____/ | $$ | $$__ $$ |__/ \n¬
| $$ /$$ /$$ /$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$ | $$ \\ $$ /$$$$$$ /$$$$$$$ /$$ /$$$$$$$\n¬
| $$$$$ | $$ | $$|_ $$_/ | $$ | $$ /$$__ $$ /$$__ $$| $$$$$$$ |____ $$ /$$_____/| $$ /$$_____/\n¬
| $$__/ | $$ | $$ | $$ | $$ | $$| $$ \\__/| $$$$$$$$| $$__ $$ /$$$$$$$| $$$$$$ | $$| $$ \n¬
| $$ | $$ | $$ | $$ /$$| $$ | $$| $$ | $$_____/| $$ \\ $$ /$$__ $$ \\____ $$| $$| $$ \n¬
| $$ | $$$$$$/ | $$$$/| $$$$$$/| $$ | $$$$$$$| $$$$$$$/| $$$$$$$ /$$$$$$$/| $$| $$$$$$$\n¬
|__/ \\______/ \\___/ \\______/ |__/ \\_______/|_______/ \\_______/|_______/ |__/ \\_______/\n"
r = fn CGRectMake( 22, 20, 582, 100 )
textfield _asciiField, YES, asciiFB, r, _window
TextFieldSetTextColor( _asciiField, fn ColorYellow )
TextFieldSetBordered( _asciiField, NO )
TextFieldSetBackgroundColor( _asciiField, fn ColorBlack )
ControlSetFontWithName( _asciiField, @"Menlo", 9.0 )
end fn
void local fn DoDialog( ev as long, tag as long, wnd as long )
select ( ev )
case _windowWillClose : end
end select
end fn
on dialog fn DoDialog
fn BuildWindow
HandleEvents
</syntaxhighlight>
{{output}}
[[File:FutureBasic in ASCII Art.png]]
Line 815 ⟶ 1,789:
For the interest component of the task, I thought about rendering the result from an input string and realized that it wasn't completely trivial as the glyphs of the Lean font overlap with the standard letter spacing. Rendering different fonts would add interest because now there would be a point in developing a common font representation and rendering function. Block and Lean would have sufficed, but I looked further and found the Keyboard and Small Keyboard fonts. These I found somewhat amusing, for the final component of the task.
<
import (
Line 907 ⟶ 1,881:
fmt.Println(render("Go", lean))
fmt.Println(render("Go", smallKeyboard))
}</
{{out}}
<pre>
Line 923 ⟶ 1,897:
=={{header|Groovy}}==
A simple way to display ASCII art
<
_|_|_|
_| _| _|_| _|_| _|_| _| _| _| _|
Line 930 ⟶ 1,904:
_|_|_| _| _|_| _|_| _| _|_|_|
_|
_|_|"""</
A more complicated example:
<
def request = "http://www.network-science.de/ascii/ascii.php?TEXT=${delegate}&x=23&y=10&FONT=block&RICH=no&FORM=left&STRE=no&WIDT=80"
def html = new URL(request).text
Line 938 ⟶ 1,912:
}
println "Groovy".asAsciiArt</
{{out}}
<pre> _|_|_|
_| _| _|_| _|_| _|_| _| _| _| _|
Line 950 ⟶ 1,924:
=={{header|Haskell}}==
A simple printing of the ASCII art
<
{-
__ __ __ ___ ___
Line 971 ⟶ 1,945:
main = putStrLn ascii3d
</syntaxhighlight>
{{out}}
<pre> __ __ __ ___ ___
/\ \/\ \ /\ \ /\_ \ /\_ \
\ \ \_\ \ __ ____\ \ \/'\ __\//\ \ \//\ \
Line 984 ⟶ 1,959:
=={{header|Icon}} and {{header|Unicon}}==
The following fits under the fuzzy definition of 3D ASCII and pays homage to one of the Icon Newsletter logos.
<
write(ExpandText(
if !arglist == "icon" then
Line 1,017 ⟶ 1,992:
s ? until pos(0) do
writes(repl(" ",tab(many(&digits)))|tab(upto(&digits)|0))
end</
<pre> /\
\/
/\
Line 1,052 ⟶ 2,028:
=={{header|J}}==
<
view 5#.^:_1]21-~a.i.'j*ez`C3\toy.G)' NB. Due to Oleg Kobchenko
________________________
Line 1,074 ⟶ 2,050:
\| | | |
\_____|_____|_____|
</syntaxhighlight>
For the VRML script, see [http://nsg.upor.net/jpage/jpage.htm Andrew Nikitin's J page] (search for VRML) and for the origin of the 3D J banner, see [http://www.jsoftware.com/pipermail/programming/2007-May/006539.html Oleg Kobchenko's post to the J Forums].
Line 1,080 ⟶ 2,056:
Here's a slimmer version:
<
Line 1,116 ⟶ 2,092:
\| |
\_____|
</syntaxhighlight>
Explanation: the argument says where to place the solid "blocks". Each block is described by three integers, describing position along the x, y and z axis. In other words, 1 0 0 is one position to the right of 0 0 0, while 0 1 0 is one place down and 0 0 1 is one place towards the observer. (Thus the space at the top of the "slimmer" version could have been eliminated by subtracting 2 from the middle column of integers being passed to 'view'.)
Line 1,126 ⟶ 2,102:
=={{header|Java}}==
This was written ages ago as an exercise in obfuscation, and improved here with upper case letters. The font is "lean" from [http://en.wikipedia.org/wiki/Figlet figlet].
It's not really that obfuscated. The characters in <var>z</var> are used to draw the letters. The array <var>f</var> contains one element per letter of the alphabet. Each array element is another array of 7 longs because each output letter is made of 7 lines of text. Each long value represents a sequence of 2-bit integers that are extracted by bit-twiddling and used to find the right character in <var>z</var>.
<syntaxhighlight lang="java">public class F5{
char[]z={' ',' ','_','/',};
long[][]f={
Line 1,204 ⟶ 2,182:
System.out.print(' ');
System.out.println(o[i]);}}}
</syntaxhighlight>
{{out}} With no parameters
<pre>
_/
Line 1,229 ⟶ 2,206:
</pre>
=={{header|jq}}==
{{works with|jq}}
'''Works with gojq, the Go implementation of jq'''
One small point of interest here is the use of string interpolation to simulate a "heredoc" string.
<syntaxhighlight lang="jq">def jq:
"\("
#
#
# # ###
# # # #
# # # #
# # # # ####
# ### #
#
")";
def banner3D:
jq | split("\n") | map( gsub("#"; "╔╗") | gsub(" "; " ") )
| [[range(length;0;-1) | " " * .], . ] | transpose[] | join("") ;
banner3D</syntaxhighlight>
{{out}}
<pre>
╔╗
╔╗
╔╗ ╔╗ ╔╗╔╗╔╗
╔╗ ╔╗ ╔╗ ╔╗
╔╗ ╔╗ ╔╗ ╔╗
╔╗ ╔╗ ╔╗ ╔╗ ╔╗╔╗╔╗╔╗
╔╗ ╔╗╔╗╔╗ ╔╗
╔╗
</pre>
=={{header|Julia}}==
{{trans|Awk}}
<syntaxhighlight lang="julia">println(replace(raw"""
xxxxx
x x
x x x
x x x x
x x x x x xxx
x x x x x x x
x x x x x x x xx
xx xx x x x x xx
""", "x" => "_/"))
</syntaxhighlight>{{output}}<pre>
_/_/_/_/_/
_/ _/
_/ _/ _/
_/ _/ _/ _/
_/ _/ _/ _/ _/ _/_/_/
_/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/ _/ _/_/
_/_/ _/_/ _/ _/ _/ _/ _/_/
</pre>
=={{header|Kotlin}}==
{{trans|Java}}
<syntaxhighlight lang="scala">// version 1.1
class Ascii3D(s: String) {
val z = charArrayOf(' ', ' ', '_', '/')
val f = arrayOf(
longArrayOf(87381, 87381, 87381, 87381, 87381, 87381, 87381),
longArrayOf(349525, 375733, 742837, 742837, 375733, 349525, 349525),
longArrayOf(742741, 768853, 742837, 742837, 768853, 349525, 349525),
longArrayOf(349525, 375733, 742741, 742741, 375733, 349525, 349525),
longArrayOf(349621, 375733, 742837, 742837, 375733, 349525, 349525),
longArrayOf(349525, 375637, 768949, 742741, 375733, 349525, 349525),
longArrayOf(351157, 374101, 768949, 374101, 374101, 349525, 349525),
longArrayOf(349525, 375733, 742837, 742837, 375733, 349621, 351157),
longArrayOf(742741, 768853, 742837, 742837, 742837, 349525, 349525),
longArrayOf(181, 85, 181, 181, 181, 85, 85),
longArrayOf(1461, 1365, 1461, 1461, 1461, 1461, 2901),
longArrayOf(742741, 744277, 767317, 744277, 742837, 349525, 349525),
longArrayOf(181, 181, 181, 181, 181, 85, 85),
longArrayOf(1431655765, 3149249365L, 3042661813L, 3042661813L, 3042661813L, 1431655765, 1431655765),
longArrayOf(349525, 768853, 742837, 742837, 742837, 349525, 349525),
longArrayOf(349525, 375637, 742837, 742837, 375637, 349525, 349525),
longArrayOf(349525, 768853, 742837, 742837, 768853, 742741, 742741),
longArrayOf(349525, 375733, 742837, 742837, 375733, 349621, 349621),
longArrayOf(349525, 744373, 767317, 742741, 742741, 349525, 349525),
longArrayOf(349525, 375733, 767317, 351157, 768853, 349525, 349525),
longArrayOf(374101, 768949, 374101, 374101, 351157, 349525, 349525),
longArrayOf(349525, 742837, 742837, 742837, 375733, 349525, 349525),
longArrayOf(5592405, 11883957, 11883957, 5987157, 5616981, 5592405, 5592405),
longArrayOf(366503875925L, 778827027893L, 778827027893L, 392374737749L, 368114513237L, 366503875925L, 366503875925L),
longArrayOf(349525, 742837, 375637, 742837, 742837, 349525, 349525),
longArrayOf(349525, 742837, 742837, 742837, 375733, 349621, 375637),
longArrayOf(349525, 768949, 351061, 374101, 768949, 349525, 349525),
longArrayOf(375637, 742837, 768949, 742837, 742837, 349525, 349525),
longArrayOf(768853, 742837, 768853, 742837, 768853, 349525, 349525),
longArrayOf(375733, 742741, 742741, 742741, 375733, 349525, 349525),
longArrayOf(192213, 185709, 185709, 185709, 192213, 87381, 87381),
longArrayOf(1817525, 1791317, 1817429, 1791317, 1817525, 1398101, 1398101),
longArrayOf(768949, 742741, 768853, 742741, 742741, 349525, 349525),
longArrayOf(375733, 742741, 744373, 742837, 375733, 349525, 349525),
longArrayOf(742837, 742837, 768949, 742837, 742837, 349525, 349525),
longArrayOf(48053, 23381, 23381, 23381, 48053, 21845, 21845),
longArrayOf(349621, 349621, 349621, 742837, 375637, 349525, 349525),
longArrayOf(742837, 744277, 767317, 744277, 742837, 349525, 349525),
longArrayOf(742741, 742741, 742741, 742741, 768949, 349525, 349525),
longArrayOf(11883957, 12278709, 11908533, 11883957, 11883957, 5592405, 5592405),
longArrayOf(11883957, 12277173, 11908533, 11885493, 11883957, 5592405, 5592405),
longArrayOf(375637, 742837, 742837, 742837, 375637, 349525, 349525),
longArrayOf(768853, 742837, 768853, 742741, 742741, 349525, 349525),
longArrayOf(6010197, 11885397, 11909973, 11885397, 6010293, 5592405, 5592405),
longArrayOf(768853, 742837, 768853, 742837, 742837, 349525, 349525),
longArrayOf(375733, 742741, 375637, 349621, 768853, 349525, 349525),
longArrayOf(12303285, 5616981, 5616981, 5616981, 5616981, 5592405, 5592405),
longArrayOf(742837, 742837, 742837, 742837, 375637, 349525, 349525),
longArrayOf(11883957, 11883957, 11883957, 5987157, 5616981, 5592405, 5592405),
longArrayOf(3042268597L, 3042268597L, 3042661813L, 1532713813, 1437971797, 1431655765, 1431655765),
longArrayOf(11883957, 5987157, 5616981, 5987157, 11883957, 5592405, 5592405),
longArrayOf(11883957, 5987157, 5616981, 5616981, 5616981, 5592405, 5592405),
longArrayOf(12303285, 5593941, 5616981, 5985621, 12303285, 5592405, 5592405)
)
init {
val o = Array(7) { StringBuilder() }
for (i in 0 until s.length) {
var c = s[i].toInt()
if (c in 65..90) {
c -= 39
} else if (c in 97..122) {
c -= 97
} else {
c = -1
}
val d = f[++c]
for (j in 0 until 7) {
val b = StringBuilder()
var v = d[j]
while (v > 0) {
b.append(z[(v and 3).toInt()])
v = v shr 2
}
o[j].append(b.reverse().toString())
}
}
for (i in 0 until 7) {
for (j in 0 until 7 - i) print(' ')
println(o[i])
}
}
}
fun main(args: Array<String>) {
Ascii3D("KOTLIN")
Ascii3D("with thanks")
Ascii3D("to the author")
Ascii3D("of the")
Ascii3D("Java entry")
}</syntaxhighlight>
{{out}}
<pre>
_/ _/ _/_/ _/_/_/_/_/ _/ _/_/_/ _/ _/
_/ _/ _/ _/ _/ _/ _/ _/_/ _/
_/_/ _/ _/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/ _/ _/ _/_/
_/ _/ _/_/ _/ _/_/_/_/ _/_/_/ _/ _/
_/ _/ _/ _/ _/ _/
_/ _/ _/ _/_/_/_/ _/_/_/ _/_/_/_/ _/_/_/ _/_/_/ _/_/_/ _/ _/ _/_/_/
_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/ _/_/
_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/
_/ _/ _/ _/_/ _/ _/ _/_/ _/ _/ _/_/_/ _/ _/ _/ _/ _/_/_/
_/ _/ _/ _/ _/
_/_/_/_/ _/_/ _/_/_/_/ _/_/_/ _/_/ _/_/_/ _/ _/ _/_/_/_/ _/_/_/ _/_/ _/ _/_/
_/ _/ _/ _/ _/ _/ _/_/_/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/
_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/
_/_/ _/_/ _/_/ _/ _/ _/_/_/ _/_/_/ _/_/_/ _/_/ _/ _/ _/_/ _/
_/_/ _/ _/
_/_/ _/ _/_/_/_/ _/_/_/ _/_/
_/ _/ _/_/_/_/ _/ _/ _/ _/_/_/_/
_/ _/ _/ _/ _/ _/ _/
_/_/ _/ _/_/ _/ _/ _/_/_/
_/ _/
_/ _/_/_/ _/ _/ _/_/_/ _/_/ _/_/_/ _/_/_/_/ _/ _/_/ _/ _/
_/ _/ _/ _/ _/ _/ _/ _/_/_/_/ _/ _/ _/ _/_/ _/ _/
_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/
_/_/ _/_/_/ _/ _/_/_/ _/_/_/ _/ _/ _/_/ _/ _/_/_/
_/
_/_/
</pre>
=={{header|Lasso}}==
<
---------------------------------------------------------------
| ,--, |
Line 1,250 ⟶ 2,423:
")
stdoutnl(#lasso)</
<pre>---------------------------------------------------------------
| ,--, |
Line 1,268 ⟶ 2,441:
----------------------------------------------------------------
</pre>
=={{header|Lua}}==
<syntaxhighlight lang="lua">io.write(" /$$\n")
io.write("| $$\n")
io.write("| $$ /$$ /$$ /$$$$$$\n")
io.write("| $$ | $$ | $$ |____ $$\n")
io.write("| $$ | $$ | $$ /$$$$$$$\n")
io.write("| $$ | $$ | $$ /$$__ $$\n")
io.write("| $$$$$$$$| $$$$$$/| $$$$$$$\n")
io.write("|________/ \______/ \_______/\n")</syntaxhighlight>
{{out}}
<pre> /$$
| $$
| $$ /$$ /$$ /$$$$$$
| $$ | $$ | $$ |____ $$
| $$ | $$ | $$ /$$$$$$$
| $$ | $$ | $$ /$$__ $$
| $$$$$$$$| $$$$$$/| $$$$$$$
|________/ ______/ _______/</pre>
Alternate:
<syntaxhighlight lang="lua">print[[
__
/\ \
\ \ \ __ __ ____
\ \ \ /\ \/\ \ / __ \
\ \ \___\ \ \_\ \/\ \_\ \_
\ \____\\ \____/\ \___/\_\
\/____/ \/___/ \/__/\/_/]]</syntaxhighlight>
{{out}}
<pre> __
/\ \
\ \ \ __ __ ____
\ \ \ /\ \/\ \ / __ \
\ \ \___\ \ \_\ \/\ \_\ \_
\ \____\\ \____/\ \___/\_\
\/____/ \/___/ \/__/\/_/</pre>
=={{header|Mathematica}}/{{header|Wolfram Language}}==
No hardcoding at all!
<syntaxhighlight lang="mathematica">locs = Position[
ImageData[Binarize[Rasterize["Mathematica", ImageSize -> 150]]], 0];
Print[StringRiffle[
StringJoin /@
ReplacePart[
ReplacePart[
ConstantArray[
" ", {Max[locs[[All, 1]]] + 1, Max[locs[[All, 2]]] + 1}],
locs -> "\\"], Map[# + 1 &, locs, {2}] -> "#"], "\n"]];</syntaxhighlight>
{{output}}
<pre>
\\\ \\
\### \##
\\\\ \\\\ \ ### \ ##
#### \\#### \# \## \#
\## \#### \\\\\\ \\\#\\\\\ \##\\\\ \\\\\\ \\\\\\ \\\\ \\\\\\\ \\\#\\\\ \\\\ \\\\\ \ \\\\\\
\\### \\#\## \\###### ######### \##\#### \\###### ######\#### \\####### ######## #### \\#####\# \\######
\##\# \##\## ## \# \# \#### ## \\## ## \### ### ## ## \# \# \# \\## ### ## \#
\##\##\# \## \## \# \## \# \## \## \## \# \# \## \# \# \## \## \##
\## ##\# \## \\\\\\## \# \## \# \## ## \## \# \# \\\\\\\## \# \# \## ## \\\\\\##
\## \#\# \## \\####### \# \## \# \#\\\\\\\\# \## \# \# \\######## \# \# \\# \\#######
\## \### \## \\## \## \# \## \# \########## \## \# \# \\## \## \# \# ## \\## \##
\# ## \## \## \## \# \## \# \# \## \# \# \## \## \# \# \# \ \## \##
\# \## ## \\\## \# \\ \## \# #\ \\\ \## \# \# ## \\\## \# \\ \# ## \\\# ## \\\##
\\#\\ \\\##\ #\\\####\ ##\\\\## \\## \\\#\ ##\\\\\###\\## \# \#\ #\\\\####\ ##\\\## \\\\\\#\\\ ##\\\### #\\\####\
##### ###### #### #### ###### #### ##### ####### #### ## ### ##### #### ##### ########## ##### #### ####</pre>
=={{header|MiniScript}}==
Nothing fancy here, but in keeping with MiniScript's "clear and simple" ethos:
<syntaxhighlight lang="miniscript">data = [
" ______ _____ _________",
"|\ \/ \ ___ ________ ___|\ _____\ ________ ________ ___ ________ _________ ",
"\ \ _ \ _ \|\ \|\ ___ \|\ \ \ \____||\ ____\|\ ____\|\ \|\ __ \|\___ ___\ ",
" \ \ \\\__\ \ \ \ \ \ \\ \ \ \ \ \_____ \ \ \___|\ \ \___|\ \ \ \ \|\ \|___ \ \_| ",
" \ \ \\|__| \ \ \ \ \ \\ \ \ \ \|____|\ \ \ \ \ \ \ \ \ \ \ ____\ \ \ \ ",
" \ \ \ \ \ \ \ \ \ \\ \ \ \ \____\_\ \ \ \____\ \ \ \ \ \ \ \___| \ \ \ ",
" \ \__\ \ \__\ \__\ \__\\ \__\ \__\_________\ \_______\ \__\ \ \__\ \__\ \ \__\",
" \|__| \|__|\|__|\|__| \|__|\|__||________|\|_______|\|__| \|__|\|__| \|__|"]
for line in data
print line
end for</syntaxhighlight>
{{out}}
<pre> ______ _____ _________
|\ \/ \ ___ ________ ___|\ _____\ ________ ________ ___ ________ _________
\ \ _ \ _ \|\ \|\ ___ \|\ \ \ \____||\ ____\|\ ____\|\ \|\ __ \|\___ ___\
\ \ \\\__\ \ \ \ \ \ \\ \ \ \ \ \_____ \ \ \___|\ \ \___|\ \ \ \ \|\ \|___ \ \_|
\ \ \\|__| \ \ \ \ \ \\ \ \ \ \|____|\ \ \ \ \ \ \ \ \ \ \ ____\ \ \ \
\ \ \ \ \ \ \ \ \ \\ \ \ \ \____\_\ \ \ \____\ \ \ \ \ \ \ \___| \ \ \
\ \__\ \ \__\ \__\ \__\\ \__\ \__\_________\ \_______\ \__\ \ \__\ \__\ \ \__\
\|__| \|__|\|__|\|__| \|__|\|__||________|\|_______|\|__| \|__|\|__| \|__|</pre>
=={{header|Modula-2}}==
<syntaxhighlight lang="modula2">MODULE Art;
FROM Terminal IMPORT WriteString,WriteLn,ReadChar;
BEGIN
(* 3D, but does not fit in the terminal window *)
(*
WriteString("_____ ______ ________ ________ ___ ___ ___ ________ _______");
WriteLn;
WriteString("|\ _ \ _ \|\ __ \|\ ___ \|\ \|\ \|\ \ |\ __ \ / ___ \");
WriteLn;
WriteString("\ \ \\\__\ \ \ \ \|\ \ \ \_|\ \ \ \\\ \ \ \ \ \ \|\ \ ____________ /__/|_/ /|");
WriteLn;
WriteString(" \ \ \\|__| \ \ \ \\\ \ \ \ \\ \ \ \\\ \ \ \ \ \ __ \|\____________\__|// / /");
WriteLn;
WriteString(" \ \ \ \ \ \ \ \\\ \ \ \_\\ \ \ \\\ \ \ \____\ \ \ \ \|____________| / /_/__");
WriteLn;
WriteString(" \ \__\ \ \__\ \_______\ \_______\ \_______\ \_______\ \__\ \__\ |\________\");
WriteLn;
WriteString(" \|__| \|__|\|_______|\|_______|\|_______|\|_______|\|__|\|__| \|_______|");
WriteLn;
*)
(* Not 3D, but fits in the terminal window *)
WriteString(" __ __ _ _ ___");
WriteLn;
WriteString(" | \/ | | | | | |__ \");
WriteLn;
WriteString(" | \ / | ___ __| |_ _| | __ _ ______ ) |");
WriteLn;
WriteString(" | |\/| |/ _ \ / _` | | | | |/ _` |______/ /");
WriteLn;
WriteString(" | | | | (_) | (_| | |_| | | (_| | / /_");
WriteLn;
WriteString(" |_| |_|\___/ \__,_|\__,_|_|\__,_| |____|");
WriteLn;
ReadChar
END Art.
</syntaxhighlight>
=={{header|Nanoquery}}==
<syntaxhighlight lang="nanoquery">println " ________ ________ ________ ________ ________ ___ ___ _______ ________ ___ ___ "
println "|\\ ___ \\|\\ __ \\|\\ ___ \\|\\ __ \\|\\ __ \\|\\ \\|\\ \\|\\ ___ \\ |\\ __ \\ |\\ \\ / /| "
println "\\ \\ \\\\ \\ \\ \\ \\|\\ \\ \\ \\\\ \\ \\ \\ \\|\\ \\ \\ \\|\\ \\ \\ \\\\\\ \\ \\ __/|\\ \\ \\|\\ \\ \\ \\ \\/ / / "
println " \\ \\ \\\\ \\ \\ \\ __ \\ \\ \\\\ \\ \\ \\ \\\\\\ \\ \\ \\\\\\ \\ \\ \\\\\\ \\ \\ \\_|/_\\ \\ _ _\\ \\ \\ / / "
println " \\ \\ \\\\ \\ \\ \\ \\ \\ \\ \\ \\\\ \\ \\ \\ \\\\\\ \\ \\ \\\\\\ \\ \\ \\\\\\ \\ \\ \\_|\\ \\ \\ \\\\ \\| \\/ / / "
println " \\ \\__\\\\ \\__\\ \\__\\ \\__\\ \\__\\\\ \\__\\ \\_______\\ \\_____ \\ \\_______\\ \\_______\\ \\__\\\\ _\\ __/ / / "
println " \\|__| \\|__|\\|__|\\|__|\\|__| \\|__|\\|_______|\\|___| \\__\\|_______|\\|_______|\\|__|\\|__|\\___/ / "
println " \\|__| \\|___|/ "</syntaxhighlight>
{{out}}
<pre> ________ ________ ________ ________ ________ ___ ___ _______ ________ ___ ___
|\ ___ \|\ __ \|\ ___ \|\ __ \|\ __ \|\ \|\ \|\ ___ \ |\ __ \ |\ \ / /|
\ \ \\ \ \ \ \|\ \ \ \\ \ \ \ \|\ \ \ \|\ \ \ \\\ \ \ __/|\ \ \|\ \ \ \ \/ / /
\ \ \\ \ \ \ __ \ \ \\ \ \ \ \\\ \ \ \\\ \ \ \\\ \ \ \_|/_\ \ _ _\ \ \ / /
\ \ \\ \ \ \ \ \ \ \ \\ \ \ \ \\\ \ \ \\\ \ \ \\\ \ \ \_|\ \ \ \\ \| \/ / /
\ \__\\ \__\ \__\ \__\ \__\\ \__\ \_______\ \_____ \ \_______\ \_______\ \__\\ _\ __/ / /
\|__| \|__|\|__|\|__|\|__| \|__|\|_______|\|___| \__\|_______|\|_______|\|__|\|__|\___/ /
\|__| \|___|/</pre>
=={{header|NetRexx}}==
Based on an idea found in the [[#Scala|Scala]] version.
<
options replace format comments java crossref symbols nobinary
Line 1,336 ⟶ 2,663:
method isFalse public constant binary returns boolean
return \isTrue()
</syntaxhighlight>
{{out}}
<pre>
///\ ///\ ///////////////\
Line 1,355 ⟶ 2,682:
</pre>
=={{header|
{{trans|Python}}
<
const
"""
let lines = nim.dedent.multiReplace(("#", "<<<"), (" ", " "), ("< ", "<>"), ("<\n", "<>\n")).splitLines
for i, line in lines:
echo spaces(lines.len - i), line</syntaxhighlight>
{{out}}
<pre> <<< <<< <<<<<<<<<<<<<<< <<< <<<
<<<<<< <<< <<< <<<<<< <<<<<<
<<< <<< <<< <<< <<< <<<<<< <<<
<<< <<< <<< <<< <<< <<<
<<< <<<<<< <<< <<< <<<
<<< <<< <<<<<<<<<<<<<<< <<< <<<</pre>
=={{header|OCaml}}==
<syntaxhighlight lang="ocaml">
print_string "
_|_|_| _|_|_| _|_| _|_| _|_| _|
</syntaxhighlight>
{{out}}
<pre>
_|_|_| _|_|_| _|_| _|_| _|_| _|
_| _| _| _| _| _| _| _| _| _|
_| _| _| _|_|_| _| _| _| _| _|
_| _| _| _| _| _| _| _|
_|_|_| _|_|_| _| _| _| _| _|_|_|_|_|
</pre>
=={{header|Pascal}}==
<syntaxhighlight lang="pascal">
program WritePascal;
const
i64: int64 = 1055120232691680095; (* This defines "Pascal" *)
cc: array[-1..15] of string = (* Here are all string-constants *)
('_______v---',
'__', '\_', '___', '\__',
' ', ' ', ' ', ' ',
'/ ', ' ', '_/ ', '\/ ',
' _', '__', ' _', ' _');
var
x, y: integer;
begin
for y := 0 to 7 do
begin
Write(StringOfChar(cc[(not y and 1) shl 2][1], 23 - y and 6));
Write(cc[((i64 shr (y div 2)) and 1) shl 3 + (not y and 1) shl 2 + 2]);
for x := 0 to 15 do
Write(cc[((i64 shr ((x and 15) * 4 + y div 2)) and 1) +
((i64 shr (((x + 1) and 15) * 4 + y div 2)) and 1) shl 3 +
(x mod 3) and 2 + (not y and 1) shl 2]);
writeln(cc[1 + (not y and 1) shl 2] + cc[(not y and 1) shl 3 - 1]);
end;
end.
</syntaxhighlight>
Need 64-Bit Integer for this solution.
My goal was to do a straight-forward solution, (Just two nested loops, no conditional code).
All characters in one place.
{{out}}
<pre>
_____ _
________________________/ \______________________________/ \________v---
_ _ ___ ___ _ ___ _
______________________/ \_/ \__/ \__/ \__/ \____/ \__/ \________v---
___ _ _ _ _ _ _ _
____________________/ \__/ \_/ \__/ \__/ \____/ \_/ \__/ \________v---
_ ___ ___ ___ ___ _
__________________/ \______/ \/ \____/ \__/ \__/ \________v---
</pre>
=={{header|Perl}}==
<
use strict;
use warnings;
Line 1,389 ⟶ 2,780:
) {
print $tuple->[0] x $tuple->[1];
}</
{{out}}
<pre> _ \ |
Line 1,396 ⟶ 2,787:
_| \___|_| _|</pre>
Font taken from http://www.network-science.de/ascii/.
=={{header|Phix}}==
<!--<syntaxhighlight lang="phix">(phixonline)-->
<span style="color: #008080;">constant</span> <span style="color: #000000;">s</span> <span style="color: #0000FF;">=</span> <span style="color: #008000;">"""
------*** *
-----* * *
----* * * *
---*** *
--* *** * * *
-* * * * *
* * * * * *
"""</span>
<span style="color: #7060A8;">puts</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #7060A8;">substitute_all</span><span style="color: #0000FF;">(</span><span style="color: #000000;">s</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"* "</span><span style="color: #0000FF;">,{</span><span style="color: #008000;">"_/"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">" "</span><span style="color: #0000FF;">}))</span>
<!--</syntaxhighlight>-->
{{out}}
<pre>
------_/_/_/ _/
-----_/ _/ _/
----_/ _/ _/ _/
---_/_/_/ _/
--_/ _/_/_/ _/ _/ _/
-_/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/
</pre>
===obfuscated===
For those of you who like this sort of thing, same output
<!--<syntaxhighlight lang="phix">(phixonline)-->
<span style="color: #008080;">constant</span> <span style="color: #000000;">q</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">{</span><span style="color: #000000;">0(30)10C</span><span style="color: #0000FF;">,</span><span style="color: #000000;">0(31)176</span><span style="color: #0000FF;">,</span><span style="color: #000000;">0(32)2A4</span><span style="color: #0000FF;">,</span><span style="color: #000000;">0(33)6N3</span><span style="color: #0000FF;">,</span><span style="color: #000000;">0(34)7GP</span><span style="color: #0000FF;">,</span><span style="color: #000000;">0(35)DWF</span><span style="color: #0000FF;">,</span><span style="color: #000000;">0(36)QC4</span><span style="color: #0000FF;">}</span>
<span style="color: #7060A8;">puts</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #7060A8;">substitute_all</span><span style="color: #0000FF;">(</span><span style="color: #7060A8;">sprintf</span><span style="color: #0000FF;">(</span><span style="color: #7060A8;">join</span><span style="color: #0000FF;">(</span><span style="color: #7060A8;">repeat</span><span style="color: #0000FF;">(</span><span style="color: #008000;">"%16b"</span><span style="color: #0000FF;">,</span><span style="color: #000000;">7</span><span style="color: #0000FF;">),</span><span style="color: #008000;">"\n"</span><span style="color: #0000FF;">),</span><span style="color: #000000;">q</span><span style="color: #0000FF;">),</span><span style="color: #008000;">" 10"</span><span style="color: #0000FF;">,{</span><span style="color: #008000;">"-"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"_/"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">" "</span><span style="color: #0000FF;">})&</span><span style="color: #008000;">"\n"</span><span style="color: #0000FF;">)</span>
<!--</syntaxhighlight>-->
===another version===
Inspired by Ruby
<!--<syntaxhighlight lang="phix">(phixonline)-->
<span style="color: #7060A8;">puts</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"""
__ ________
/_/\ / ______ \
\ \ \/ /\____/ /\ __
\ \ \/ / / / //_/\
\ \ \/___/ / / \_\/_ __
/\ \______/ / /_/\/ /\
/ /\ ____ \ \ \ \ \/ /
/ / /\ \ \ \ \ \ \_\ /
/ / / \ \ \ \ \ \ / / \
/_/ / \ \ \ \ \ \ /_/ /\ \
\_\/ \_\/ \_\/ \_\/\_\/
"""</span><span style="color: #0000FF;">)</span>
<span style="color: #000080;font-style:italic;">-- or if you prefer something a little more cryptic (same output):</span>
<span style="color: #7060A8;">puts</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #008000;">" __ ________\n /_/\\ / ______ \\\n \\ \\ \\/ /\\____/ /\\ __\n "</span><span style="color: #0000FF;">&</span>
<span style="color: #008000;">"\\ \\ \\/ / / / //_/\\\n \\ \\ \\/___/ / / \\_\\/_ __\n /\\ \\__"</span><span style="color: #0000FF;">&</span>
<span style="color: #008000;">"____/ / /_/\\/ /\\\n / /\\ ____ \\ \\ \\ \\ \\/ /\n / / /\\ \\ "</span><span style="color: #0000FF;">&</span>
<span style="color: #008000;">"\\ \\ \\ \\ \\_\\ /\n / / / \\ \\ \\ \\ \\ \\ / / \\\n/_/ / \\"</span><span style="color: #0000FF;">&</span>
<span style="color: #008000;">" \\ \\ \\ \\ \\ /_/ /\\ \\\n\\_\\/ \\_\\/ \\_\\/ \\_\\/\\_\\/\n"</span><span style="color: #0000FF;">)</span>
<!--</syntaxhighlight>-->
=={{header|PicoLisp}}==
{{Trans|Tcl}}
<
"***** * "
"* * * * * "
Line 1,433 ⟶ 2,877:
(maplist '((X) (transform X "/" "\\")) (cdr Lst)) )
(bye)</
{{out}}
Line 1,446 ⟶ 2,890:
///\/ ///\/ ////////////\ ////////////\/ ////////////\ ///\/ ////////////\/ ///\/
\\\/ \\\/ \\\\\\\\\\\\/ \\\\\\\\\\\\/ \\\\\\\\\\\\/ \\\/ \\\\\\\\\\\\/ \\\/
</pre>
=={{header|Plain English}}==
<syntaxhighlight lang="text">
To run:
Start up.
Print the language name in 3D ASCII.
Wait for the escape key.
Shut down.
To print the language name in 3D ASCII:
Write "Osmosian Order of" to the console.
Write " ____ _ _" to the console.
Write "/___ \ /_/| /_/|" to the console.
Write "| \ \| || ____ |_|/ _____" to the console.
Write "| |\ \|| || /___/| _ /____/\" to the console.
Write "| | | || || / ||/_/|| \ \" to the console.
Write "| |/ / | ||/ /| ||| ||| |\ \/" to the console.
Write "| __/ | ||| | | ||| ||| | | ||" to the console.
Write "| || | ||\ \| ||| ||| | | ||" to the console.
Write "|_|/ |_|/ \____|/|_|/|_| |_|/" to the console.
Write " ______ _ _ _" to the console.
Write "/_____/| /_/|/_/| /_/|" to the console.
Write "| ___|/ _____ ____ | |||_|/ _______| ||__" to the console.
Write "| ||___ /____/\ /___/|| || _ /______/| /__/\" to the console.
Write "| |/__/|| \ \ / ||| ||/_/|/ ___|/| \ \" to the console.
Write "| ___|/| |\ \// /| ||| ||| ||| |___/\| |\ \/" to the console.
Write "| ||___ | | | ||| | | ||| ||| ||\____ \|| | | ||" to the console.
Write "| |/__/|| | | ||\ \| ||| ||| ||____| || | | ||" to the console.
Write "|_____|/|_| |_|/ \__ |||_|/|_|/|_____/ |_| |_|/" to the console.
Write " ___| ||" to the console.
Write " /___/ //" to the console.
Write " |____//" to the console.
Write "Programmers" to the console.
</syntaxhighlight>
{{out}}
<pre>
Osmosian Order of
____ _ _
/___ \ /_/| /_/|
| \ \| || ____ |_|/ _____
| |\ \|| || /___/| _ /____/\
| | | || || / ||/_/|| \ \
| |/ / | ||/ /| ||| ||| |\ \/
| __/ | ||| | | ||| ||| | | ||
| || | ||\ \| ||| ||| | | ||
|_|/ |_|/ \____|/|_|/|_| |_|/
______ _ _ _
/_____/| /_/|/_/| /_/|
| ___|/ _____ ____ | |||_|/ _______| ||__
| ||___ /____/\ /___/|| || _ /______/| /__/\
| |/__/|| \ \ / ||| ||/_/|/ ___|/| \ \
| ___|/| |\ \// /| ||| ||| ||| |___/\| |\ \/
| ||___ | | | ||| | | ||| ||| ||\____ \|| | | ||
| |/__/|| | | ||\ \| ||| ||| ||____| || | | ||
|_____|/|_| |_|/ \__ |||_|/|_|/|_____/ |_| |_|/
___| ||
/___/ //
|____//
Programmers
</pre>
=={{header|PureBasic}}==
<syntaxhighlight lang="purebasic">If OpenConsole()
PrintN(" ////\ ////\ ////| ")
PrintN(" //// \ __ //// \ __ |XX|_/ ")
PrintN(" //// /| | ////\ ////\//// |//// /| | //// | ////\ ////\ ")
PrintN("|XX| |X| ////\X| ////\// //// /||XX| |X| |//// /|| //// _| ////\ //// \ ")
PrintN("|XX| |X||XX| |X||XX| |/ |XX| |X||XX| |/ /|XX| |X||//// / |XX| | //// /\ |")
PrintN("|XX| |/ |XX| |X||XX| /|XX| |//|XX| \|XX|/// |XX| |/\ |XX| ||XX| |XX\|")
PrintN("|XX| /|XX| |X||XX| / |XX| //|XX| /| |//// |XX| ||XX| ||XX| | ")
PrintN("|$$| / |$$| |&||$$| | |$$| |&||$$| |&| |$$| /||\\\\/| ||$$| ||$$| |///|")
PrintN("|%%| | |%%| |i||%%| | |%%| |/ |%%| |i| |%%| |i|| |%%| ||%%| ||%%| |// |")
PrintN("|ii| | |ii| |/ |ii| | |ii| /|ii| |/ /|ii| \/|/ |ii| /|ii| ||ii| |/ / ")
PrintN("|::| | \\\\ /|::| | |::| / |::| / |::| / //// / |::| | \\\\ / ")
PrintN("|..| | \\\\/ |..|/ \\\\/ |..| / \\\\/ \\\\ / |..|/ \\\\/ ")
PrintN(" \\\\| \\\\/ ")
Print(#CRLF$ + #CRLF$ + "Press ENTER to exit"): Input()
CloseConsole()
EndIf</syntaxhighlight>
Sample output:
<pre> ////\ ////\ ////|
//// \ __ //// \ __ |XX|_/
//// /| | ////\ ////\//// |//// /| | //// | ////\ ////\
|XX| |X| ////\X| ////\// //// /||XX| |X| |//// /|| //// _| ////\ //// \
|XX| |X||XX| |X||XX| |/ |XX| |X||XX| |/ /|XX| |X||//// / |XX| | //// /\ |
|XX| |/ |XX| |X||XX| /|XX| |//|XX| \|XX|/// |XX| |/\ |XX| ||XX| |XX\|
|XX| /|XX| |X||XX| / |XX| //|XX| /| |//// |XX| ||XX| ||XX| |
|$$| / |$$| |&||$$| | |$$| |&||$$| |&| |$$| /||\\\\/| ||$$| ||$$| |///|
|%%| | |%%| |i||%%| | |%%| |/ |%%| |i| |%%| |i|| |%%| ||%%| ||%%| |// |
|ii| | |ii| |/ |ii| | |ii| /|ii| |/ /|ii| \/|/ |ii| /|ii| ||ii| |/ /
|::| | \\\\ /|::| | |::| / |::| / |::| / //// / |::| | \\\\ /
|..| | \\\\/ |..|/ \\\\/ |..| / \\\\/ \\\\ / |..|/ \\\\/
\\\\| \\\\/
</pre>
=={{header|Python}}==
<
####
#
#
#
lines = py.replace('#', '<<<').replace(' ','X') \
.replace('X', ' ').replace('\n', ' Y') \
.replace('< ', '<>').split('Y')
for i, l in enumerate(lines):
print(
{{out}}
<pre style="overflow-x: auto; white-space: pre;"> <<<<<<<<<<<<> <<<> <<<> <<<<<<<<<<<<<<<> <<<> <<<> <<<<<<<<<> <<<> <<<>
<<<>
<<<>
<b>Implementation 2:</b>
<syntaxhighlight lang="python">charWidth = 10
charHeight = 8
# char table is split into sets to prevent very long lines...
charSet1 = [
" ###### /####### ###### /###### /######## /######## ###### /## /##",
" /##__ ##| ##__ ## /##__ ##| ##__ ## | ##_____/| ##_____/ /##__ ##| ## | ##",
"| ## | ##| ## | ##| ## \__/| ## \ ##| ## | ## | ## \__/| ## | ##",
"| ########| ####### | ## | ## | ##| ########| ########| ## #####| ########",
"| ##__ ##| ##__ ##| ## | ## | ##| ##_____/| ##_____/| ##|_ ##| ##__ ##",
"| ## | ##| ## | ##| ## /##| ## /##/| ## | ## | ## | ##| ## | ##",
"| ## | ##| #######/| ######/| ######/ | ########| ## | ######/| ## | ##",
"|__/ |__/|_______/ \______/ |______/ |________/|__/ \______/ |__/ |__/",
]
charSet2 = [
" /######## /## /## /## /## /### ### /## /## ###### /####### ",
"|__ ##__/ | ##| ## /##/| ## | ########| ### | ## /##__ ##| ##__ ##",
" | ## | ##| ## /##/ | ## | ## ## ##| ####| ##| ## | ##| ## | ##",
" | ## | ##| #####/ | ## | ## ## ##| ## ## ##| ## | ##| #######/",
" | ## | ##| ## ## | ## | ## ## ##| ## ####| ## | ##| ##____/ ",
" | ## /## | ##| ##\ ## | ## | ##__/ ##| ##\ ###| ## | ##| ## ",
" /########\ ######/| ## \ ##| ########| ## | ##| ## \ ##| ######/| ## ",
"|________/ \______/ |__/ \__/|________/|__/ |__/|__/ \__/ \______/ |__/ ",
]
charSet3 = [
" ###### /####### ###### /######## /## /## /## /## /## /## /## /##",
" /##__ ##| ##__ ## /##__ ##|__ ##__/| ## | ##| ## | ##| ## | ##\ ## /##/",
"| ## | ##| ## | ##| ## \__/ | ## | ## | ##| ## | ##| ## ## ## \ ####/ ",
"| ## | ##| #######/ \ ###### | ## | ## | ##| ## | ##| ## ## ## \ ##/ ",
"| ## ## ##| ## ## \___ ## | ## | ## | ##| ## ##/| ## ## ## / #### ",
"| ##\ ###/| ##\ ## /## \ ## | ## | ## | ## \ ####/ | ######## / ## ## ",
"| #### ##| ## \ ##\ ######/ | ## | ######/ \ ##/ | ###| ###/ ## \ ##",
" \____\__/|__/ \__/ \______/ |__/ \______/ \__/ |___/|___/\__/ \__/",
]
charSet4 = [
" /## /## /######## ###### ",
"\ ## /##/|____ ##/ /##__ ## ",
" \ ####/ / ##/ | ## | ## ",
" \ ##/ / ##/ |__//####/ ",
" | ## / ##/ | ##_/ ",
" | ## / ##/ |__/ ",
" | ## / ######## /## ",
" |__/ \________/ |__/ ",
]
# ...then the sets are combined back by barbequing them together!
charTable = [(charSet1[i] +
charSet2[i] +
charSet3[i] +
charSet4[i]) for i in range(charHeight)]
if __name__ == '__main__':
text = input("Enter the text to convert:\n")
if not text:
text = "PYTHON"
for i in range(charHeight):
lineOut = ""
for chr in text:
# get value of character 'chr' in alphabet
if chr.isalpha():
val = ord(chr.upper()) - 65
elif chr == " ":
val= 27
else:
val = 26
beginStr = val * charWidth # begin string position of 3D letter
endStr = (val + 1) * charWidth # end string position of 3D letter
lineOut += charTable[i][beginStr:endStr]
print(lineOut)</syntaxhighlight>
{{out}}
<pre> /####### /## /## /######## /## /## ###### /## /##
| ##__ ##\ ## /##/|__ ##__/| ## | ## /##__ ##| ### | ##
| ## | ## \ ####/ | ## | ## | ##| ## | ##| ####| ##
| #######/ \ ##/ | ## | ########| ## | ##| ## ## ##
| ##____/ | ## | ## | ##__ ##| ## | ##| ## ####
| ## | ## | ## | ## | ##| ## | ##| ##\ ###
| ## | ## | ## | ## | ##| ######/| ## \ ##
|__/ |__/ |__/ |__/ |__/ \______/ |__/ \__/</pre>
<b>Implementation 3:</b> a more general solution that scrapes http://www.network-science.de/ascii for the ASCII art.
<syntaxhighlight lang="python">import requests
import html
text = "Python"
font = "larry3d"
url = f"http://www.network-science.de/ascii/ascii.php?TEXT={text}&FONT={font}&RICH=no&FORM=left&WIDT=1000"
r = requests.get(url)
r.raise_for_status()
ascii_text = html.unescape(r.text)
pre_ascii = "<TD><PRE>"
post_ascii = "\n</PRE>"
ascii_text = ascii_text[ascii_text.index(pre_ascii) + len(pre_ascii):]
ascii_text = ascii_text[:ascii_text.index(post_ascii)]
print(ascii_text)</syntaxhighlight>
{{out}}
<pre> ____ __ __
/\ _`\ /\ \__ /\ \
\ \ \L\ \ __ __\ \ ,_\\ \ \___ ___ ___
\ \ ,__//\ \/\ \\ \ \/ \ \ _ `\ / __`\ /' _ `\
\ \ \/ \ \ \_\ \\ \ \_ \ \ \ \ \ /\ \L\ \/\ \/\ \
\ \_\ \/`____ \\ \__\ \ \_\ \_\\ \____/\ \_\ \_\
\/_/ `/___/> \\/__/ \/_/\/_/ \/___/ \/_/\/_/
/\___/
\/__/</pre>
=={{header|Quackery}}==
<syntaxhighlight lang="quackery">say " ________ ___ ___ ________ ________ ___ __ _______ ________ ___ ___" cr
say "|\ __ \|\ \|\ \|\ __ \|\ ____\|\ \|\ \ |\ ___ \ |\ __ \|\ \ / /|" cr
say "\ \ \|\ \ \ \ \ \ \ \|\ \ \ \___|\ \ \/ /|\ \ __/|\ \ \|\ \ \ \/ / /" cr
say " \ \ \ \ \ \ \ \ \ \ __ \ \ \ \ \ ___ \ \ \_|/ \ \ _ _\ \ / /" cr
say " \ \ \_\ \ \ \_\ \ \ \ \ \ \ \____\ \ \\ \ \ \ \__\_\ \ \\ \ / / /" cr
say " \ \_____ \ \_______\ \__\ \__\ \_______\ \__\\ \__\ \_______\ \__\\ _\ / /" cr
say " \|___| \ \|_______|\|__|\|__|\|_______|\|__| \|__|\|_______|\|__|\|__| / /" cr
say " \ \ \_______________________________________________________/ / /" cr
say " \ \____________________________________________________________/ /" cr
say " \|____________________________________________________________|/" cr</syntaxhighlight>
{{out}}
<pre> ________ ___ ___ ________ ________ ___ __ _______ ________ ___ ___
|\ __ \|\ \|\ \|\ __ \|\ ____\|\ \|\ \ |\ ___ \ |\ __ \|\ \ / /|
\ \ \|\ \ \ \ \ \ \ \|\ \ \ \___|\ \ \/ /|\ \ __/|\ \ \|\ \ \ \/ / /
\ \ \ \ \ \ \ \ \ \ __ \ \ \ \ \ ___ \ \ \_|/ \ \ _ _\ \ / /
\ \ \_\ \ \ \_\ \ \ \ \ \ \ \____\ \ \\ \ \ \ \__\_\ \ \\ \ / / /
\ \_____ \ \_______\ \__\ \__\ \_______\ \__\\ \__\ \_______\ \__\\ _\ / /
\|___| \ \|_______|\|__|\|__|\|_______|\|__| \|__|\|_______|\|__|\|__| / /
\ \ \_______________________________________________________/ / /
\ \____________________________________________________________/ /
\|____________________________________________________________|/
</pre>
=={{header|Racket}}==
Line 1,477 ⟶ 3,156:
Use the GUI to create a text banner:
<
#lang racket/gui
Line 1,520 ⟶ 3,199:
(for ([line (dropf-right (dropf lines empty?) empty?)])
(displayln (string-trim line #:left? #f))))
</syntaxhighlight>
{{out}}
<pre>
/@@@@@@@ /@@
Line 1,537 ⟶ 3,216:
... ... ........ ...... ... ... ...... .....
</pre>
=={{header|Raku}}==
(formerly Perl 6)
Produces a good old-fashioned stereogram, meant to be looked at by focusing beyond the screen, not by crossing your eyes. If you can't get it to converge, try shrinking the font size till the images are closer together than your eyes. Also helps to be old enough to have progressive lenses, so you can look through the reading part of your glasses. Or borrow glasses from someone who's farsighted. <tt>:-)</tt>
<syntaxhighlight lang="raku" line># must be evenly padded with white-space$
my $text = q:to/END/;
@@@@@ @@
@ @ @ @@@
@ @ @ @@
@ @ @@@ @ @@ @ @@
@@@@@ @ @ @@ @ @ @@@@@
@ @@@@@ @ @ @@ @@
@ @ @ @ @@ @@
@ @@@ @ @@ @@@@
END
say '' for ^5;
for $text.lines -> $_ is copy {
my @chars = |「-+ ., ;: '"」.comb.pick(*) xx *;
s:g [' '] = @chars.shift;
print " $_ ";
s:g [('@'+)(.)] = @chars.shift ~ $0;
.say;
}
say '' for ^5;</syntaxhighlight>
{{out}}
<small><pre>
";,' :-+ . ,. ; -:+"',';-. : " + ";,' :-+ . ,. ; -:+"',';-. : " +
:@@@@@ ,'+".-; ;-+,@@"' :. ;. " :'@@@@@ ,'+".-; ;-+,,@@' :. ;. "
"@-. @ ';,+:- +: ,;@'". +@@@, "- " @. .@';,+:- +: ,;:@". +;@@@ "-
'@,- ;@ "+: .+ -',:" @; . @@; -" , ':@- ;'@"+: .+ -',:" .@ . +@@ -" ,
;@ +, @"-@@@' :@.@@ @-,:.@@+ ;'": ; @+, .@-'@@@ : @;@@ @,:.+@@ ;'":
@@@@@+-@':.@, @@" @;@ +":@@@@@', ;@@@@@--@:. @ .@@ :@ @+": @@@@@,
@;-+, .@@@@@ :@"'+' @"-,:@@; @@. +@-+, .,@@@@@::@'+' @-,: @@ "@@
:@ . "- @,;+'; @" .-'@ +:,@@ ;@@'+ :-@. "- ,@;+'; "@ .-' @+:, @@;:@@+
+@'"., ; @@@ -:@;' "@@-+.:@@@@, +:@"., ; "@@@-:;@' ".@@+.: @@@@
;.:+"-,' +:'; -," .+:" ;-.,' . ;.:+"-,' +:'; -," .+:" ;-.,' .
</pre></small>
=={{header|Raven}}==
<syntaxhighlight lang="raven">[
" ##### #### # # #### # #"
" # # # # # # # ## #"
Line 1,556 ⟶ 3,284:
$line r/#/@@@/g r/ /X/g r/X/ /g r/@ /@!/g r/@$/@!/g as $l1
$l1 "@" split $r1 join "!" split $r2 join print "\n" print
</syntaxhighlight>
{{out}}
<pre> ///////////////> ////////////> ///> ///> ////////////> ///> ///>
Line 1,568 ⟶ 3,296:
=={{header|REXX}}==
===block characters===
The REXX program works in '''ASCII''' or [[:wp:EBCDIC|'''EBCDIC''']].
<br><br>It's astonishing how much time I <del>wasted</del> spent on this program.
<br>Most of the time was spent on writing comments, but the code was so easy to read, so the comments were elided. <font size=
This REXX has been used as part of a test suite for some REXX interpreters to stress test their syntax parser.
<syntaxhighlight lang="rexx">/*REXX program that displays a "REXX" 3D "ASCII art" as a logo. */
signal . /* Uses left-hand shadows, slightly raised view.
0=5~2?A?2?A?
Line 1,597 ⟶ 3,327:
,13,u));_=_('=',left('',16,u));_=_('#','|\\|');_=translate(_,"|"u,'@"')
do k=0 for 16;x=d2x(k,1);_=_(x,left('',k+1));end;say ' '_;end;exit;_:return,
changestr(arg(1),_,arg(2))</
Some older REXXes don't have a '''changestr'''
{{out|output|text= when using the internal default input:}}'''output'''
<pre>
________________ _____________ ____ ____ ____ ____
|\ \ |\ \ \ \ /\ \ \ \ /\ \
Line 1,625 ⟶ 3,356:
{{Works with|ooRexx}}
{{Works with|Regina}}
<
drop !top !bot
Line 1,691 ⟶ 3,422:
isFalse:
procedure
return \isTrue()</
{{out}}
<pre> ///////////////\
Line 1,710 ⟶ 3,441:
===simpler, shorter===
This is a version of the above REXX program (with a minor bug fixed),
<br>the input text
<br>the letter '''E''' (in the input text) was shortened,
<br>the output doesn't have extraneous leading blanks,
<br>the output doesn't have trailing blanks
<br>the input text can be any consistent non-blank character except the forward slash (<big>'''/'''</big>) or backward slash (<big>'''\'''</big>).
<syntaxhighlight lang="rexx">/*REXX pgm draws a "3D" image of text representation; any character except / and \ */
end /*j*/ /*stick a fork in it, we're all done. */</
<pre>
////////////\
Line 1,737 ⟶ 3,469:
///\ ///\
\\\/ \\\/
///\ ///\ ////////////\ ///\ ///\ ///\ ///\
\\\/ \\\/ \\\\\\\\\\\\/ \\\/ \\\/ \\\/ \\\/
////////////\ ///\ ///\ ///\ ///\ ///\
\\\\\\\\\\\\/ \\\/ \\\/ \\\/ \\\/ \\\/
///\ ///\ /////////\ ///\ ///\
\\\/ \\\/ \\\\\\\\\/ \\\/ \\\/
///\ ///\ ///\ ///\ ///\ ///\ ///\
\\\/ \\\/ \\\/ \\\/ \\\/ \\\/ \\\/
///\ ///\ ////////////\ ///\ ///\ ///\ ///\
\\\/ \\\/ \\\\\\\\\\\\/ \\\/ \\\/ \\\/ \\\/
</pre>
=={{header|Ruby}}==
<
#### #
# # #
Line 1,762 ⟶ 3,494:
EOS
def
txt = text.each_line.map{|line| line.gsub('#','__/').gsub(' ',' ')}
offset = Array.new(txt.size){|i| " " * shift.abs * i}
offset.reverse! if shift < 0
end
puts
#
def
txt = text.each_line.map{|line| line.chomp + ' '}
offset =
offset.reverse! if shift < 0
txt.each_with_index do |line,i|
line2 = offset[i] + line.gsub
puts
end
end
puts
# Another display:
def banner3D_3(text)
txt = text.each_line.map(&:rstrip)
offset = [*0...txt.size].reverse
area = Hash.new(' ')
box = [%w(/ / / \\), %w(\\ \\ \\ /)]
txt.each_with_index do |line,i|
line.each_char.with_index do |c,j|
next if c==' '
x = offset[i] + 2*j
box[0].each_with_index{|c,k| area[[x+k,i ]] = c}
box[1].each_with_index{|c,k| area[[x+k,i+1]] = c}
end
end
(xmin, xmax), (ymin, ymax) = area.keys.transpose.map(&:minmax)
puts (ymin..ymax).map{|y| (xmin..xmax).map{|x| area[[x,y]]}.join}
end
banner3D_3 <<EOS
#### #
# # #
# # #
# # #
#### # # #### # #
# # # # # # # #
# # # # # # # #
# # # # # # #
# # ### #### #
#
#
EOS</syntaxhighlight>
{{out}}
Line 1,814 ⟶ 3,578:
///\
\\\/
/////////\ ///\
///\\\\\///\ ///\/
///\/ ///\/ ///\/
///\/ ///\/ ///\/
/////////\\\/ ///\ ///\ /////////\ ///\ ///\
///\///\\\/ ///\/ ///\/ ///\\\\\///\ \///\ ///\\\/
///\/\///\ ///\/ ///\/ ///\/ ///\/ \///\///\\\/
///\/ \///\ ///\/ ///\/ ///\/ ///\/ \///\\\/
///\/ \///\ \///////\/ /////////\\\/ ///\\\/
\\\/ \\\/ \\\\\\\/ \\\\\\\\\/ ///\\\/
///\\\/
\\\/
</pre>
'''Another version:''' like a 3D solid.
<syntaxhighlight lang="ruby">enc = "9 8u18 2u1\n8 1s 6u1 b16 1s sb\n6 2 s1b4u1s sb13 3 s1\n5 3 s3 3s 11 3 s1\n4 2 s1us3u1su2s 2u4 2u3 2 s1us3u4 2u6 2u1\n4 1s 6u1sbubs2 s1b 2 s1b2 1s 6u1 b2 1susb3 2 s1b\n2 2 s1b2 3u1bs2 8 s1b4u1s s4b 3 s1\n 3 s3b 2 9 s3 3s 3 b2s 1s\n 3s 3 b1 2 s2us4 s1us2u2us1 s3 3 b1s s\nsu2s 2 4 b6u2s 1s7u1sbubs6 1bub2 1s\nbubs6 1bubs2 1b5u1bs b7u1bs8 3 s1\n42 2u2s 1s\n41 1s3u1s s\n41 1b3u1bs\n"
def decode(str)
str.split(/(\d+)(\D+)/).each_slice(3).map{|_,n,s| s * n.to_i}.join.tr('sub','/_\\')
end
puts decode(enc)</syntaxhighlight>
{{out}}
<pre>
________ __
/ ______ \ / /\
/ /\____/ /\ / / /
/ / / / / / / / /
/ /_/___/_/ / __ __ / /_/___ __ __
/ ______/\_\/ / /\ / /\ / ______ \ /_/\ / /\
/ /\ ___\/ / / / / / / / /\____/ /\ \ \ \ / / /
/ / /\ \ \ / / / / / / / / / / / / \ \ \/ / /
/ / / \ \ \ / /_/_/ / / / /_/___/_/ / \ \ \/ /
/_/ / \ \ \ \______/ / /_______/\_\/ \_\ /
\_\/ \_\/ \_____\/ \_______\/ / / /
__/ / /
/___/ /
\___\/
</pre>
=={{header|Rust}}==
<syntaxhighlight lang="rust">pub fn char_from_id(id: u8) -> char {
[' ', '#', '/', '_', 'L', '|', '\n'][id as usize]
}
const ID_BITS: u8 = 3;
pub fn decode(code: &[u8]) -> String {
let mut ret = String::new();
let mut carry = 0;
let mut carry_bits = 0;
for &b in code {
let mut bit_pos = ID_BITS - carry_bits;
let mut cur = b >> bit_pos;
let mask = (1 << bit_pos) - 1;
let id = carry | (b & mask) << carry_bits;
ret.push(char_from_id(id));
while bit_pos + ID_BITS < 8 {
ret.push(char_from_id(cur & ((1 << ID_BITS) - 1)));
cur >>= ID_BITS;
bit_pos += ID_BITS;
}
carry = cur;
carry_bits = 8 - bit_pos;
}
ret
}
fn main() {
let code = [
72, 146, 36, 0, 0, 0, 0, 0, 0, 0, 128, 196, 74, 182, 41, 1, 0, 0, 0, 0, 0, 0, 160, 196, 77, 0,
52, 1, 18, 0, 9, 144, 36, 9, 146, 36, 113, 147, 36, 9, 160, 4, 80, 130, 100, 155, 160, 41, 145,
155, 108, 74, 128, 38, 64, 19, 41, 73, 2, 160, 137, 155, 0, 84, 130, 38, 64, 19, 112, 155, 18,
160, 137, 155, 0, 160, 18, 42, 73, 18, 36, 73, 2, 128, 74, 76, 1, 0, 40, 128, 219, 38, 104, 219,
4, 0, 160, 0
];
println!("{}", decode(&code));
}</syntaxhighlight>
{{out}}
<pre> ####### ##
/##___/## /##
|## |## ## ## ###### ######
|####### /## /## ##___/ /_/##/
|##__/## |## |##//##### |##
|## L/## |## |## L___/## |##
|## L/##L/###### ###### L/##
L/ L/ L____/ /____/ L/ </pre>
=={{header|Scala}}==
{{libheader|Scala}}
===Java style===
<
val name = """
Line 1,880 ⟶ 3,732:
}
println(ASCII3D)</
===Idiomatic===
Cleaner code.
<
object Ascii3D extends App {
Line 1,923 ⟶ 3,775:
println(ASCII3D)
}</
{{out}}
<pre>
Line 1,939 ⟶ 3,791:
=={{header|Seed7}}==
<
const array string: name is [] (
Line 1,980 ⟶ 3,832:
end for;
writeln(previousLine);
end func;</
{{out}}
Line 1,995 ⟶ 3,847:
\\\\\\\\\/ \\\\\\\\\/ \\\\\\\\\/ \\\\\\\\\\\\/ \\\/
</pre>
=={{header|Sidef}}==
{{trans|Ruby}}
<syntaxhighlight lang="ruby">var text = <<'EOT';
***
* * * **
* * *
* * * *** **
*** * **** * * *
* * * * ***** *
* * * * * *
* * * * * *
*** * **** *** *
EOT
func banner3D(text, shift=-1) {
var txt = text.lines.map{|line| line.gsub('*','__/').gsub(' ',' ')};
var offset = txt.len.of {|i| " " * (shift.abs * i)};
shift < 0 && offset.reverse!;
(offset »+« txt).join("\n");
};
say banner3D(text);</syntaxhighlight>
<pre>
__/__/__/
__/ __/ __/ __/__/
__/ __/ __/
__/ __/ __/ __/__/__/ __/__/
__/__/__/ __/ __/__/__/__/ __/ __/ __/
__/ __/ __/ __/ __/__/__/__/__/ __/
__/ __/ __/ __/ __/ __/
__/ __/ __/ __/ __/ __/
__/__/__/ __/ __/__/__/__/ __/__/__/ __/
</pre>
=={{header|SQL}}==
<syntaxhighlight lang="sql">select ' SSS\ ' as s, ' QQQ\ ' as q, 'L\ ' as l from dual
union all select 'S \|', 'Q Q\ ', 'L | ' from dual
union all select '\SSS ', 'Q Q |', 'L | ' from dual
union all select ' \ S\', 'Q Q Q |', 'L | ' from dual
union all select ' SSS |', '\QQQ\\|', 'LLLL\' from dual
union all select ' \__\/', ' \_Q_/ ', '\___\' from dual
union all select ' ', ' \\ ', ' ' from dual;</syntaxhighlight>
This works in Oracle. For other databases, try it without "from dual".
{{out}}
<pre>
S Q L
------ ------- -----
SSS\ QQQ\ L\
S \| Q Q\ L |
\SSS Q Q | L |
\ S\ Q Q Q | L |
SSS | \QQQ\\| LLLL\
\__\/ \_Q_/ \___\
\\
7 rows selected.</pre>
=={{header|Tcl}}==
<
proc mergeLine {upper lower} {
Line 2,032 ⟶ 3,944:
{ * *** *}
}
printLines $lines</
{{out}}
<pre>
Line 2,042 ⟶ 3,954:
///\/ /////////\ ///\/
\\\/ \\\\\\\\\/ \\\/
</pre>
=={{header|UNIX Shell}}==
{{works with|Bash|4}}
<syntaxhighlight lang="sh">#!/usr/bin/env bash
mapfile -t name <<EOF
Aimhacks
EOF
main() {
banner3d_1 "${name[@]}"
echo
banner3d_2 "${name[@]}"
echo
banner3d_3 "${name[@]}"
}
space() {
local -i n i
(( n=$1 )) || n=1
if (( n < 1 )); then n=1; fi
for ((i=0; i<n; ++i)); do
printf ' '
done
printf '\n'
}
banner3d_1() {
local txt i
mapfile -t txt < <(printf '%s\n' "$@" | sed -e 's,#,__/,g' -e 's/ / /g')
for i in "${!txt[@]}"; do
printf '%s%s\n' "$(space $(( ${#txt[@]} - i )))" "${txt[i]}"
done
}
banner3d_2() {
local txt i line line2
mapfile -t txt < <(printf '%s \n' "$@")
for i in "${!txt[@]}"; do
line=${txt[i]}
line2=$(printf '%s%s' "$(space $(( 2 * (${#txt[@]} - i) )))" "$(sed -e 's, , ,g' -e 's,#,///,g' -e 's,/ ,/\\,g' <<<"$line")")
printf '%s\n%s\n' "$line2" "$(tr '/\\' '\\/' <<<"$line2")"
done
}
banner3d_3() {
# hard-coded fancy one
cat <<'EOF'
______________ ___________ ___________ ____ ____␣
/ /\ / |\ /| \ |\ \ |\ \
/_____________/ /| /___________|| ||___________\| \___\ | \___\␣
| \ / |/ \ / | | | | | |
| ________ | | ________ | | _________| | | | | |
| | |___| | | | |____| | | |_______ | | |____| | |
| | / | | /| | / | | | | \ | | | \ | |
| |/_____| |/ | |/_____| | | |________\| | |______\| |
| / /| | | \ | |
| ______ \ / | _______ | \_________ | | ________ |
| | |___| | | | | | | _________/| | | | | | |
| | / | | | | | | | | || | | | | | |
| |/_____| | /| | | | | |_________|/ | | | \ | |
| |/ | | | | | | | | | \| |
|_____________/ |___|/ |___| |_____________/ \|___| |___|
EOF
}
main "$@"
</syntaxhighlight>
{{Out}}
<pre> __/__/__/ __/
__/ __/ __/
__/ __/ __/
__/__/__/ __/__/ __/__/__/ __/__/__/
__/ __/ __/ __/ __/ __/
__/ __/ __/__/__/__/ __/__/ __/ __/
__/ __/ __/ __/__/ __/ __/ __/
__/__/__/ __/__/ __/ __/__/__/ __/ __/
/////////\ ///\
\\\\\\\\\/ \\\/
///\ ///\ ///\
\\\/ \\\/ \\\/
///\ ///\ ///\
\\\/ \\\/ \\\/
/////////\ //////\ /////////\ /////////\
\\\\\\\\\/ \\\\\\/ \\\\\\\\\/ \\\\\\\\\/
///\ ///\ ///\ ///\ ///\ ///\
\\\/ \\\/ \\\/ \\\/ \\\/ \\\/
///\ ///\ ////////////\ //////\ ///\ ///\
\\\/ \\\/ \\\\\\\\\\\\/ \\\\\\/ \\\/ \\\/
///\ ///\ ///\ //////\ ///\ ///\ ///\
\\\/ \\\/ \\\/ \\\\\\/ \\\/ \\\/ \\\/
/////////\ //////\ ///\ /////////\ ///\ ///\
\\\\\\\\\/ \\\\\\/ \\\/ \\\\\\\\\/ \\\/ \\\/
______________ ___________ ___________ ____ ____␣
/ /\ / |\ /| \ |\ \ |\ \
/_____________/ /| /___________|| ||___________\| \___\ | \___\␣
| \ / |/ \ / | | | | | |
| ________ | | ________ | | _________| | | | | |
| | |___| | | | |____| | | |_______ | | |____| | |
| | / | | /| | / | | | | \ | | | \ | |
| |/_____| |/ | |/_____| | | |________\| | |______\| |
| / /| | | \ | |
| ______ \ / | _______ | \_________ | | ________ |
| | |___| | | | | | | _________/| | | | | | |
| | / | | | | | | | | || | | | | | |
| |/_____| | /| | | | | |_________|/ | | | \ | |
| |/ | | | | | | | | | \| |
|_____________/ |___|/ |___| |_____________/ \|___| |___|
</pre>
=={{header|Visual Basic .NET}}==
{{trans|C#}}
<syntaxhighlight lang="vbnet">Module Module1
Sub Main()
Console.WriteLine(" ___ ___ ___ ________ ___ ___ ________ ___ ________ ________ ________ ___ ________ ________ _______ _________
|\ \ / /|\ \|\ ____\|\ \|\ \|\ __ \|\ \ |\ __ \|\ __ \|\ ____\|\ \|\ ____\ |\ ___ \|\ ___ \|\___ ___\
\ \ \ / / | \ \ \ \___|\ \ \\\ \ \ \|\ \ \ \ \ \ \|\ /\ \ \|\ \ \ \___|\ \ \ \ \___| \ \ \\ \ \ \ __/\|___ \ \_|
\ \ \/ / / \ \ \ \_____ \ \ \\\ \ \ __ \ \ \ \ \ __ \ \ __ \ \_____ \ \ \ \ \ \ \ \\ \ \ \ \_|/__ \ \ \
\ \ / / \ \ \|____|\ \ \ \\\ \ \ \ \ \ \ \____ \ \ \|\ \ \ \ \ \|____|\ \ \ \ \ \____ __\ \ \\ \ \ \ \_|\ \ \ \ \
\ \__/ / \ \__\____\_\ \ \_______\ \__\ \__\ \_______\ \ \_______\ \__\ \__\____\_\ \ \__\ \_______\ |\__\ \__\\ \__\ \_______\ \ \__\
\|__|/ \|__|\_________\|_______|\|__|\|__|\|_______| \|_______|\|__|\|__|\_________\|__|\|_______| \|__|\|__| \|__|\|_______| \|__|
\|_________| \|_________|
")
End Sub
End Module</syntaxhighlight>
{{out}}
<pre> ___ ___ ___ ________ ___ ___ ________ ___ ________ ________ ________ ___ ________ ________ _______ _________
|\ \ / /|\ \|\ ____\|\ \|\ \|\ __ \|\ \ |\ __ \|\ __ \|\ ____\|\ \|\ ____\ |\ ___ \|\ ___ \|\___ ___\
\ \ \ / / | \ \ \ \___|\ \ \\\ \ \ \|\ \ \ \ \ \ \|\ /\ \ \|\ \ \ \___|\ \ \ \ \___| \ \ \\ \ \ \ __/\|___ \ \_|
\ \ \/ / / \ \ \ \_____ \ \ \\\ \ \ __ \ \ \ \ \ __ \ \ __ \ \_____ \ \ \ \ \ \ \ \\ \ \ \ \_|/__ \ \ \
\ \ / / \ \ \|____|\ \ \ \\\ \ \ \ \ \ \ \____ \ \ \|\ \ \ \ \ \|____|\ \ \ \ \ \____ __\ \ \\ \ \ \ \_|\ \ \ \ \
\ \__/ / \ \__\____\_\ \ \_______\ \__\ \__\ \_______\ \ \_______\ \__\ \__\____\_\ \ \__\ \_______\ |\__\ \__\\ \__\ \_______\ \ \__\
\|__|/ \|__|\_________\|_______|\|__|\|__|\|_______| \|_______|\|__|\|__|\_________\|__|\|_______| \|__|\|__| \|__|\|_______| \|__|
\|_________| \|_________|
</pre>
=={{header|Wren}}==
This uses the 3D ASCII letter font [https://github.com/arpan98/3dwrite/blob/master/3d_font.txt here].
<syntaxhighlight lang="wren">var w = """
____ ____ ____
|\ \ |\ \ |\ \
| \ \ | \ \ | \ \
\ \ \\ / \\ / /|
\ \ \V \V / |
\ \ /\ / /
\ \____/ \____/ /
\ | | /| | /
\|____|/ |____|/
""".split("\n")
var r = """
_______ ____
|\__ \ / \
|| |\ \/ ___\
\|_| \ /|__|
\ \ //
\ \ \
\ \____\
\ | |
\|____|
""".split("\n")
var e = """
___________
/ _____ \
/ /_____\ \
|\ _____/|
| \ /|____|/
\ \ \/_______/\
\ \_____________/|
\ | | |
\|____________|/
""".split("\n")
var n = """
_____ _______
|\__ \/ \
|| |\ __ \
\|_| \ /| \ \
\ \ \/\ \ \
\ \ \ \ \ \
\ \___\ \ \___\
\ | | \| |
\|___| |___|
""".split("\n")
for (i in 0..8) {
System.print("%(w[i]) %(r[i]) %(e[i]) %(n[i])")
}</syntaxhighlight>
{{out}}
<pre>
____ ____ ____ _______ ____ ___________ _____ _______
|\ \ |\ \ |\ \ |\__ \ / \ / _____ \ |\__ \/ \
| \ \ | \ \ | \ \ || |\ \/ ___\ / /_____\ \ || |\ __ \
\ \ \\ / \\ / /| \|_| \ /|__| |\ _____/| \|_| \ /| \ \
\ \ \V \V / | \ \ // | \ /|____|/ \ \ \/\ \ \
\ \ /\ / / \ \ \ \ \ \/_______/\ \ \ \ \ \ \
\ \____/ \____/ / \ \____\ \ \_____________/| \ \___\ \ \___\
\ | | /| | / \ | | \ | | | \ | | \| |
\|____|/ |____|/ \|____| \|____________|/ \|___| |___|
</pre>
=={{header|XPL0}}==
Here's XPL0's "cheap hack." (Hats off to D!)
<
proc DrawBlock(X, Y);
Line 2,072 ⟶ 4,192:
];
];
]</
{{out}}
<pre>
///\ ///\ /////////\ ///\ ///////\
Line 2,093 ⟶ 4,213:
\\\/ \\\/ \\\/ \\\\\\\\\\\/ \\\\\\\/
</pre>
=={{header|Yabasic}}==
<syntaxhighlight lang="yabasic">
// Method 1
// r$ = system$("explorer \"http://www.network-science.de/ascii/ascii.php?TEXT=${delegate}&x=23&y=10&FONT=block&RICH=no&FORM=left&STRE=no&WIDT=80&TEXT=Yabasic\"")
// Method 2
// print
// print " _| _| _| _| "
// print " _| _| _|_|_| _|_|_| _|_|_| _|_|_| _|_|_| "
// print " _| _| _| _| _| _| _| _|_| _| _| "
// print " _| _| _| _| _| _| _| _|_| _| _| "
// print " _| _|_|_| _|_|_| _|_|_| _|_|_| _| _|_|_| "
// print
// Method 3
clear screen
dim d$(5)
d$(0) = "X X X XXXX X XXX X XXX "
d$(1) = " X X X X X X X X X X X X"
d$(2) = " X XXXXX XXXX XXXXX XXX X X "
d$(3) = " X X X X X X X X X X X"
d$(4) = " X X X XXXX X X XXXX X XXX "
long = len(d$(0))
sub write(dx, dy, c$)
local x, y
for y = 0 to 4
for x = 0 to long
if mid$(d$(y), x, 1) = "X" print at(x + dx, y + dy) c$
next x
next y
end sub
write(2, 2, "\\")
write(1, 1, "#")
print</syntaxhighlight>
=={{header|zkl}}==
{{trans|Common Lisp}}
<syntaxhighlight lang="zkl">#<<<
"
xxxxxx x x x
x x x x
x x x x
x x x x
xxxxx x x xxxx
"
#<<<<
.replace(" "," ").replace("x","_/").println();</syntaxhighlight>
{{out}}
<pre>
_/_/_/_/_/_/ _/ _/ _/
_/ _/ _/ _/
_/ _/ _/ _/
_/ _/ _/ _/
_/_/_/_/_/ _/ _/ _/_/_/_/
</pre>
|