Skip to main content
edited body
Source Link

JavaScript, 284 283 ...(1112 improvements)... 191 190 188 199 bytes

currenty (2019-10-05) this is shortest js solution (the shortest one before this has 285 bytes)

enter image description hereenter image description here

Expanded

// Fractal calculations c=512; // p has pixels, p+= allways join 4 digit number implicit casted to string // 4 char string interpred as base64 gives 3bytes = 1 RGB pixel for( p=i=''; j=x=y=0,++i<=c*c; p+= j<c ? 9*c+9*j : 'AAAA' ) while( x*x+y*y<4 && ++j-c ) [x,y] = [ x*x-y*y+i%c/128-2, 2*x*y+i/c/128-2 ]; // draw pixels in 512x512 BMP base64 image document.write("<img src=data:;base64,Qk0bAAwAAAAAABsAAAAMAAAAAAIAAgEAGAAA"+p)

After small constans changes

c=512;for(p=i='';j=x=y=0,++i<=c*c;p+=j<c?2*c+9*j:'AAAA')while(x*x+y*y<4&&++j-c)[x,y]=[x*x-y*y+i%c/128-2,2*x*y+i/c/128-2] document.write("<img src=data:;base64,Qk0bAAwAAAAAABsAAAAMAAAAAAIAAgEAGAAA"+p)

JavaScript, 284 283 ...(11 improvements)... 191 190 188 199 bytes

currenty (2019-10-05) this is shortest js solution (the shortest one before this has 285 bytes)

enter image description here

Expanded

// Fractal calculations c=512; // p has pixels, p+= allways join 4 digit number implicit casted to string // 4 char string interpred as base64 gives 3bytes = 1 RGB pixel for( p=i=''; j=x=y=0,++i<=c*c; p+= j<c ? 9*c+9*j : 'AAAA' ) while( x*x+y*y<4 && ++j-c ) [x,y] = [ x*x-y*y+i%c/128-2, 2*x*y+i/c/128-2 ]; // draw pixels in 512x512 BMP base64 image document.write("<img src=data:;base64,Qk0bAAwAAAAAABsAAAAMAAAAAAIAAgEAGAAA"+p)

After small constans changes

c=512;for(p=i='';j=x=y=0,++i<=c*c;p+=j<c?2*c+9*j:'AAAA')while(x*x+y*y<4&&++j-c)[x,y]=[x*x-y*y+i%c/128-2,2*x*y+i/c/128-2] document.write("<img src=data:;base64,Qk0bAAwAAAAAABsAAAAMAAAAAAIAAgEAGAAA"+p)

JavaScript, 284 283 ...(12 improvements)... 191 190 188 199 bytes

currenty (2019-10-05) this is shortest js solution (the shortest one before this has 285 bytes)

enter image description here

Expanded

// Fractal calculations c=512; // p has pixels, p+= allways join 4 digit number implicit casted to string // 4 char string interpred as base64 gives 3bytes = 1 RGB pixel for( p=i=''; j=x=y=0,++i<=c*c; p+= j<c ? 9*c+9*j : 'AAAA' ) while( x*x+y*y<4 && ++j-c ) [x,y] = [ x*x-y*y+i%c/128-2, 2*x*y+i/c/128-2 ]; // draw pixels in 512x512 BMP base64 image document.write("<img src=data:;base64,Qk0bAAwAAAAAABsAAAAMAAAAAAIAAgEAGAAA"+p)

After small constans changes

c=512;for(p=i='';j=x=y=0,++i<=c*c;p+=j<c?2*c+9*j:'AAAA')while(x*x+y*y<4&&++j-c)[x,y]=[x*x-y*y+i%c/128-2,2*x*y+i/c/128-2] document.write("<img src=data:;base64,Qk0bAAwAAAAAABsAAAAMAAAAAAIAAgEAGAAA"+p)

edited body
Source Link

JavaScript, 284 283 ...(11 improvements)... 191 190 188 199 bytes

currenty (2019-10-05) this is shortest js solution (the shortest one before this has 285 bytes)

enter image description here

Expanded

