Generate a mandelbrot fractal

51

11

Your task is to draw the mandelbrot set in ascii. It should look something like enter image description here

The complex number c lies in the mandelbrot set, when the sequence z(n+1) = z(n)^2 + c, z(0) = 0 remains bounded. For the purpose of this challenge you can consider the sequence bounded for c if |z(32)| < 2.

Plot the mandelbrot set on the complex plane from (-2 - i) to (1 + i), and a minimum resolution of 40x30, using ascii characters in your favourite language, using as few characters as possible.

Hannesh

Posted 2011-07-06T16:20:25.333

Reputation: 1 013

Question was closed 2017-05-27T07:07:10.080

@dmckee a good way to parameterize the Mandelbrot fractal is to change it to a Julia fractal :) It's the same algorithm z = z^2 + c except for Julia c is given as input and z0 is the point we are checking – aditsu quit because SE is EVIL – 2013-03-08T14:31:22.207

Too bad it's closed. There is a good answer here: http://lang5.sourceforge.net/tiki-index.php?page=About

– Jerry Jeremiah – 2017-07-17T23:27:23.413

Cause I won't take credit: http://www.mostlymaths.net/2014/01/the-mandelbrot-set-in-one-line-of-apl.html

– fredtantini – 2014-03-09T22:24:23.540

The complex number z lies in the Mandelbrot set if the sequence (u(n)) defined by u(0)=0 and u(n+1)=u(n)^2+z is bounded. Your definition of the M-set is wrong. – gniourf_gniourf – 2014-04-19T13:49:42.677

33Since the specification is a little bit unclear with respect to that point I can propose the following low-res ;-) 1-char php solution: * – Howard – 2011-07-06T17:32:42.463

Or monochromatic ......................... – Alexandru – 2011-07-06T18:04:00.910

3Well I was hoping I could just say "don't be a jerk" :D. We'll go with at least 40x30 then. – Hannesh – 2011-07-06T18:40:53.840

3

I have a personal preference for tasks that solve a class of problems rather than one instance. Making the region to use an input would makes this questions qualify. In any case, the specification is a bit light. In the future you can get help with these kinds of issues on the meta sandbox or the puzzle lab chat before you task goes live

– dmckee --- ex-moderator kitten – 2011-07-06T19:16:34.843

1@Hannesh, I agree with dmckee. If you change the question, I'll be happy to add arguments. – boothby – 2011-07-07T00:01:00.027

2

Here's a source code in the shape of the mandelbrot set, which then generates high resolution mandelbrot set (http://preshing.com/20110926/high-resolution-mandelbrot-in-obfuscated-python) - OT for this question but I thought people here might like it.

– DanBeale – 2011-10-01T11:54:20.367

1

Have you seen that implementation in JavaScript in less than 140 bytes : http://jsfiddle.net/jP9Sa/10/ ?

– paulgreg – 2011-10-07T10:09:07.693

Answers

54

Assuming machine code counts, I wrote a prod a while back that generates a 320x200 color Mandelbrot in 64 bytes - http://www.pouet.net/prod.php?which=53287

Screenshot

Here is the code:

; "Microbrot" by Sir_Lagsalot

org 100h
mov al,13h
int 10h

les ax,[bx]

FillLoop:
cwd
mov ax,di
mov cx,320
div cx
sub ax,100
dec dh

xor bx,bx
xor si,si

MandelLoop:
mov bp,si
imul si,bx
add si,si
imul bx,bx
jo MandelBreak
imul bp,bp
jo MandelBreak
add bx,bp
jo MandelBreak
sub bx,bp
sub bx,bp

sar bx,6
add bx,dx
sar si,6
add si,ax

loop MandelLoop

MandelBreak:
xchg ax,cx
stosb
jmp FillLoop

Compiled version in base64:

sBPNEMQHmYn4uUAB9/GD6GT+zjHbMfaJ9Q+v8wH2D6/bcBkPr+1wFAHrcBAp6ynrwfsGAdPB/gYBxuLbkarrxg==

Sir_Lagsalot

Posted 2011-07-06T16:20:25.333

Reputation: 4 898

Oh wow, I only just saw the code now. That is crazy! – Hannesh – 2012-05-21T12:41:35.850

2Hmm, I guess you need to pass the output to an ascii-art converter for this to count? – Paŭlo Ebermann – 2015-10-25T10:54:24.817

9@Hannesh I am a bit late to the party, but are you aware that this doesn't even meet the specs? (ASCII representation?) – flawr – 2015-10-25T20:57:10.960

1-1! It does not show the requested range: "Plot the mandelbrot set on the complex plane from (-2 - i) to (1 + i)" – None – 2016-09-14T05:39:01.760

1This is cool, and very neat. But does not meet specs, so should not have been the accepted answer. – Tally – 2017-01-14T16:35:55.233

How should I compile it? – ckjbgames – 2017-02-20T16:04:10.850

@ckjbgames The code can be assembled into an executable .com file using FASM: https://flatassembler.net/

– Sir_Lagsalot – 2017-02-22T17:57:32.843

Also, this answer does not include a byte/char count. – CalculatorFeline – 2017-05-27T03:22:57.327

9I read the code and thought it was way to short/simple to do anything interesting. 2 minutes later after sudo apt-get install dosbox; dosbox ./Microbrot.com I was found picking my jaw up from the floor. This is pretty darn impressive! – sehe – 2011-12-02T00:36:36.100

2IMO we have a winner. – Hauleth – 2012-01-15T10:34:23.610

22

C, 988 chars

Here's mine, which does an ASCII mandelbrot, written as an ASCII mandelbrot, in C.

Oh.. and it also has interactive zoom functionality. (press the keypad numbers 1-9 to zoom in on the respective area)

int main(int argc, char* argv[]){ unsigned
char c='r';double x1,y,y1,t=0,q=78,r=22,x,
x2,y2,a,b,v;do{(c=='r')?(y2=-(y1=-1.6),x1=
-2.0f,x2=0.8):(c=='?')? c=0,   printf("%f\
,%f:%f,%f",x1,y1,x2,y2):(c     <':'&&c>48)
?x=x1,y=y1,*(c>'3'&&c<':'        ?&y1: &t)
+=(y2-y1)/3,*(c>'6'&&c<            ':'?&y1
:&t)+=(y2-y1)/3, *((c               == '8'
||c+3=='8'||c+3 +3==               '8'?&x1
:&t))+=(x2-x1     )/                3,*((c
=='9'||c+3==                        '9'||c
+6=='9'                          ?&x1: &t)
)+=2*(x2-x1)                        /3,x2=
x1+(x2-x)/3,      y2                 =y1+(
y2-y)/3:(c=0);for(y=                y2;y>=
y1&&c;c=1,y-=(y2-y1)/r,            putchar
('\n')) for(x=x1;x<=x2;            x+=(x2-
x1)/q){a=b=c=0; while  (        ++c&&(a=(t
=a)*a)<4&&(v=b*b)<4)a-=v-x     ,b=y+b*2*t;
putchar("#@XMW*N&KPBQYKG$R"   "STEEVxHOUV"
"CT()[]%JL={}eou?/\\|Ili+~<>_-^\"!;:`,. "[
c?c>>2:63]);}} while((c=getchar ())!='x');
return 0;/* Mandelbrot - S.Goodwin.2001*/}

Originally posted here http://marquisdegeek.com/rnd_obs.php

Marquis de Geek

Posted 2011-07-06T16:20:25.333

Reputation: 221

3You can participate at the IOCCC with this code – TuxCrafting – 2016-06-14T22:03:34.263

@TùxCräftîñg: Not so obfuscated ... After all the white space is the documentation! – sergiol – 2017-01-13T01:59:44.963

Nice! Be sure to include a language header and byte count when answering code golf questions. Welcome to PPCG! – Jonathan Van Matre – 2014-03-11T11:11:19.857

18

Common lisp -- 195 chars

(loop for y from -1 to 1 by 1/15 do
  (loop for x from -2 to 1 by .04 do
    (let*((c 126) (z (complex x y)) (a z))
      (loop while (< (abs (setq z (+ (* z z) a))) 2)
            while (> (decf c) 32)) 
      (princ (code-char c))))
  (terpri))

Tested with sbcl and clisp. Result:

