20

Ruby 2.5, 98 bytes -15.upto(15){|y|68.times{|x|z=0;250.times{z=0.035*x-1.9751+y/17.21i+z*z};putc z.abs<2?42:32};puts} Try it online! Very straightforward implementation, with a little bit of trickery to allow using times instead of upto in the inner loop. Unfortunately, loop merging is two bytes longer, although it may help in other languages: -1034....


11

Canvas, 15 9 bytes _;1*⁸/∔╬ Try it here! -6 bytes after fixing the program. Draws a quarter of the hexagon, and quad palindromizes.


10

MATL, 45 bytes Some numerical constants have been taken from Sisyphus' answer Thanks to @Arnauld for a correction! O8W:"U-1.9751:.035:.4-15:15!17.21j/++]|2<42*c Try it online! How it works O % Push 0 8W % Push 2^8, that is, 256 : % Range. Gives [1 2 ... 256] " % For each. This ...


10

Wolfram Language (Mathematica), 86 85 bytes -1 thanks to sanchez Print@@@Array[If[Re@Nest[zz^2+.035#2+I.0581#,0,200]<2,"*"," "]&,8{4,9},-5{3,79/7}] Try it online! Uses the constants found by Sisyphus. Mathematica does have such functions as MandelbrotSetIterationCount and MandelbrotSetMemberQ (which, with the default 1000 ...


9

Python 2, 92 bytes k=n=input() while 1:a=k^k>>n;print" "*a+"\/_"[k/n-2]+"_ "[-n<k<n]*2*(2*n+~a)+"\_/"[k/n];k-=1 Try it online!


9

05AB1E, 56 bytes Feels very long. 67ÝƵú*Ž @-тn/15D(Ÿт*Ž6À/δ‚εε₅FDnÆsP·‚y+DnO4›©#}„* ®è]øJ» Try it online! Since 05AB1E does not support complex numbers the computation is done in a more manual way, keeping complex numbers as pairs [a, b]: $$(a+bi)^2 = (a^2-b^2) + 2abi$$ D # duplicate the pair n # square each part: [a^2, b^2] Æ # reduce ...


9

R, 151 138 bytes Edit: -13 bytes thanks to Giuseppe write(matrix(unlist(Map(rep,c(" ","*"),utf8ToInt("T `#^%^$Y (S\" /Q3 !I8I;E>D=8 $$?6*!?5, >2! - =!_#")-31)),68)[,c(1:16,15:1)],1,68,,"") Try it online! Encodes the run lengths of s and *s for the top half as a text string, converts these to a matrix (...


6

Charcoal, 14 bytes ←×_θ↖θ→↗θ×_θ‖M Try it online! +1 byte fix from ASCII-Only. Draws half of the hexagon, and mirrors it.


6

Charcoal, 74 73 bytes F¹⁶«F⁶⁸«≔⁰θ≔⁰ηFφ«≔⁺⊕×·⁰³⁵⁻κ⁸⁵⁻×θθ×ηηζ≔⁺∕ι¹⁷·²¹⊗×θηη≔ζ軧 *‹⁺×θθ×ηη⁴»⸿»‖O↑ Don't try it online! Link is to verbose version of code. Performs 1,000 iterations, so it's too slow for TIO. It can be made faster by halving the number of iterations, which costs a byte: F¹⁶«F⁶⁸«≔⁰θ≔⁰ηF⊘φ«≔⁺⊕×·⁰³⁵⁻κ⁸⁵⁻×θθ×ηηζ≔⁺∕ι¹⁷·²¹⊗×θηη≔ζ軧 *‹⁺×θθ×ηη⁴»⸿»‖O↑ ...


6

Python 3, 218 217 200 191 bytes lambda:a+['*'*64]+a[::-1] D=2**31 a=[f'{y:68b}'.translate(' *'*25)for y in[4**7,30<<12,63<<12,31<<12,3143680,125828992,33554412,D//8-8,D//4-2,D-1,D-2,6082*D-1,16378*D-1,32766*D-2,458750*D-4]] Try it online! Terrible score, but I wanted to see how it would look with bitmasks in the style of a typical ascii-...


6

Perl 5, 127 bytes say for@o='e1q4o6o5j119d31@bD12ZIZLVOUNI1155PG;2PF=1OC21>1N2p4'=~s/./($i++%2?'*':$")x(-48+ord$&)/ger=~/.{68}/g,reverse@o[0..14] Try it online! say #prints each line + \n newline at end for @o= #for all lines, also saved in array @o 'e1q4o6o5j119d31@...


6

JavaScript (ES6),  128 ... 124  123 bytes Based on the parameters used by @Sisyphus. f=(k=2138)=>k?` *`[k--%69&&-~(g=X=>++n>>8?X*X+Y*Y<4:g(X*X-Y*Y-k%69*.035+.3699,Y=2*X*Y-(16+~(k/69))/17.21))(Y=n=0)]+f(k):'' Try it online! Commented f = (k = 2138) => // f is a recursive function taking a counter k ...


6

Bubblegum, 97 bytes Using zopfli --i 10000 --deflate -c mandlebrot.txt | xxd and no trailing spaces. Increasing iterations beyond 10000 doesn't seem to make a difference. 00000000: c595 a901 c040 0c80 7ca6 8866 ff01 2bb1 .....@..|..f..+. 00000010: 574c f0d0 debf 05a6 4850 3c88 e216 9105 WL......HP<..... 00000020: f869 829a f63b 5ab2 30c1 6f3f 81c4 06d2 ...


5

Haskell, 150 bytes r=reverse m(o:c:k)=o:c:c:c:k++" " f 1=[["\\ /","__ "],["/__\\"]] f n|[w:i,j]<-map m<$>f(n-1),_:_:k<-r$m w=[r k:w:i,k:j] h[i,j]=unlines$r<$>r i++j h.f Try it online! A more recursive version of this answer. The arbitrariness of this challenge makes this pretty frustrating. ...


5

C (gcc), 119 109 bytes a,i,j;f(n){for(i=a+=a=j=n*2;~j;)putchar(!i--?i=a,j--,13:i%(n*3)<n|j%(n*2)?(i-~j-n)%a?(i-j+n)%a?32:92:47:95);} Try it online! saved 2 thanks to @ceilingcat The table below is not updated so values can differ, but the concept is: we have 2 pairs of parallel lines . . _______.______.________ | / \ | . ....


5

Perl 5 (-p), 102 bytes s/_+/__$&/g,s/^|$/ /gm,s/^ *\S /$& /gm,s-( +)\\ -$&/ $1 \\ \\ $1 / - for($\=' __ / \ \__/')x--$_}{ Try it online! -p and }{ at the end is a trick to only print the output record separator $\ at the end. It only works for one input record; the header is used to print all in one tio link. $\=' __ / \ \__/' # output ...


5

Haskell, 100 bytes f n=unlines[q<$>[1..3*n]++[1-n..0]|y<-[-n..n],let q x|abs y==n,x>n='_'|x==y='\\'|x+y==1='/'|1>0=' '] Try it online! Golfing AZTECCO's answer plus some new techniques. The main idea is that the hexagon is simpler if we transplant the first n columns to the end. |-| ______ / \ / \ / \ \ ...


4

Haskell, 129 120 bytes g=mod f n|a<-n*4=[c|y<-[-n..n],x<-[0..a],let c|x<1='\n'|g x(n*3+1)>n,abs y==n='_'|g(x+y)a==1='/'|g(x-y)a<1='\\'|1>0=' '] Try it online! saved 9 thanks to @Wheat Wizard and @xnor. Check @xnor answer and its big improvement on the approach to the problem (avoiding modulo and parallel lines) ! Equivalent of my C ...


4

J, 50 47 bytes -3 thanks to Jonah! ' \/_'{~]|."1((0,]+2*|.)@=@i.,.3,3,~0$~<:,])@+: Try it online! ((0,]+2*|.)@=@i. ,. 3,3,~0$~<:,])@+: 0 0 0 0 3 3 3 3 1 0 0 2 0 0 0 0 0 1 2 0 0 0 0 0 0 2 1 0 0 0 0 0 2 0 0 1 3 3 3 3 ]|."1 0 0 3 3 3 3 0 0 0 2 0 0 0 0 1 0 2 0 ...


4

05AB1E, 33 29 25 bytes -4 (7) bytes thanks to Kevin Cruijssen! L+<'/úíºI·'_ך»∊¶¡`ðs‡).c Try it online! 05AB1E has a canvas builtin which might be useful, but is quite tricky to get working, this is just the mirror builtins º and ∊ and the centralize builtin .c.


4

JavaScript (ES6),  109  107 bytes w=>(x=0,W=w*4,i=g=y=>~y?` /\\_`[x++-W?y*!i|w/x|x>w*3?(x+~y+w)%W?(x+y)%W-w?1:3:2:4:x=i=0&y--]+g(y):'')(w*2) Try it online! Commented w => ( // w = input x = 0, // initialize x to 0 W = w * 4, // W = total width i = // ...


4

C (gcc), 194 \$\cdots\$ 149 144 bytes Saved 13 14 19 bytes thanks to ceilingcat!!! p(n,c){for(;n--;)printf(L"/\\ _\n"+c);}i;t;f(n){p(n,2);for(i=t=p(2*n,3);i>=p(1,4);t=i/n?--i,1:t)i+=!p(!p(n+i<<!p(!p(n+~i,2),t),t&!i|2),!t)-2*t;} Try it online! Explanation (before some golfs) p(n,c){for(;n--;) // Helper function to ...


4

Python 3.8 (pre-release), 174 bytes n=int(input()) b,a,s="\/ " z,f=range(n),lambda c,d,t:((n-1-i)*s+c+2*(n+i)*s+d for i in t) print(f"{'_'*2*n:^{4*n}}",*f(a,b,z),*f(b,a,z[:0:-1]),f"{b:>{n}}{'_'*2*n}/",sep="\n") Try it online! -1 byte thanks to @Duncan -8 bytes thanks to @Danis


4

Retina 0.8.2, 94 bytes .+ $* ¶$&$* \G ¶$%'/$`$%_$%_$`\ r` \G $%`\$'$%_$%_$%'/¶ ^¶( *) $1 $.&$*_$.&$*_$& T` `\_` +/$ Try it online! Link includes test cases. Explanation: .+ $* ¶$&$* Insert two rows of n spaces. \G ¶$%'/$`$%_$%_$`\ Convert the first row into the top sides of the hexagon. r` \G $%`\$'$%_$%_$%'/¶ Convert the second ...


4

Python 2, 119 114 bytes i=n=input() d=0 exec"k=i/n|d;print' '*i+'\_/'[~k]+'_ '[i-d<n]*2*(2*n+~i)+'\_/'[k]\nif i==d:d=i=-1\ni-=d|1;"*(n-~n) Try it online!


4

Java 10, 637 617 600 chars interface T{static void main(String[]u){String g=" ",n=g+g,m=n+g,s=m+m,h=s+s,q=h+m,o=" O-O",l=o+n,w=o+s+l,p="_____",d="===",b=d+d,e=b+b,f=m+g,t=e+d,c="|",z=" | | |",v="|-|-|",k=" []",x=k+k,r=k+g+c,a[]={h+"__"+n,b+s+"\\/"+n,c+r+b+d+g,...


3

JavaScript (ES8), 265 bytes (n,l,d)=>setInterval(_=>(g=i=>i<q?g(i+1,(m[y-=634%~(D+=i%l?0:+("02112122230"[(n*12^i/l)%43%29]||1))-2>>1]=m[y]||[...''.padEnd(l*4)])[x-=D<4?D-1:5-D]=(i+j)%q<d?0:" "):C.log(m.reverse().map(r=>r.join``).join` `))(y=D=!++j,(C=console).clear(x=l*3,m=[])),j=100,q=n*--l) Try it online! ...


3

JavaScript (V8), 353 318 bytes f=(n,l,d,o=0)=>{w=[...{3:'330231',4:'42240220',6:'423313021131',8:'4233231302112131'}[n]] a=Array(3*l).fill().map(_=>Array(4*l).fill` `) x=n==4?0:l,y=0 for(i=0;i<d+o;++i){a[y][x]=i>=o?'*':' ' j=~~(i/(l-1))%n*2 x+=w[j]-2 y+=w[j+1]-2}(c=console).clear() c.log(a.join` `.replace(/,/g,'')) setTimeout(_=>f(n,l,d,o+1),...


3

Jelly, 11 bytes ,ZŒrFċ¥"Ø^S Try it online! The statues have a polished bottom, so they use / instead of - and \ instead of |. The input is a list of strings that must be the same length. Explanation ,ZŒrFċ¥"Ø^S Main monadic link , Pair the input Z with the input transposed Œr Run-length encode everything ...


2

Haskell, 186 168 bytes -18 bytes with xnor's fixes and removing unneeded spaces on the last line s=' ' (!)=replicate e=reverse h n=unlines$(\m->(n!s++(2*n)!'_'++n!s):e(e<$>m)++init m++[(n-1)!s++'\\':(2*n)!'_'++"/"])$(\i->i!s++'\\':(4*n-2*i-2)!s++'/':i!s)<$>[0..n-1] Try it online! Ungolfed: hex :: Int -> String hex n = unlines ...


Only top voted, non community-wiki answers of a minimum length are eligible