// Fractal calculations c=512; // p has pixels, p+= allways join 4 digit number implicit casted to string // 4 char string interpred as base64 gives 3bytes = 1 RGB pixel for( p=i=''; j=x=y=0,++i<=c*c; p+= j<c ? 9*c+9*j : 'MAMA''AAAA' ) while( x*x+y*y<4 && ++j-c ) [x,y] = [ x*x-y*y+i%c/128-2, 2*x*y+i/c/128-2 ]; // draw pixels in 512x512 BMP base64 image document.write("<img src=data:;base64,Qk0bAAwAAAAAABsAAAAMAAAAAAIAAgEAGAAA"+p)

After small constans changes

c=512;for(p=i='';j=x=y=0,++i<=c*c;p+=j<c?2*c+9*j:'MAMA''AAAA')while(x*x+y*y<4&&++j-c)[x,y]=[x*x-y*y+i%c/128-2,2*x*y+i/c/128-2] document.write("<img src=data:;base64,Qk0bAAwAAAAAABsAAAAMAAAAAAIAAgEAGAAA"+p)

JavaScript, 284 283 ...(11 improvements)... 191 190 188 199 bytes

currenty (2019-10-05) this is shortest js solution (the shortest one before this has 285 bytes)

enter image description here

Expanded

// Fractal calculations c=512; // p has pixels, p+= allways join 4 digit number implicit casted to string // 4 char string interpred as base64 gives 3bytes = 1 RGB pixel for( p=i=''; j=x=y=0,++i<=c*c; p+= j<c ? 9*c+9*j : 'MAMA' ) while( x*x+y*y<4 && ++j-c ) [x,y] = [ x*x-y*y+i%c/128-2, 2*x*y+i/c/128-2 ]; // draw pixels in 512x512 BMP base64 image document.write("<img src=data:;base64,Qk0bAAwAAAAAABsAAAAMAAAAAAIAAgEAGAAA"+p)

After small constans changes

c=512;for(p=i='';j=x=y=0,++i<=c*c;p+=j<c?2*c+9*j:'MAMA')while(x*x+y*y<4&&++j-c)[x,y]=[x*x-y*y+i%c/128-2,2*x*y+i/c/128-2] document.write("<img src=data:;base64,Qk0bAAwAAAAAABsAAAAMAAAAAAIAAgEAGAAA"+p)

JavaScript, 284 283 ...(11 improvements)... 191 190 188 199 bytes

currenty (2019-10-05) this is shortest js solution (the shortest one before this has 285 bytes)

enter image description here

Expanded

// Fractal calculations c=512; // p has pixels, p+= allways join 4 digit number implicit casted to string // 4 char string interpred as base64 gives 3bytes = 1 RGB pixel for( p=i=''; j=x=y=0,++i<=c*c; p+= j<c ? 9*c+9*j : 'AAAA' ) while( x*x+y*y<4 && ++j-c ) [x,y] = [ x*x-y*y+i%c/128-2, 2*x*y+i/c/128-2 ]; // draw pixels in 512x512 BMP base64 image document.write("<img src=data:;base64,Qk0bAAwAAAAAABsAAAAMAAAAAAIAAgEAGAAA"+p)

After small constans changes

c=512;for(p=i='';j=x=y=0,++i<=c*c;p+=j<c?2*c+9*j:'AAAA')while(x*x+y*y<4&&++j-c)[x,y]=[x*x-y*y+i%c/128-2,2*x*y+i/c/128-2] document.write("<img src=data:;base64,Qk0bAAwAAAAAABsAAAAMAAAAAAIAAgEAGAAA"+p)

added 27 characters in body
Source Link

JavaScript, 284 283 ...(11 improvements)... 208 191 191 190 188 188199 bytes

currenty (2019-10-05) this is shortest js solution (the shortest one before this has 285 bytes)

enter image description hereenter image description here

Expanded

// Fractal calculations c=512; // p has pixels, p+= allways join 4 digit number implicit casted to string // 4 char string interpred as base64 gives 3bytes = 1 RGB pixel for( p=i=''; j=x=y=0,++i<=c*c; p+=9*c+9*jp+= j<c ? 9*c+9*j : 'MAMA' ) while( x*x+y*y<4 && ++j-c ) [x,y] = [ x*x-y*y+i%c/128-2, 2*x*y+i/c/128-2 ]; // draw pixels in 512x512 BMP base64 image document.write("<img src=data:;base64,Qk0bAAwAAAAAABsAAAAMAAAAAAIAAgEAGAAA"+p)