~~~~~~~~~~~~~}}}}}}}}}}}}}}}}}}}}||||||||{{{zyvrwum{|||||}}}}}}~~~~~~~~~~~~~
~~~~~~~~~~~}}}}}}}}}}}}}}}}}}}}|||||||||{{{zyxvptwyz{{|||||}}}}}}~~~~~~~~~~~
~~~~~~~~~}}}}}}}}}}}}}}}}}}}}|||||||||{{{{zwLtb huwx{{{{||||}}}}}}}~~~~~~~~~
~~~~~~~~}}}}}}}}}}}}}}}}}}}|||||||||{{zzzyxvn    Knwyz{{{{||||}}}}}}~~~~~~~~
~~~~~~~}}}}}}}}}}}}}}}}}}||||||||{{zzzzyyywuk     qwxyzzzz{{|||}}}}}}~~~~~~~
~~~~~}}}}}}}}}}}}}}}}}}|||||||{{{zxjnpwwtjsqpi   lqrujnxyyxrz{|}}}}}}}}~~~~~
~~~~}}}}}}}}}}}}}}}}}|||||{{{{{zzzxt>  qf             pttfqeqz{|}}}}}}}}~~~~
~~~~}}}}}}}}}}}}}}}|||{{{{{{{{zzzxwup                      sxz{||}}}}}}}~~~~
~~~}}}}}}}}}}}}|||{z{{{{{{{zzzzywkmo                      rwyz{{||}}}}}}}~~~
~~}}}}}}}}}||||{{zwvyyyyyyyyyyyxvsP                        swvz{||}}}}}}}}~~
~~}}}}|||||||{{{zzwrtsww^uwwxxwvr                            iz{|||}}}}}}}~~
~}}}|||||||{{{{{zyxws  mj Ubhuutl                           sxz{|||}}}}}}}}~
~}||||||||{{{{{zyytun         qq                            avz{|||}}}}}}}}~
~|||||||{{zzzyxsvvum           j                            Sz{{|||}}}}}}}}~
~{{{{{yyzzzyyxwtbUP                                        qyz{{||||}}}}}}}~
~                                                        pvxyz{{||||}}}}}}}}
~{{{{{yyzzzyyxwtbUP                                        qyz{{||||}}}}}}}~
~|||||||{{zzzyxsvvum           j                            Sz{{|||}}}}}}}}~
~}||||||||{{{{{zyytun         qq                            avz{|||}}}}}}}}~
~}}}|||||||{{{{{zyxws  mj Ubhuutl                           sxz{|||}}}}}}}}~
~~}}}}|||||||{{{zzwrtsww^uwwxxwvr                            iz{|||}}}}}}}~~
~~}}}}}}}}}||||{{zwvyyyyyyyyyyyxvsP                        swvz{||}}}}}}}}~~
~~~}}}}}}}}}}}}|||{z{{{{{{{zzzzywkmo                      rwyz{{||}}}}}}}~~~
~~~~}}}}}}}}}}}}}}}|||{{{{{{{{zzzxwup                      sxz{||}}}}}}}~~~~
~~~~}}}}}}}}}}}}}}}}}|||||{{{{{zzzxt>  qf             pttfqeqz{|}}}}}}}}~~~~
~~~~~}}}}}}}}}}}}}}}}}}|||||||{{{zxjnpwwtjsqpi   lqrujnxyyxrz{|}}}}}}}}~~~~~
~~~~~~~}}}}}}}}}}}}}}}}}}||||||||{{zzzzyyywuk     qwxyzzzz{{|||}}}}}}~~~~~~~
~~~~~~~~}}}}}}}}}}}}}}}}}}}|||||||||{{zzzyxvn    Knwyz{{{{||||}}}}}}~~~~~~~~
~~~~~~~~~}}}}}}}}}}}}}}}}}}}}|||||||||{{{{zwLtb huwx{{{{||||}}}}}}}~~~~~~~~~
~~~~~~~~~~~}}}}}}}}}}}}}}}}}}}}|||||||||{{{zyxvptwyz{{|||||}}}}}}~~~~~~~~~~~
~~~~~~~~~~~~~}}}}}}}}}}}}}}}}}}}}||||||||{{{zyvrwum{|||||}}}}}}~~~~~~~~~~~~~

Slightly modified from B. Clementson blog.

stackman

Posted 2011-07-06T16:20:25.333

Reputation: 291

This is code golf. Don't count indentation if it isn't needed. – J B – 2011-09-29T08:06:54.303

@ JB. I updated the char count. It does not take superfluous spaces into account anymore. I have left the code indented for readability. I also tuned a parameter, the image now follows the size specification. – stackman – 2011-09-29T19:18:27.350

Much better. Upvoted. – J B – 2011-09-29T20:44:15.983

11

Python, 146 145 143char

z=lambda x,c,n:z(x**2+c,c,n-1)if n*(abs(x)<2)else x
for y in range(-15,16):print''.join(' @'[abs(z(0,x/25.+y/15j,32))<2]for x in range(-50,26))

Had to add the clause (abs(x)<2) to the conditional expression to keep Python from winging about overflows. But... this is a reason I love Sage...

Sage, 133char

z=lambda x,c,n:z(x^2+c,c,n-1)if n else abs(x)<2
for y in range(-15,16):
 print''.join(' +'[z(0,x/25+y/15j,32)]for x in range(-50,26))

Sample output (from python version)

                                                  @                         

                                            @  @                            
                                             @@@@@                          
                                             @@@@@                          
                                              @@@                           
                                    @@@  @@@@@@@@@@@@@                      
                                     @@@@@@@@@@@@@@@@@@@@@@                 
                                    @@@@@@@@@@@@@@@@@@@@@@                  
                                  @@@@@@@@@@@@@@@@@@@@@@@@@                 
                        @        @@@@@@@@@@@@@@@@@@@@@@@@@@@@               
                     @@  @@      @@@@@@@@@@@@@@@@@@@@@@@@@@@                
                     @@@@@@@@@  @@@@@@@@@@@@@@@@@@@@@@@@@@@@                
                    @@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@               
                 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                 
 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                   
                 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                 
                    @@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@               
                     @@@@@@@@@  @@@@@@@@@@@@@@@@@@@@@@@@@@@@                
                     @@  @@      @@@@@@@@@@@@@@@@@@@@@@@@@@@                
                        @        @@@@@@@@@@@@@@@@@@@@@@@@@@@@               
                                  @@@@@@@@@@@@@@@@@@@@@@@@@                 
                                    @@@@@@@@@@@@@@@@@@@@@@                  
                                     @@@@@@@@@@@@@@@@@@@@@@                 
                                    @@@  @@@@@@@@@@@@@                      
                                              @@@                           
                                             @@@@@                          
                                             @@@@@                          
                                            @  @                            

                                                  @                         

boothby

Posted 2011-07-06T16:20:25.333

Reputation: 9 038

I think you can just use 15j in the python version too – gnibbler – 2011-07-08T04:48:58.033

To shave one character add line r=range(-50,26). Then replace range(-15,16) with r[35:66] and replace range(-50,26) with r. – Steven Rumbalski – 2011-09-30T17:51:49.140

10

J, 61 characters

{&' *'(2:>[:|([+]*])^:32 ::_:)&0"0(j.1-16%~i.33)+/_2+32%~i.97
                                                                *                                

                                                            **                                   
                                                         ****** *                                
                                                         ********                                
                                                          *****                                  
                                                    *************** *                            
                                               ***********************  ***                      
                                           *   ****************************                      
                                           ********************************                      
                                           *********************************  *                  
                                          ************************************                   
                           ** ******     ************************************                    
                          *************  ************************************                    
                         *************** ***********************************                     
                     ******************************************************                      
 ************************************************************************                        
                     ******************************************************                      
                         *************** ***********************************                     
                          *************  ************************************                    
                           ** ******     ************************************                    
                                          ************************************                   
                                           *********************************  *                  
                                           ********************************                      
                                           *   ****************************                      
                                               ***********************  ***                      
                                                    *************** *                            
                                                          *****                                  
                                                         ********                                
                                                         ****** *                                
                                                            **                                   

                                                                *                                

55 for space-separated 0/1 instead of stars.

(2:>[:|([+]*])^:32 ::_:)&0"0(j.1-16%~i.33)+/_2+16%~i.49
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 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x+y*y<1<<26;i++)){((v=(x*x-y*y>>12)+h,y=(x*y>>11)+g,x=v));}
printf $[i%10]
'

(no trailing newline)

Run it in a terminal with line length 125:

mb3 output


BASH - 214 190

for h in {-4096..4096..200};do
for g in {-8192..4096..115};do
x=0;y=0
for((i=0;i<30&&x*x+y*y<1<<26;i++));do((v=((x*x-y*y)>>12)+g));((y=((x*y)>>11)+h))
x=$v
done;printf $[i%10];done;echo;done

This basically is the same code like below with calculations being replaced by hardcoded values and the image got flipped around the x axis.

mb2.bash run snapshot

The version below did not fully fit the rules breaking "from (-2 - i) to (1 + i)".


BASH - 263 261 260 236

Use this source, Luke:

a=-8601;b=2867;c=-4915;d=4915
((e=(b-a)/99));((f=(d-c)/49))
for((h=d;h>=c;h-=f));do
for((g=a;g<=b;g+=e));do
x=0;y=0
for((i=0;i<30&&x*x+y*y<1<<26;i++));do((v=((x*x-y*y)>>12)+g))
((y=((x*y)>>11)+h));x=$v
done
printf $[i%10]
done;echo;done

This code uses integer arithmetic only, so BASH does not need additional helpers for doing floating point maths...

mb.bash run snapshot

user19214

Posted 2011-07-06T16:20:25.333

Reputation:

In arithmetic evaluations Bash casts the empty strings to 0, so is enough to initialize x=;y=. Shift operators have lower precedence than addition and multiplication, so no need for parenthesis around >>'s left side operand. And you can use {} instead of dodone, like Digital Trauma advises in his tip. And you can put multiple expressions in an arithmetic evaluation, just separate them with ,.

– manatwork – 2016-09-14T07:41:53.173

@manatwork ... thanks! ;-) – None – 2016-09-14T10:06:26.040

You forgot a pair of parenthesis in (x*x-y*y)>>12. They change nothing. – manatwork – 2016-09-14T10:17:15.823

Yes... it looks sooo mean without the parenthesis... I kinda didn't dare it... :-/ – None – 2016-09-14T10:35:22.223

6

Mathematica 56