After small constans changes

c=512;for(p=i='';j=x=y=0,++i<=c*c;p+=2*c+9*j++i<=c*c;p+=j<c?2*c+9*j:'MAMA')while(x*x+y*y<4&&++j-c)[x,y]=[x*x-y*y+i%c/128-2,2*x*y+i/c/128-2] document.write("<img src=data:;base64,Qk0bAAwAAAAAABsAAAAMAAAAAAIAAgEAGAAA"+p)

JavaScript, 284 283 ...(11 improvements)... 208 191 190 188 bytes

currenty (2019-10-05) this is shortest js solution (the shortest one before this has 285 bytes)

enter image description here

Expanded

// Fractal calculations c=512; // p has pixels, p+= allways join 4 digit number implicit casted to string // 4 char string interpred as base64 gives 3bytes = 1 RGB pixel for( p=i=''; j=x=y=0,++i<=c*c; p+=9*c+9*j ) while( x*x+y*y<4 && ++j-c ) [x,y] = [ x*x-y*y+i%c/128-2, 2*x*y+i/c/128-2 ]; // draw pixels in 512x512 BMP base64 image document.write("<img src=data:;base64,Qk0bAAwAAAAAABsAAAAMAAAAAAIAAgEAGAAA"+p)

After small constans changes

c=512;for(p=i='';j=x=y=0,++i<=c*c;p+=2*c+9*j)while(x*x+y*y<4&&++j-c)[x,y]=[x*x-y*y+i%c/128-2,2*x*y+i/c/128-2] document.write("<img src=data:;base64,Qk0bAAwAAAAAABsAAAAMAAAAAAIAAgEAGAAA"+p)

JavaScript, 284 283 ...(11 improvements)... 191 190 188 199 bytes

currenty (2019-10-05) this is shortest js solution (the shortest one before this has 285 bytes)

enter image description here

Expanded

// Fractal calculations c=512; // p has pixels, p+= allways join 4 digit number implicit casted to string // 4 char string interpred as base64 gives 3bytes = 1 RGB pixel for( p=i=''; j=x=y=0,++i<=c*c; p+= j<c ? 9*c+9*j : 'MAMA' ) while( x*x+y*y<4 && ++j-c ) [x,y] = [ x*x-y*y+i%c/128-2, 2*x*y+i/c/128-2 ]; // draw pixels in 512x512 BMP base64 image document.write("<img src=data:;base64,Qk0bAAwAAAAAABsAAAAMAAAAAAIAAgEAGAAA"+p)

After small constans changes

c=512;for(p=i='';j=x=y=0,++i<=c*c;p+=j<c?2*c+9*j:'MAMA')while(x*x+y*y<4&&++j-c)[x,y]=[x*x-y*y+i%c/128-2,2*x*y+i/c/128-2] document.write("<img src=data:;base64,Qk0bAAwAAAAAABsAAAAMAAAAAAIAAgEAGAAA"+p)

added 13 characters in body
Source Link
Loading
deleted 2 characters in body
Source Link
Loading
added 4 characters in body
Source Link
Loading
added 2 characters in body
Source Link
Loading
deleted 15 characters in body
Source Link
Loading
deleted 67 characters in body
Source Link
Loading
deleted 17 characters in body
Source Link
Loading
deleted 17 characters in body
Source Link
Loading
added 6 characters in body
Source Link
Loading
added 19 characters in body
Source Link
Loading
deleted 79 characters in body
Source Link
Loading
edited body
Source Link
Loading
edited body
Source Link
Loading
edited body
Source Link
Loading
deleted 33 characters in body
Source Link
Loading
deleted 19 characters in body
Source Link
Loading
deleted 4 characters in body
Source Link
Loading
deleted 4 characters in body
Source Link
Loading
added 46 characters in body
Source Link
Loading
added 9 characters in body
Source Link
Loading
edited body
Source Link
Loading
deleted 8 characters in body
Source Link
Loading