RegionPlot[Abs@Nest[#^2+x+I*y&,0,9]<2,{x,-2,1},{y,-1,1}]

Mathematica 77

ArrayPlot[2^-Abs@Nest[#^2+Table[j+i*I,{i,-1.2,1.2,.1},{j,-1.8,0.6,.1}]&,0,6]]

enter image description here

Mathematica 77

Grid@Table[If[Abs@Nest[#^2+y+x*I&,0,30]<2,"*",""],{x,1,-1,-.1},{y,-2,0.5,.1}]

enter image description here

chyanog

Posted 2011-07-06T16:20:25.333

Reputation: 1 078

Nice. I tried this approach: GraphicsGrid@ImageData@Binarize@MandelbrotSetPlot[ImageResolution->40]/.{1->" ",0->"*"} but it was 84 characters and the output is not as nice as yours anyway. – Michael Stern – 2015-10-25T16:17:53.413

6

Ruby, 95 characters

puts (-20..20).map{|y|(-40..20).map{|x|z=0;32.times{z=z*z+Complex(x,y)/2e1};z.abs<2??*:' '}*''}

Sample output:

                                        *                    

                                     *                       
                                   *  *                      
                                    ****                     
                                    *****                    
                                    ****                     
                             *  * ****** * *                 
                             **  **********                  
                             ******************              
                             ******************              
                           * ******************              
                            *******************              
                          ***********************            
                    *      *********************             
                 * ***    **********************             
                 *******  **********************             
                ********* **********************             
                ********************************             
             **********************************              
 *********************************************               
             **********************************              
                ********************************             
                ********* **********************             
                 *******  **********************             
                 * ***    **********************             
                    *      *********************             
                          ***********************            
                            *******************              
                           * ******************              
                             ******************              
                             ******************              
                             **  **********                  
                             *  * ****** * *                 
                                    ****                     
                                    *****                    
                                    ****                     
                                   *  *                      
                                     *                       

                                        *                    

Howard

Posted 2011-07-06T16:20:25.333

Reputation: 23 109

6

Haskell, 130

import Complex
main=mapM_ putStrLn[[" *"!!fromEnum(magnitude(iterate((+(x:+y)).(^2))0!!32)<2)|x<-[-2,-1.95..1]]|y<-[-1,-0.95..1]]

Output:

                                        *                    

                                     *                       
                                   *  *                      
                                    ****                     
                                    *****                    
                                    ****                     
                             *  * ****** * *                 
                             **  **********                  
                             ******************              
                             ******************              
                           * ******************              
                            *******************              
                          ***********************            
                    *      *********************             
                 * ***    **********************             
                 *******  **********************             
                ********* **********************             
                ********************************             
             **********************************              
 *********************************************               
             **********************************              
                ********************************             
                ********* **********************             
                 *******  **********************             
                 * ***    **********************             
                    *      *********************             
                          ***********************            
                            *******************              
                           * ******************              
                             ******************              
                             ******************              
                             **  **********                  
                             *  * ****** * *                 
                                    ****                     
                                    *****                    
                                    ****                     
                                   *  *                      
                                     *                       

                                        *          

hammar

Posted 2011-07-06T16:20:25.333

Reputation: 4 011

Above my head is full of star****** – Jamie – 2014-04-26T09:11:46.683

6

Here's a coffee-script answer running on node.js: In black and white:

m=(x,y)->
 a=x
 b=y
 z=0
 for i in [0..99]
  (return if i>60 then '*' else if i>10 then '-' else if i>5 then '.' else ' ') if z>4
  l=y*y
  z=x*x+l
  y=2*x*y+b
  x=x*x-l+a
 '@'
console.log (m x,y for x in [-1.5..0.5] by 2/79).join '' for y in [-1.3..1.3] by 2.6/40

ascii_mandel_color

Adding color:

n='\u001b[0m'
m=(x,y)->
 a=x
 b=y
 z=0
 for i in [0..999]
  (return if i>100 then '\u001b[33m*'+n else if i>10 then '\u001b[34m-'+n else if i>5 then '\u001b[31m.'+n else ' ') if z>4
  l=y*y
  z=x*x+l
  y=2*x*y+b
  x=x*x-l+a
 '\u001b[32m@\u001b[0m'
console.log (m x,y for x in [-1.5..0.5] by 2/79).join '' for y in [-1.3..1.3] by 2.6/40

agent-j

Posted 2011-07-06T16:20:25.333

Reputation: 175

Do you know looking at green is good for your eyes? – Jamie – 2014-04-26T09:11:17.803

5

Perl, 153 chars

for(-21..20){$y=$_/20;for(-60..18){$r=($x=$_/30);$i=$y;for(1..99){$t=$r;$r=$r**2-$i**2+$x;$i=$t*$i*2+$y}if($r**2+$i**2<4){print"X"}else{print$"}}print$/}

Output: I can't post a picture because I am a new user, so I will try posting the text of the output.

                                                            X                  


                                                        XX                     
                                                      XXXXXX                   
                                                     XXXXXXX                   
                                                      XXXXX                    
                                                   X X XX X                    
                                            XX   XXXXXXXXXXXXXXXX              
                                            XXXXXXXXXXXXXXXXXXXXXXXXXX         
                                            XXXXXXXXXXXXXXXXXXXXXXXXXX         
                                          X XXXXXXXXXXXXXXXXXXXXXXXXXX          
                                          XXXXXXXXXXXXXXXXXXXXXXXXXXXXX        
                                       XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX      
                                        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX        
                          X XXXX       XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX       
                          XXXXXXXXX    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX       
                        XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX       
                        XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX        
                    XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX        
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX           
                    XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX        
                        XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX        
                        XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX       
                          XXXXXXXXX    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX       
                          X XXXX       XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX       
                                        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX        
                                       XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX      
                                          XXXXXXXXXXXXXXXXXXXXXXXXXXXXX        
                                         X XXXXXXXXXXXXXXXXXXXXXXXXXX          
                                            XXXXXXXXXXXXXXXXXXXXXXXXXX         
                                            XXXXXXXXXXXXXXXXXXXXXXXXXX         
                                            XX   XXXXXXXXXXXXXXXX              
                                                   X X XX X                    
                                                      XXXXX                    
                                                     XXXXXXX                   
                                                      XXXXXX                   
                                                        XX                     


                                                            X                  

PhiNotPi

Posted 2011-07-06T16:20:25.333

Reputation: 26 739

4

C# - 304 Chars

When I code, I code with readability and beautiful formatting. I threw up writing this.

using C=System.Console;class Program{static void Main()
{C.WindowWidth=220;C.WindowHeight=80;
int w=220,h=80,m=100;double s=4.0/w,v=4.0/h;
for(int i=0;i<h;i++)for(int j=0;j<w;j++){
double n=s*j-2,u=v*i-2,x=0,y=0;int r=0;
for(r=0;x*x+y*y<4&&r<m;r++){
double t=x*x-y*y+n;y=2*x*y+u;x=t;}
C.Write(r>=m?'#':' ');}C.ReadLine();}}

I am sure my solution can be improved but for reference I shall post it. Note that the windows console squashes the image.

enter image description here

Ali Caglayan

Posted 2011-07-06T16:20:25.333

Reputation: 229

1It looks like a bug! – None – 2014-02-13T02:31:13.187

3

Haskell: 340 char

Well, as I see no haskell answer, I post mine, I tried to minimize it from what I have done so far. I am sure I can reduce it a lot. But here is the first try:

m (x,y) (z,t)=(z*x-y*t,y*z+x*t);
a (x,y) (z,t)=(x+z,y+t);
r=1.0
f c z 0=z
f c z n=f c (a (m z z) c) (n-1)
e (x,y)=sqrt(x*x+y*y)
t c=(e(f c (0.0,0.0) 32)) < 2
b=map (\z -> (t z, (fst z > r-0.01))) [(x,y) | y <- [-r,-r+(1.0/15)..r], x<-[-2*r,-1.96..r]]
s True="\n"
s _=""
g (b,c)=(if (b) then "@" else " ")++s c
main=putStrLn$concat$map g b

And here is the result:

                                                  @                         

                                            @  @                            
                                             @@@@@                          
                                             @@@@@                          
                                              @@@                           
                                    @@@  @@@@@@@@@@@@@                      
                                     @@@@@@@@@@@@@@@@@@@@@@                 
                                    @@@@@@@@@@@@@@@@@@@@@@                  
                                  @@@@@@@@@@@@@@@@@@@@@@@@@                 
                        @        @@@@@@@@@@@@@@@@@@@@@@@@@@@@               
                     @@  @@      @@@@@@@@@@@@@@@@@@@@@@@@@@@                
                     @@@@@@@@@  @@@@@@@@@@@@@@@@@@@@@@@@@@@@                
                    @@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@               
                 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                 
 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                   
                 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                 
                    @@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@               
                     @@@@@@@@@  @@@@@@@@@@@@@@@@@@@@@@@@@@@@                
                     @@  @@      @@@@@@@@@@@@@@@@@@@@@@@@@@@                
                        @        @@@@@@@@@@@@@@@@@@@@@@@@@@@@               
                                  @@@@@@@@@@@@@@@@@@@@@@@@@                 
                                    @@@@@@@@@@@@@@@@@@@@@@                  
                                     @@@@@@@@@@@@@@@@@@@@@@                 
                                    @@@  @@@@@@@@@@@@@                      
                                              @@@                           
                                             @@@@@                          
                                             @@@@@                          
                                            @  @                            

                                                  @                         

OK - Inspired by some animated obfuscated C code on HN, here is an animated version:

a=27;b=79;c=C(-2.0,-1.0);d=C(1.0,1.0);e=C(-2.501,-1.003)
newtype C = C (Double,Double) deriving (Show,Eq)
instance Num C where C(x,y)*C(z,t)=C(z*x-y*t,y*z+x*t);C(x,y)+C(z,t)=C(x+z,y+t);abs(C(x,y))=C(sqrt(x*x+y*y),0.0)
r(C(x,y))=x;i(C(x,y))=y
f :: C -> C -> Int -> Int
f c z 0=0;f c z n=if(r(abs(z))>2)then n else f c ((z*z)+c) (n-1)
h j k = map (\z->(f (C z) (C(0,0)) 32,(fst z>l - q/2))) [(x,y)|y<-[p,(p+((o-p)/a))..o],x<-[m,(m + q)..l]] where o=i k;p=i j;m=r j;l=r k;q=(l-m)/b
u j k = concat $ map v $ h j k where v (i,p)=(" .,`'°\":;-+oO0123456789=!%*§&$@#"!!i):rst p;rst True="\n";rst False=""
main = putStrLn $ im 0 where cl n (C (x,y))=let cs=(1.1**n-1) in C ((x+cs*(r e))/cs+1,(y+cs*(i e))/cs+1);bl n=cl n c;tr n=cl n d;im n=u (bl n) (tr n)++"\x1b[H\x1b[25A"++im (n+1)

Copy/paste, do a runghc mandel.hs, enjoy!

Here is the kind of result after 50 iterations:

77777777777777777777777777777777777777777777777666666666666666666666666666666666
77777777777777777777777777777777777777777766665555555555566666666666666666666666                                                                                                     
666777777777777777777777777777666666666665543;4445555555555555555555666666666555
66666666666666666666666666666666666666555554300334555555555555555555555555555555 
6666666666666666666666666666666666665555554431:°33345555555555555555555555555544
5566666666666666666666666666666666555555554321 ;00O:3455555555555555555444444444
5555666666666666666666666666666655555555554O+++ :o022334444444444444444444444444
5555556666666666666666666666665555555555543210O-+O112333344444444444444444444444
55555555666666666666666666665555555555444333210o`O012333333444444444444444444444
4555555555566666666666666555555555544444333331O+°°,'0233333334444444444444444433
44444445555555556666555555555444444444433333210o-:O01122333333334444444444443333
44444444444444445555444444444444444444333332211O+ -o1112222223333333344433333222
444444444444433331133334444444444444433332221110o"+O0111222222222222222222222222  
34444444443333330OO03333334444444443332222221100O+-oO001122222222221110-O1111122
22333333333332210--01223333333333322222222211000o-°+o00000122222111110o°;o001111
11OO112222222111O;;O111222222211OO111122211000Oo-" :+ooOOOO.O0000000OOo'°oOO0000
0O;+O01122211000O--O00011221110O+;O00000OO +oooo-: :-+oo++";oOO0000Ooo+;;+oooO00
o+"+oO00OO OOOOoo::ooOOOO°OO00Oo+"+ooOooo+;°---",' ,,";--: ;-+oo+ +++;;°°;;-++:;
,° °':°: ` "`".°°  °° "°".  :'",  '°`°":`°` ,,``     .   . .°°'°° ` ..     `'°. 
+-`-oo+oo+'+o+`--°°;-`+o+"+oo+oo-'-++;+++-:,:::"`    °::°° :-;;--,;-; "  " ;-;":
OO"-O0000000000Oo--oO0000000000O-:oO0000Oo::+++;;: ":"-++-';+oooOOoooo-::-oooo++
10;-111222222110O--O011222222111- 01111110oOOOoo-: :-ooooo`:OO000000OO+;;+OOO000
22122222222222110++0112222222222111222222221000O+:,;.O000001111111100Oo:-OO00000
3344444433333332-,°-2333333344444433322222221100o-;oO00011222222221111O'+0111111
444444444444333320023333444444444444433322221110O.:O0011222222222222211-01112222
44444444444444443333444444444444444444333332211O. -o1112222222223333333333322222
44444444445555555555555555444444444444433333210O-"oO1122223333333444444444433333
444555555555666666666666555555555444444433333' '`:+O0233333333444444444444444433

And a link to a more readable code:

http://yannesposito.com/Scratch/en/blog/Haskell-Mandelbrot/

yogsototh

Posted 2011-07-06T16:20:25.333

Reputation: 211

3

J, 70

3 :'try.2>|(y&+&*:)^:32[0 catch.0 end.'"0(1-~15%~i.31)j.~/2-~13%~i.40

Displays members of the set as 1, the rest as 0. Spaces each computed point two characters wide, so as to keep a mostly-square pixel with most fonts.

J B

Posted 2011-07-06T16:20:25.333

Reputation: 9 638

3

QBasic, 222 Characters. Not that short, but QBasic is a pretty verbose language. Also, I updated with a seemingly more correct version

FOR y=1 TO 23
FOR x=1 TO 80
a=0:b=0
c=-2.5+(x/80)*3.5:d=-1+(y/23)*2
FOR i=0 TO 1000
IF a*a+b*b>=4 THEN GOTO E
t=a*a-b*b*c:b=2*a*b+d:a=t
NEXT
E:LOCATE y,x
IF a*a+b*b<4 THEN
?("@")
ELSE
?(" ")
END IF
NEXT
NEXT

Output is as in the following image.

enter image description here

Kibbee

Posted 2011-07-06T16:20:25.333

Reputation: 919

2

SpecBAS 201

I know this one is an old question, but we've been playing with Perlin's ascii brot in the BASIC programming forum, and here's mine - in SpecBAS (which is a kind of Sinclair BASIC interpreter) and it really is just text, and one line of code:

1FOR y=-29TO 30:FOR x=-10TO 89:LET m,r=0:FOR k=0TO 224:LET j=r^2-m^2-2+x/25,m=2*r*m+y/25,r=j,l=k,k=IIF(j^2+m^2>11,225,k):NEXT k:PRINT INK l;"ð";:NEXT x:NEXT y

Output: SpecBAS ascii mandelbrot

ZXDunny

Posted 2011-07-06T16:20:25.333

Reputation: 39

The output should be in ASCII. (And you can write e.g. any Java program in one line.) – flawr – 2015-10-25T21:00:57.487

Highest voted entry was not ASCII. – ZXDunny – 2015-10-26T08:00:15.520

@flawr Ok, here's the "ascii" version (176 bytes) - and the reason I was quite pleased about it being on one line is that it isn't actually Java... 1FOR y=-29TO 30:FOR x=-10TO 89:LET m,r=0:FOR k=0TO 112:LET j=r^2-m^2-2+x/25,m=2*r*m+y/25,r=j,l=k&15,k=IIF(j^2+m^2>11,113,k):NEXT k:PRINT" .:-;!/>)|&IH%*#"(l+1);:NEXT x:NEXT y. – ZXDunny – 2015-10-26T08:46:31.430

You should put that version in the answer. – CalculatorFeline – 2017-05-27T03:28:14.690

1

Befunge, 266 bytes

0>:00p58*`#@_0>:01p78vv$$<
@^+1g00,+55_v# !`\+*9<>4v$
@v30p20"?~^"< ^+1g10,+*8<$
@>p0\>\::*::882**02g*0v >^
`*:*" d":+*:-*"[Z"+g3 < |<
v-*"[Z"+g30*g20**288\--\<#
>2**5#>8*:*/00g"P"*58*:*v^
v*288 p20/**288:+*"[Z"+-<:
>*%03 p58*:*/01g"3"* v>::^
   \_^#!:-1\+-*2*:*85<^

Try it online!

This is a Mandelbrot renderer that I implemented a couple of years ago for a Rosetta Code submission. Since Befunge has no floating point, it uses a form of 14-bit fixed point arithmetic emulated with integer operations. It has a maximum of 94 iterations with the ASCII character set as the "palette".

This was originally implemented with portability in mind rather than size, but it should still be reasonably well golfed as it is.

Sample Output

ASCII art Mandelbrot rendering

James Holderness

Posted 2011-07-06T16:20:25.333

Reputation: 8 298

1

c++-11 -- 298 characters

Fully golfed, unparameterized version that does only what is required:

#include <complex>
#include <iostream>
#define C complex<float>
using namespace std;int main(void){C p(-2,1),q(1,-1);char i,j,k;
for(j=0;j<30;++j){for(i=0;i<80;++i){C r=q-p,c((i+0.5)*r.real()/
81+p.real(),(j+0.5)*r.imag()/31+p.imag());r=0;k=64;while
(abs(r)<=2&&(--k!=32))r=r*r+c;cout<<k;}cout<<endl;}}

The implementation is completely unremarkable. Just seeing what can be done using the native complex time (which is, alas, a little wordy).

Ungolfed and parameterized so that it can do regions

#include <complex>
#include <iostream>
using namespace std;
void M/*andlebrot*/(ostream& o, 
            complex<float> p, complex<float> q, 
            int l, int h) {
  char i,j,k;
  for(j=0; j<h; ++j){
    for(i=0; i<l; ++i){
      complex<float> r=q-p,c((i+0.5)*r.real()/(l+1)+p.real(), 
                 (j+0.5)*r.imag()/(h+1)+p.imag() );
      r=0;
      k='@';
      while(abs(r)<=2&&(--k!=' ')){
        r=r*r+c;
      }
      o<<k;
    }
    o<<endl;
  }
}

int main(int argc, char*argv[]){
  M(cout,complex<float>(-2.15,1.25),complex<float>(0.65,-1.25),80,30);
}

Output

$ g++-fsf-4.7  mandelbrot_golf.cc --std=c++11
$ ./a.out
???????>>>>>>=====================<<<<<<<<<;;;;:974048:;<<<<<<======>>>>>>>>>>>>
??????>>>>>=====================<<<<<<<<<<;;;:9872  '89:;;<<<<<<======>>>>>>>>>>
?????>>>>=====================<<<<<<<<<<;;;::8$ /#  &349:;;;;<<<<=======>>>>>>>>
????>>>=====================<<<<<<<<<;;::::9986-     *589::;;;;<<<========>>>>>>
????>>====================<<<<<<<<;;;9988998775/      57889::::9;<<========>>>>>
???>>===================<<<<<<;;;;;:96$.355 &()         2$28887,8:;<========>>>>
??>>==================<<<<;;;;;;;::987.                    2$   )9;<<========>>>
??>================<<<;;;;;;;;;::::8753+                       '8:;;<<========>>
?>=============<<<;::::;;;;;::::997                            589:;<<=========>
?>========<<<<<;;;:85899987999998861%                           (54;<<<========>
?=====<<<<<<<;;;;::8 03564&46677763!                             28:<<<=========
>==<<<<<<<<;;;;;::9873  ,   '  554#                              69;<<<<========
==<<<<<<<<;;;;;:998$3,          00                              -3:;<<<<========
=<<<<<<<;;::::975654)            )                              ,9:;<<<<========
<;;;::99:::999762  #                                            9:;;<<<<========
                                                             /589:;;<<<<========
<;;;::99:::999762  #                                            9:;;<<<<========
=<<<<<<<;;::::975654)            )                              ,9:;<<<<========
==<<<<<<<<;;;;;:998$3,          00                              -3:;<<<<========
>==<<<<<<<<;;;;;::9873  ,   '  554#                              69;<<<<========
?=====<<<<<<<;;;;::8 03564&46677763!                             28:<<<=========
?>========<<<<<;;;:85899987999998861%                           (54;<<<========>
?>=============<<<;::::;;;;;::::997                            589:;<<=========>
??>================<<<;;;;;;;;;::::8753+                       '8:;;<<========>>
??>>==================<<<<;;;;;;;::987.                    2$   )9;<<========>>>
???>>===================<<<<<<;;;;;:96$.355 &()         2$28887,8:;<========>>>>
????>>====================<<<<<<<<;;;9988998775/      57889::::9;<<========>>>>>
????>>>=====================<<<<<<<<<;;::::9986-     *589::;;;;<<<========>>>>>>
?????>>>>=====================<<<<<<<<<<;;;::8$ /#  &349:;;;;<<<<=======>>>>>>>>
??????>>>>>=====================<<<<<<<<<<;;;:9872  '89:;;<<<<<<======>>>>>>>>>>

dmckee --- ex-moderator kitten

Posted 2011-07-06T16:20:25.333

Reputation: 2 726

The parens in the middle add a nice touch :) – Camilo Martin – 2014-01-20T01:17:32.643

I wish I could claim I planned it, but it just happened. I set the character selection to allow the largest range of printables. – dmckee --- ex-moderator kitten – 2014-01-20T01:24:23.483

1

GolfScript - 77

20{40{0.1{.{;..*2$.*\- 20/3$-@@*10/3$-..*2$.*+1600<}*}32*\;\;@@(}60*;(n\}40*;

It can probably be golfed a lot more. The result is an approximation because I have to use integers.

Output:

000000000000000000000000000000000000000010000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000001000000000000000000000000
000000000000000000000000000000000000001000000000000000000000
000000000000000000000000000000000000111000000000000000000000
000000000000000000000000000000000000111110000000000000000000
000000000000000000000000000000000000011100000000000000000000
000000000000000000000000000001000110111100010000000000000000
000000000000000000000000000000100111111111110000000000000000
000000000000000000000000000001011111111111110111000000000000
000000000000000000000000000001111111111111111110000000000000
000000000000000000000000000000111111111111111110000000000000
000000000000001000000000000011111111111111111111000000000000
000000000000000000000000000011111111111111111111000000000000
000000000000000000000000000111111111111111111111000000000000
000000000000000000000000001111111111111111111111100000000000
000000000000000001111110001111111111111111111111100000000000
000000000000000011111111101111111111111111111111100000000000
000000000000100111111111111111111111111111111111000000000000
000000000001101111111111111111111111111111111111000000000000
011111111111111111111111111111111111111111111100000000000000
000000000000001111111111111111111111111111111110000000000000
000000000000000111111111111111111111111111111111000000000000
000000000000000001111111111111111111111111111111100000000000
000000000000000001111111101111111111111111111111000000000000
000000000000000001011100000111111111111111111111100000000000
000000000000000000000100000111111111111111111111000000000000
000000000000000100000000001111111111111111111111100000000000
000000000000000100000000000011111111111111111111000000000000
000000000000000000000000000011111111111111111110000000000000
000000000000000000000000000001111111111111111111000000000000
000000000000000000000000000000111111111111111111000000000000
000000000000000000000000000001101111111111111000000000000000
000000000000000000000000000011000011111110100000000000000000
000000000000000000000000000000000000111100000000000000000000
000000000000000000000000000000000000111110000000000000000000
000000000000000000000000000000000000111100000000000000000000
000000000000000000000000000000000000011000000000000000000000
000000000000000000000000000000000000001000000000000000000000
000000000000000000000000000000000000000000000000000000000000

It takes about 9 more bytes to make it use spaces and stars:

20{40{0.1{.{;..*2$.*\- 20/3$-@@*10/3$-..*2$.*+1600<}*}32*' *'=\;\;@@(}60*;(n\}40*;]''+

aditsu quit because SE is EVIL

Posted 2011-07-06T16:20:25.333

Reputation: 22 326

1

GNU bc, 136 bytes

for(y=-1;y<1;y+=.05){for(x=-2;x<1;x+=.05){for(n=i=r=0;r*r+i*i<4&&++n<32;r=t){t=r*r-i*i+x
i=2*r*i+y}
if(n<32)print n%A else print " "}
2}

Output:

1111112222233333333333333334444445567190 54444333322222222222
11111222233333333333333334444444555780 0765444433333222222222
11111222333333333333333344444445556799 1865544443333322222222
11112223333333333333333444444455561 6  7985554444333332222222
111122333333333333333344444445566784    086555544333333222222
111222333333333333333444444556667797    787665554433333222222
111223333333333333344444455678988903    309866625443333322222
11123333333333333344444555673430   0    203 98897543333332222
11223333333333333444455556672  75          224654544333332222
11233333333333344455555566781                  29554333333222
11233333333333445555555666808                   7654333333222
113333333334445666555666782 5                  37654433333322
123333334444557477778777782                    70254433333322
12333344444556749990198881                        64433333322
13334444445556709 25 51902                      4864433333332
13344444455557795      728                      4054443333332
1344444455557792        6                        854443333332
1444444555672919                                 654443333332
144444666678368                                 8654443333332
1556787778915                                  07654443333332
1                                             387654443333332
1556787778915                                  07654443333332
144444666678368                                 8654443333332
1444444555672919                                 654443333332
1344444455557792        6                        854443333332
13344444455557795      728                      4054443333332
13334444445556709 25 51902                      4864433333332
12333344444556749990198881                        64433333322
123333334444557477778777782                    70254433333322
113333333334445666555666782 5                  37654433333322
11233333333333445555555666808                   7654333333222
11233333333333344455555566781                  29554333333222
11223333333333333444455556672  75          224654544333332222
11123333333333333344444555673430   0    203 98897543333332222
111223333333333333344444455678988903    309866625443333322222
111222333333333333333444444556667797    787665554433333222222
111122333333333333333344444445566784    086555544333333222222
11112223333333333333333444444455561 6  7985554444333332222222
11111222333333333333333344444445556799 1865544443333322222222
11111222233333333333333334444444555780 0765444433333222222222

Digital Trauma

Posted 2011-07-06T16:20:25.333

Reputation: 64 644

1

Perl -- 193 characters

$Y=-1.2;for(0..24){$X=-2;for(0..79){($r,$i)=(0,0);for(0..15){$n=$_;$r=($x=$ r)*$x-($y=$i)*$y+$X;$i=2*$x*$y+$Y;$x*$x+$y*$y>4&&last}print unpack("\@$n a" ,".,:;=+itIYVXRBM ");$X+=3/80}$Y+=2.4/25}

Result

,,,,,,,,,,,::::::::::::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::::::::::::::::::::
,,,,,,,,,:::::::::;;;;;;;;;;;;;;;;;;;;;;======+iRV+++====;;;;;;:::::::::::::::::
,,,,,,,,::::::;;;;;;;;;;;;;;;;;;;;;;========+++itVXYYRi======;;;;;;:::::::::::::
,,,,,,:::::;;;;;;;;;;;;;;;;;;;;;;=========++++ttIR  VIt+++=====;;;;;;;::::::::::
,,,,,::::;;;;;;;;;;;;;;;;;;;;==========+++iitIX        ti++++====;;;;;;;::::::::
,,,,:::;;;;;;;;;;;;;;;;;;;=========++ittttttIYX       VIItiiiii++==;;;;;;;::::::
,,,::;;;;;;;;;;;;;;;;;;======+++++iit     R               RY XX Y++=;;;;;;;;::::
,,::;;;;;;;;;;;;;;;;===+++++++++iiitIVB                        Mti++=;;;;;;;;:::
,,:;;;;;;;;;;;====+XtiiiiiiiiiittIYM                           RIti+==;;;;;;;;::
,:;;;;;=======+++iiI XVVYV VYYIIYYB                               t+===;;;;;;;;:
,;;========++++++ttIY          MRB                               Mi+===;;;;;;;;;
,========+++iiiIRYYX                                             t++====;;;;;;;;
,++iitYttttIIIVXM                                              Yti++====;;;;;;;;
,++iitYttttIIIVXM                                              Yti++====;;;;;;;;
,========+++iiiIRYYX                                             t++====;;;;;;;;
,;;========++++++ttIY          MRB                               Mi+===;;;;;;;;;
,:;;;;;=======+++iiI XVVYV VYYIIYYB                               t+===;;;;;;;;:
,,:;;;;;;;;;;;====+XtiiiiiiiiiittIYM                           RIti+==;;;;;;;;::
,,::;;;;;;;;;;;;;;;;===+++++++++iiitIVB                        Mti++=;;;;;;;;:::
,,,::;;;;;;;;;;;;;;;;;;======+++++iit     R               RY XX Y++=;;;;;;;;::::
,,,,:::;;;;;;;;;;;;;;;;;;;=========++ittttttIYX       VIItiiiii++==;;;;;;;::::::
,,,,,::::;;;;;;;;;;;;;;;;;;;;==========+++iitIX        ti++++====;;;;;;;::::::::
,,,,,,:::::;;;;;;;;;;;;;;;;;;;;;;=========++++ttIR  VIt+++=====;;;;;;;::::::::::
,,,,,,,,::::::;;;;;;;;;;;;;;;;;;;;;;========+++itVXYYRi======;;;;;;:::::::::::::
,,,,,,,,,:::::::::;;;;;;;;;;;;;;;;;;;;;;======+iRV+++====;;;;;;:::::::::::::::::

I think it won the obfuscated perl contest a few years ago.

stackman

Posted 2011-07-06T16:20:25.333

Reputation: 291

1So it's not yours? Might be good to say who's it from. – Camilo Martin – 2014-01-20T01:16:50.643

1

Python, 115.

r=range
for _ in r(-11,12):
 for f in r(-39,41):
  v=u=f/22.-_/11j;exec"u=u*u+v;"*40;print"\b"+chr(32+(u.real<4)),

Works only on 80x24 terminals, but you can add print after first for to fix it.

Sample output (With additional print instruction.):

                                       !                                        

                                   !!!                                          
                                  !!!!!                                         
                            !  ! !!!!!!!! !                                     
                           !!!!!!!!!!!!!!!!! !!                                 
                        ! !!!!!!!!!!!!!!!!!!!!!                                 
                        !!!!!!!!!!!!!!!!!!!!!!!                                 
              !  !      !!!!!!!!!!!!!!!!!!!!!!!!                                
            !!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!                                
            !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!                                 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!                                   
            !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!                                 
            !!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!                                
              !  !      !!!!!!!!!!!!!!!!!!!!!!!!                                
                        !!!!!!!!!!!!!!!!!!!!!!!                                 
                        ! !!!!!!!!!!!!!!!!!!!!!                                 
                           !!!!!!!!!!!!!!!!! !!                                 
                            !  ! !!!!!!!! !                                     
                                  !!!!!                                         
                                   !!!                                          

                                       !                                        

init

Posted 2011-07-06T16:20:25.333

Reputation: 11

1

CJam, 52 bytes

80,Kdf/2f-_m*{_{_~*2*[\2f#~-\]1$.+}9*\;~mh4<}%80/zN*

Explanation:

80,Kdf/2f-                                             Push [-2, -1.95, ..., 1.95]
          _m*                                          Cartesian product with itself
             {                              }%         Map over each pair [cx, cy]:
              _                                          Push a copy [zx, zy]
               {                  }9*                    Iterate nine times:
                _~*2*                                      Push 2*zx*zy
                     [\2f#~-\]                             Make a pair with zx^2-zy^2
                              1$.+                         Push [cx, cy] and sum vectors
                                     \;                  Destroy [cx, cy]
                                       ~mh               Calculate sqrt(zx^2+zy^2)
                                          4<             1 if bounded, 0 if not
                                              80/      Split into rows of 80 booleans
                                                 z     Transpose this matrix
                                                  N*   Join rows with newlines

Lynn

Posted 2011-07-06T16:20:25.333

Reputation: 55 648

1

Matlab, 96

[x,y,q]=ndgrid(-1:.03:1,-2:.01:.5,32);c=i*x+y;z=q*0;for i=1:100;z=z.^2+c;end;[q+3*(abs(z)<2),'']


                                                                                                                                                                                                        #                                                  



                                                                                                                                                                                            ##                                                             
                                                                                                                                                                                           #####                                                           
                                                                                                                                                                                      #############                                                        
                                                                                                                                                                                    ##################                                                     
                                                                                                                                                                                   ###################                                                     
                                                                                                                                                                                  ####################                                                     
                                                                                                                                                                                   ##################                                                      
                                                                                                                                                                                     #############                                                         
                                                                                                                                                                          ##  ########################## #   #                                             
                                                                                                                                                  ##    #         ################################################ ####                                    
                                                                                                                                                  #########  # #########################################################  #        #                       
                                                                                                                                                 ######### ##################################################################    ########                  
                                                                                                                                                       ##################################################################################                  
                                                                                                                                              #   #####################################################################################                    
                                                                                                                                              # ##################################################################################### #                    
                                                                                                                                        #### ########################################################################################### #                 
                                                                                                                                         # ############################################################################################## #                
                                                                                                                                       ####################################################################################################                
                                                                                                                                    ##############################################################################################################         
                                                                                                                                     ########################################################################################################              
                                                                                                    #                           ##############################################################################################################             
                                                                                    #####     ############ ###                    ############################################################################################################             
                                                                                    ##############################               ################################################################################################################          
                                                                                   ###################################         ###############################################################################################################             
                                                                              ## #######################################       ################################################################################################################            
                                                                               ###########################################    ############################################################################################################### #            
                                                                             ###############################################  ################################################################################################################             
                                                                           ################################################## #############################################################################################################                
                                                                 #########  ################################################# ###########################################################################################################                  
                        ##                                   ## ####################################################################################################################################################################                       
                                                                ######################################################################################################################################################################                     
                                                                 ########   ################################################# ###########################################################################################################                  
                                                                             ###############################################  #############################################################################################################                
                                                                            ################################################  ##############################################################################################################               
                                                                                #########################################      ################################################################################################################            
                                                                             # #  ######################################       ###############################################################################################################             
                                                                                     ################################           ##############################################################################################################             
                                                                                    ##### #####################  #              #################################################################################################################          
                                                                                     ####     #    ###   #   #                     ############################################################################################################            
                                                                                                                              # ### #########################################################################################################              
                                                                                                                                     ####################################################################################################### ###           
                                                                                                                                  # ## ##########################################################################################################          
                                                                                                                                       # ##################################################################################################                
                                                                                                                                        ###################################################################################################                
                                                                                                                                       #################################################################################################                   
                                                                                                                                               ######################################################################################                      
                                                                                                                                                   #####################################################################################                   
                                                                                                                                                   ############################################################################ #########                  
                                                                                                                                                ########## ################################################################ #    #########                 
                                                                                                                                                   #######     ## #################################################### #                                   
                                                                                                                                                                   ########################################### ##  #####                                   
                                                                                                                                                                         ##    # #   #### #### ## ###     #                                                
                                                                                                                                                                                     ###############                                                       
                                                                                                                                                                                  ####################                                                     
                                                                                                                                                                                  #####################                                                    
                                                                                                                                                                                   ###################                                                     
                                                                                                                                                                                  ################## #                                                     
                                                                                                                                                                                       #########                                                           
                                                                                                                                                                                           #####                                                           
                                                                                                                                                                                             #                                                             

flawr

Posted 2011-07-06T16:20:25.333

Reputation: 40 560

0

Python 3, 185 bytes

Translation from perl (193) with some improvements

Y=-1.2
r=range
for _ in r(25):
 X=-2
 for _ in r(80):
  r=i=0
  for n in r(16):
   r,i=r*r-i*i+X,2*r*i+Y
   if r*r+i*i>4:break
  print(".,:;=+itIYVXRBM "[n],end='')
  X+=3/80
 Y+=2.4/25

AMK

Posted 2011-07-06T16:20:25.333

Reputation: 506

0

Brainf***, 11595 bytes

+++++++++++++[->++>>>+++++>++>+<<<<<<]>>>>>++++++>--->>>>>>>>>>+++++++++++++++[[
>>>>>>>>>]+[<<<<<<<<<]>>>>>>>>>-]+[>>>>>>>>[-]>]<<<<<<<<<[<<<<<<<<<]>>>>>>>>[-]+
<<<<<<<+++++[-[->>>>>>>>>+<<<<<<<<<]>>>>>>>>>]>>>>>>>+>>>>>>>>>>>>>>>>>>>>>>>>>>
>+<<<<<<<<<<<<<<<<<[<<<<<<<<<]>>>[-]+[>>>>>>[>>>>>>>[-]>>]<<<<<<<<<[<<<<<<<<<]>>
>>>>>[-]+<<<<<<++++[-[->>>>>>>>>+<<<<<<<<<]>>>>>>>>>]>>>>>>+<<<<<<+++++++[-[->>>
>>>>>>+<<<<<<<<<]>>>>>>>>>]>>>>>>+<<<<<<<<<<<<<<<<[<<<<<<<<<]>>>[[-]>>>>>>[>>>>>
>>[-<<<<<<+>>>>>>]<<<<<<[->>>>>>+<<+<<<+<]>>>>>>>>]<<<<<<<<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CCCCCCCCCCCCCDDDDDDDDDDDDDDEEEEEEFGGHHIKPPKIHGFFEEEDDDDDDDDDCCCCCCCCCCBBBBBBBBBBBBBBBBBB
AAAAAAAAAABBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDEEEEEEFFGHIJKS  X KHHGFEEEEEDDDDDDDDDCCCCCCCCCCBBBBBBBBBBBBBBBB
AAAAAAAAABBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDEEEEEEFFGQPUVOTY   ZQL[MHFEEEEEEEDDDDDDDCCCCCCCCCCCBBBBBBBBBBBBBB
AAAAAAAABBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDEEEEEFFFFFGGHJLZ         UKHGFFEEEEEEEEDDDDDCCCCCCCCCCCCBBBBBBBBBBBB
AAAAAAABBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDEEEEFFFFFFGGGGHIKP           KHHGGFFFFEEEEEEDDDDDCCCCCCCCCCCBBBBBBBBBBB
AAAAAAABBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDDDDDDDEEEEEFGGHIIHHHHHIIIJKMR        VMKJIHHHGFFFFFFGSGEDDDDCCCCCCCCCCCCBBBBBBBBB
AAAAAABBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDDDDDDEEEEEEFFGHK   MKJIJO  N R  X      YUSR PLV LHHHGGHIOJGFEDDDCCCCCCCCCCCCBBBBBBBB
AAAAABBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDDDEEEEEEEEEFFFFGH O    TN S                       NKJKR LLQMNHEEDDDCCCCCCCCCCCCBBBBBBB
AAAAABBCCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDEEEEEEEEEEEEFFFFFGHHIN                                 Q     UMWGEEEDDDCCCCCCCCCCCCBBBBBB
AAAABBCCCCCCCCCCCCCCCCCCCCCCCCCDDDDEEEEEEEEEEEEEEEFFFFFFGHIJKLOT                                     [JGFFEEEDDCCCCCCCCCCCCCBBBBB
AAAABCCCCCCCCCCCCCCCCCCCCCCDDDDEEEEEEEEEEEEEEEEFFFFFFGGHYV RQU                                     QMJHGGFEEEDDDCCCCCCCCCCCCCBBBB
AAABCCCCCCCCCCCCCCCCCDDDDDDDEEFJIHFFFFFFFFFFFFFFGGGGGGHIJN                                            JHHGFEEDDDDCCCCCCCCCCCCCBBB
AAABCCCCCCCCCCCDDDDDDDDDDEEEEFFHLKHHGGGGHHMJHGGGGGGHHHIKRR                                           UQ L HFEDDDDCCCCCCCCCCCCCCBB
AABCCCCCCCCDDDDDDDDDDDEEEEEEFFFHKQMRKNJIJLVS JJKIIIIIIJLR                                               YNHFEDDDDDCCCCCCCCCCCCCBB
AABCCCCCDDDDDDDDDDDDEEEEEEEFFGGHIJKOU  O O   PR LLJJJKL                                                OIHFFEDDDDDCCCCCCCCCCCCCCB
AACCCDDDDDDDDDDDDDEEEEEEEEEFGGGHIJMR              RMLMN                                                 NTFEEDDDDDDCCCCCCCCCCCCCB
AACCDDDDDDDDDDDDEEEEEEEEEFGGGHHKONSZ                QPR                                                NJGFEEDDDDDDCCCCCCCCCCCCCC
ABCDDDDDDDDDDDEEEEEFFFFFGIPJIIJKMQ                   VX                                                 HFFEEDDDDDDCCCCCCCCCCCCCC
ACDDDDDDDDDDEFFFFFFFGGGGHIKZOOPPS                                                                      HGFEEEDDDDDDCCCCCCCCCCCCCC
ADEEEEFFFGHIGGGGGGHHHHIJJLNY                                                                        TJHGFFEEEDDDDDDDCCCCCCCCCCCCC
A                                                                                                 PLJHGGFFEEEDDDDDDDCCCCCCCCCCCCC
ADEEEEFFFGHIGGGGGGHHHHIJJLNY                                                                        TJHGFFEEEDDDDDDDCCCCCCCCCCCCC
ACDDDDDDDDDDEFFFFFFFGGGGHIKZOOPPS                                                                      HGFEEEDDDDDDCCCCCCCCCCCCCC
ABCDDDDDDDDDDDEEEEEFFFFFGIPJIIJKMQ                   VX                                                 HFFEEDDDDDDCCCCCCCCCCCCCC
AACCDDDDDDDDDDDDEEEEEEEEEFGGGHHKONSZ                QPR                                                NJGFEEDDDDDDCCCCCCCCCCCCCC
AACCCDDDDDDDDDDDDDEEEEEEEEEFGGGHIJMR              RMLMN                                                 NTFEEDDDDDDCCCCCCCCCCCCCB
AABCCCCCDDDDDDDDDDDDEEEEEEEFFGGHIJKOU  O O   PR LLJJJKL                                                OIHFFEDDDDDCCCCCCCCCCCCCCB
AABCCCCCCCCDDDDDDDDDDDEEEEEEFFFHKQMRKNJIJLVS JJKIIIIIIJLR                                               YNHFEDDDDDCCCCCCCCCCCCCBB
AAABCCCCCCCCCCCDDDDDDDDDDEEEEFFHLKHHGGGGHHMJHGGGGGGHHHIKRR                                           UQ L HFEDDDDCCCCCCCCCCCCCCBB
AAABCCCCCCCCCCCCCCCCCDDDDDDDEEFJIHFFFFFFFFFFFFFFGGGGGGHIJN                                            JHHGFEEDDDDCCCCCCCCCCCCCBBB
AAAABCCCCCCCCCCCCCCCCCCCCCCDDDDEEEEEEEEEEEEEEEEFFFFFFGGHYV RQU                                     QMJHGGFEEEDDDCCCCCCCCCCCCCBBBB
AAAABBCCCCCCCCCCCCCCCCCCCCCCCCCDDDDEEEEEEEEEEEEEEEFFFFFFGHIJKLOT                                     [JGFFEEEDDCCCCCCCCCCCCCBBBBB
AAAAABBCCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDEEEEEEEEEEEEFFFFFGHHIN                                 Q     UMWGEEEDDDCCCCCCCCCCCCBBBBBB
AAAAABBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDDDEEEEEEEEEFFFFGH O    TN S                       NKJKR LLQMNHEEDDDCCCCCCCCCCCCBBBBBBB
AAAAAABBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDDDDDDEEEEEEFFGHK   MKJIJO  N R  X      YUSR PLV LH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BBBBBBBBBBBBBB
AAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDDDDDEEEFGIIGFFEEEDDDDDDDDCCCCCCCCCBBBBBBBBBBBBBBBBBBBBBBBBBB

And this is why you use automatic Markdown code formatters. Originally written by Erik Bosman.

MD XF

Posted 2011-07-06T16:20:25.333

Reputation: 11 605

Given that this answer was copied directly from an outside source, please give credit to the original author. – Doorknob – 2017-05-27T01:18:37.003

@Doorknob It wasn't copied directly from anywhere, it's a very popular program and I can't find who originally wrote it. (buf if you have the link/name I'll be happy to put it in) – MD XF – 2017-05-27T01:21:42.247

It was written by Erik Bosman; I believe this is the original source.

– Doorknob – 2017-05-27T01:59:03.807

0

;#, 150,878 bytes (noncompeting)

It doesn't fit here :(

Output:

         !!!!!!!!"""""""""""""""""""""""""""##########$$$$%%&(.)(*2%$#######""""""""!!!!!!!!!!!!!!!!!
        !!!!!!!"""""""""""""""""""""""""""###########$$$$%%&'(*0+('&%$$#######""""""""!!!!!!!!!!!!!!!
       !!!!!!""""""""""""""""""""""""""############$$$$$%&(**-:::1('&%$$$#######""""""""!!!!!!!!!!!!!
      !!!!!""""""""""""""""""""""""""############$$$%%%&'(+:::::::02*&%$$$$$######""""""""!!!!!!!!!!!
      !!!"""""""""""""""""""""""""############$$%%%%%&&&'(4:::::::8:'&&%%%$$$$$####"""""""""!!!!!!!!!
     !!!""""""""""""""""""""""""##########$$$%&&'2''''(())+7::::::1*)(('&%%%%%'&$###"""""""""!!!!!!!!
    !!!"""""""""""""""""""""""#######$$$$$$%%&(-:0/+*,::2::::::::::::5:::('''(.+&%$##"""""""""!!!!!!!
   !!""""""""""""""""""""""#####$$$$$$$$$%%%&&(*3:::7:::::::::::::::::::::,::8:1)%$$##""""""""""!!!!!
   !""""""""""""""""""""####$$$$$$$$$$$%%%%&'()*.8::::::::::::::::::::::::::::56&%$$###""""""""""!!!!
  !!""""""""""""""""####$%%%$$$$$$$$%%%%%&'):8:5:::::::::::::::::::::::::::::0*(&%%$$##""""""""""!!!!
  !"""""""""""######$$%%(+'&&&&&&&&&&&&&&''),3:::::::::::::::::::::::::::::::::+(()%$###""""""""""!!!
 !"""""""#########$$$$%%)3*()(()4+(('''''(*9::::::::::::::::::::::::::::::::::::::*%$###"""""""""""!!
 !"""##########$$$$$$%%&'(*/:7.13::/:+*))*-:::::::::::::::::::::::::::::::::::::,(&%$####""""""""""!!
 ""##########$$$$$$$%&&&()+0:::::::::::2,,0:::::::::::::::::::::::::::::::::::::::&$$####"""""""""""!
 "#########$$$$$$$%(''((*0:::::::::::::::1::::::::::::::::::::::::::::::::::::::,'%$$#####""""""""""!
 ########$%%%%%%&&'(+.,..5::::::::::::::::::::::::::::::::::::::::::::::::::::::'%%$$#####""""""""""!
 $$$%%&&(&&'''''(,*+.:::::::::::::::::::::::::::::::::::::::::::::::::::::::::*'&%$$$#####""""""""""!
 $$&%%'):)('))((),,,9::::::::::::::::::::::::::::::::::::::::::::::::::::::::,('&%$$$#####""""""""""!
 ##$$$##$%%%%%%&&&'(*8181::::::::::::::::::::::::::::::::::::::::::::::::::::::*&%$$$#####""""""""""!
 "#########$$$$%%%&(+(()*.:::::::::::::::4:::::::::::::::::::::::::::::::::::::::&%$$#####""""""""""!
 ""##########$$$$$$$%&&'+*-2::::::::::::..4::::::::::::::::::::::::::::::::::::::/&$$####"""""""""""!
 """"##########$$$$$$%&&'(*2::4::::::0.**+-:::::::::::::::::::::::::::::::::::::,(&%$####"""""""""""!
 !"""""##########$$$$%%&'-3.-*)*-:+)8(((()*.:::::::::::::::::::::::::::::::::::::,'%$####""""""""""!!
  !"""""""""#######$$$%%'4''&&&')('&&&&&''(+/::::::::::::::::::::::::::::::::::-5+-%$###""""""""""!!!
  !"""""""""""""""####$%&%%%%%%$$$%%%%%&&&')::::::::::::::::::::::::::::::::::.('&%$$###""""""""""!!!
   !"""""""""""""""""""###$$$$$$$$$$$$%%%%%&(-*-1:::::::::::::::::::::::::::::/(&%$$###""""""""""!!!!
   !!"""""""""""""""""""""#####$$$$$$$$$%%%%&'(+::::::::::::::::::::::::::0::::,7%$$##""""""""""!!!!!
    !!"""""""""""""""""""""""#######$$$$$$%%%&*:::4:+-::::::::::::::::::.)):7)+,(%$##""""""""""!!!!!!
    !!!""""""""""""""""""""""""##########$$$%&:)2/)(((+,*+,/::::::/,+))5(&&&&&'+%$##""""""""""!!!!!!!
     !!!!"""""""""""""""""""""""""###########$$%%%%%&&&''),::::::::8('&&%%%%$$$$###"""""""""!!!!!!!!!
      !!!!""""""""""""""""""""""""""############$$$%%%%&'(+::::::::-(&%%$$$$$#####"""""""""!!!!!!!!!!
       !!!!!""""""""""""""""""""""""""############$$$$$%%)+2,/:::,**'%$$$$#######""""""""!!!!!!!!!!!!
        !!!!!!"""""""""""""""""""""""""""###########$$$$$%&&'),:,)'&%$$$#######""""""""!!!!!!!!!!!!!!
         !!!!!!!!""""""""""""""""""""""""""###########$$$$%&'(.,,-*%%$#######"""""""!!!!!!!!!!!!!!!!!

MD XF

Posted 2011-07-06T16:20:25.333

Reputation: 11 605

You don't need this much detail. – Rɪᴋᴇʀ – 2017-05-27T01:53:49.490

0

TI-BASIC, 256

PROGRAM:M
:Input "ITER. ",D
:For(A,Xmin,Xmax,ΔX)
:For(B,Ymin,Ymax,ΔY)
:0→X
:0→Y
:0→I
:D→M
:While X^2+Y^2≤4 and I<M
:X^2-Y^2+A→R
:2XY+B→Y
:R→X
:I+1→I
:End
:If I≠M
:Then
:I→C
:Else
:0→C
:End
:If C<1
:Pt-On(A,B)
:End
:End
:End

MD XF

Posted 2011-07-06T16:20:25.333

Reputation: 11 605

Source. – MD XF – 2017-05-27T00:18:00.037

Since you've taken the code from elsewhere you should probably make this answer a Community Wiki. – Post Rock Garf Hunter – 2017-05-27T00:37:49.793

1@WheatWizard I remember Dennis saying on TNB last night that doing so is unnecessary. – MD XF – 2017-05-27T00:38:22.473

1It is not necessary. There will not probably not be any repercussions for not doing it. I'm just suggesting it because I think its the right thing to do. Its ultimately your choice. – Post Rock Garf Hunter – 2017-05-27T00:40:38.133

1@WheatWizard I guess it is a bit douchey to possibly get rep for something I didn't write. But there's a meta post by DJ talking about how CW isn't a rep waiver. – MD XF – 2017-05-27T00:41:38.457

I definitely agree that community wiki is not a rep waiver. The only thing I'd change here is including the link to the source in the answer (as comments are not guaranteed to stay around) – trichoplax – 2018-09-19T18:38:54.100

0

c++ (260)

Golfed Code:

#include<iostream>
void main(){for(float i=-1;i<=1;i+=0.03125){for(float r=-2;r<=1;r+=.03125){float zr=r,zi=i;for(int n=0;n<31;n++){float nzr=zr*zr-zi*zi;zi=zr*zi*2;zr=nzr;zr+=r;zi+=i;}if(zi*zi+zr*zr<4){std::cout<<"*";}else{std::cout<<" ";}}std::cout<<"\n";}}

Example output:

                                                               *



                                                           **
                                                          ***
                                                        ****** *
                                                        *******
                                                        ********
                                                        *******
                                                         *****
                                             *     *    * ***    * *
                                                   *************** *
                                              *** ******************
                                              ***********************  ***
                                              ****************************
                                          *   ****************************
                                          *  ****************************
                                          ********************************
                                           ********************************
                                          *********************************  *
                                         *************************************
                                         ************************************
                          *   **        ***********************************
                          ** ******     ************************************
                          **********    *************************************
                         *************  ************************************
                        **************  ************************************
                        *************** ***********************************
                        ***************************************************
                    ******************************************************
                    ******************************************************
************************************************************************
                    ******************************************************
                    ******************************************************
                        ***************************************************
                        *************** ***********************************
                        **************  ************************************
                         *************  ************************************
                          **********    *************************************
                          ** ******     ************************************
                          *   **        ***********************************
                                         ************************************
                                         *************************************
                                          *********************************  *
                                           ********************************
                                          ********************************
                                          *  ****************************
                                          *   ****************************
                                              ****************************
                                              ***********************  ***
                                              *** ******************
                                                   *************** *
                                             *     *    * ***    * *
                                                         *****
                                                        *******
                                                        ********
                                                        *******
                                                        ****** *
                                                          ***
                                                           **



                                                               *

kitcar2000

Posted 2011-07-06T16:20:25.333

Reputation: 2 689

you included math for sqrt(x^2+y^2) < 2. You can compare with 4 and remove the sqrt and the include. – ilmale – 2014-04-22T00:58:01.437

0

Python 444

print (lambda Ru,Ro,Iu,Io,IM,Sx,Sy:reduce(lambda x,y:x+y,map(lambda y,Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,Sy=Sy,L=lambda yc,Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,i=IM,Sx=Sx,Sy=Sy:reduce(lambda x,y:x+y,map(lambda x,xc=Ru,yc=yc,Ru=Ru,Ro=Ro,i=i,Sx=Sx,F=lambda xc,yc,x,y,k,f=lambda xc,yc,x,y,k,f:(k<=0)or (x*x+y*y>=4.0) or 1+f(xc,yc,x*x-y*y+xc,2.0*x*y+yc,k-1,f):f(xc,yc,x,y,k,f):chr(64+F(Ru+x*(Ro-Ru)/Sx,yc,0,0,i)),range(Sx))):L(Iu+y*(Io-Iu)/Sy),range(Sy))))(-2.1, 0.7, -1.2, 1.2, 30, 80, 24)

Here's one from the python developers,
which though isn't really short,
is one line which is pretty boss.

Anti Earth

Posted 2011-07-06T16:20:25.333

Reputation: 151

0

Minkolang 0.9, 77 74 bytes (INVALID)

This answer is invalid because the language was created well after this challenge, but I'm posting it so that there's a solution in this language. Making it pretty shaved off 3 bytes woo!

1~12$:;56*[i53*$:1-0c*99*[di39*$:2-+048*[d$~2`9&d*2c+]02@ik" "+Oxx]25*Ox].

Try it here.

Output

!!!!!!!!""""""######################$$$$$$$$%%%&&(,**+ %$$$$$$######"""""""""""""
!!!!!!!"""""######################$$$$$$$$$%%%%''(*3+)'&%%$$$$$$######"""""""""""
!!!!!!""""#####################$$$$$$$$$$%%%%&(*--? 5+)(&%%%$$$$$#######"""""""""
!!!!!""""####################$$$$$$$$$$%%&&&&'(,      2)'&%%%%%$$$#######""""""""
!!!!"""####################$$$$$$$$$%%&&&&'''()-      /)('&&&&&%%$$$#######""""""
!!!!""###################$$$$$$$%%%%&)1//))+ ,202    3/.+. ('''(/&%$########"""""
!!!""##################$$$$$%%%%%%&&'),   /               4 +00.2+%%$########""""
!!""################$$$%%%%%%%%%&&&'()+6                        +'&%$$########"""
!!"##############$$%%&%%%%%%%%&&&''2 62                       5,)'&%%$$########""
!!#########$$$$$%%&'.('''''''''''((*/                           ,)+&%$$#########"
!"#####$$$$$$$%%%%&(-,+/)*3+)*(())+                               2&%$$$########"
!###$$$$$$$$%%%%%&'')+1 <56  ;/,++.                              +(&%$$$#########
!#$$$$$$$$%%%%%%&'')+.5         ;/4                              4)&%$$$$########
!$$$$$$$$%%&&&'(4*)+/                                           :=&%%$$$$########
!$%%%%&'&&&&''()+6; 7                                           )'&%%$$$$########
                                                             ?-)'&&%%$$$$########
!$%%%%&'&&&&''()+6; 7                                           )'&%%$$$$########
!$$$$$$$$%%&&&'(4*)+/                                           :=&%%$$$$########
!#$$$$$$$$%%%%%%&'')+.5         ;/4                              4)&%$$$$########
!###$$$$$$$$%%%%%&'')+1 <56  ;/,++.                              +(&%$$$#########
!"#####$$$$$$$%%%%&(-,+/)*3+)*(())+                               2&%$$$########"
!!#########$$$$$%%&'.('''''''''''((*/                           ,)+&%$$#########"
!!"##############$$%%&%%%%%%%%&&&''2 62                       5,)'&%%$$########""
!!""################$$$%%%%%%%%%&&&'()+6                        +'&%$$########"""
!!!""##################$$$$$%%%%%%&&'),   /               4 +00.2+%%$########""""
!!!!""###################$$$$$$$%%%%&)1//))+ ,202    3/.+. ('''(/&%$########"""""
!!!!"""####################$$$$$$$$$%%&&&&'''()-      /)('&&&&&%%$$$#######""""""
!!!!!""""####################$$$$$$$$$$%%&&&&'(,      2)'&%%%%%$$$#######""""""""
!!!!!!""""#####################$$$$$$$$$$%%%%&(*--? 5+)(&%%%$$$$$#######"""""""""
!!!!!!!"""""######################$$$$$$$$$%%%%''(*3+)'&%%$$$$$$######"""""""""""

Explanation

This takes advantage of Python's internal handling of complex numbers, so I can just do 1~12$:; (the equivalent of (-1)**0.5 in Python) to get the imaginary unit. Then there are three nested For loops, which loop through y, x, and z=z^2+c. Breaking out of the innermost loop is necessary (and done by d$~2`9&) because otherwise, numbers will get so large that they become (NaN+Nanj), which apparently has a magnitude less than 2.

El'endia Starman

Posted 2011-07-06T16:20:25.333

Reputation: 14 504

0

><>, 118 bytes

1 v
2-\:01-(?;0
*&\0084
?!\}::*{::*$@-}2**}:@@:{+r+::*{::*$@+4(&1-:&*
ao\&~:*$:*+4(}" *"{?$~o1aa+,+:1)22@@?!.~~~1aa+,-

Try it online! Be warned, it takes about 25 seconds to run using TIO, so be patient!

More of a self-challenge than a serious entry. Produces the following output:

                                        *                    

                                     *                       
                                   *  *                      
                                    ****                     
                                    *****                    
                                    ****                     
                             *  * ****** * *                 
                             **  **********                  
                             ******************              
                             ******************              
                           * ******************              
                            *******************              
                          ***********************            
                    *      *********************             
                 * ***    **********************             
                 *******  **********************             
                ********* **********************             
                ********************************             
             **********************************              
 *********************************************               
             **********************************              
                ********************************             
                ********* **********************             
                 *******  **********************             
                 * ***    **********************             
                    *      *********************             
                          ***********************            
                            *******************              
                           * ******************              
                             ******************              
                             ******************              
                             **  **********                  
                             *  * ****** * *                 
                                    ****                     
                                    *****                    
                                    ****                     
                                   *  *                      
                                     *                       

                                        *                    

Sok

Posted 2011-07-06T16:20:25.333

Reputation: 5 592