Skip to main content
31 votes

Computer Generated Cracked Soil

Mathematica A Voronoi diagram looks like this drawing, from Wikipedia, showing 19 cells, each containing a single seed point. A cell consists of the subregion of points which the respective ...
DavidC's user avatar
  • 25.4k
29 votes

Create an "H" from smaller "H"s

Wolfram Language (Mathematica), 46 bytes Nest[ArrayFlatten@{r={#,0,#},{#,#,#},r}&,1,#]& Returns a 2d array of 0s and <...
alephalpha's user avatar
  • 48.5k
28 votes
Accepted

Gasket Weaving - draw a Sierpiński knot

Ruby, 1168 932 Corrected a mistake from last night, more golfing to do after clarifying. This is (currently) a full program that accepts a number from stdin and outputs an ...
Level River St's user avatar
26 votes

Computer Generated Cracked Soil

Java I used an approach based on recursive Voronoi diagrams. The outputs doesn't look very realistic, but I guess they're okay. Here are some example images (resized to 250x250 so that it doesn't ...
xenia's user avatar
  • 8,142
21 votes

Generate TeX to typeset Sierpinski Triangle Fractal

Python 2, 32 bytes exec"print'x'"+".join('{^_}')"*5 Try it online!
Erik the Outgolfer's user avatar
21 votes

Create an "H" from smaller "H"s

Canvas, 14 12 bytes H;[⌐⌐∔*×∔;3*+ Try it here! Explanation: ...
hakr14's user avatar
  • 4,974
19 votes

Create an "H" from smaller "H"s

MATL, 12 11 bytes t:"[ACA]BX* Given input n, this outputs a matrix containing 0 and <...
Luis Mendo's user avatar
  • 105k
16 votes

Create an "H" from smaller "H"s

Stax, 16 15 bytes ╛c_mê║6{│◙ÖmπV" Run and debug it This is the ascii representation of the program with comments. This program builds up the H sideways, and ...
recursive's user avatar
  • 10.4k
15 votes

Generate TeX to typeset Sierpinski Triangle Fractal

plain TeX, 29 bytes \def~#1x{{#1x_#1x^#1x}}~~~~~x That outputs what others have output. But if we need the code to be compilable it would be 6 bytes more ...
Manuel's user avatar
  • 301
13 votes

Draw A Sierpinski Triangle

80x86 Code / MsDos - 10 Bytes As a sizecoder specialized for very tiny intros on MsDos i managed to come up with a program that occupies only 10 bytes. in hex: ...
HellMood's user avatar
  • 618
13 votes

Is it within the Cantor set?

Mathematica, 54 bytes If[Last@#===1,Most@#,#]&@RealDigits[#,3][[1]]~FreeQ~1& Unnamed function taking a fraction x/y ...
Greg Martin's user avatar
  • 15.8k
13 votes

The Image of the Dragon

MATLAB, 237 bytes ...
flawr's user avatar
  • 43.8k
13 votes
Accepted

The strange attraction of the logistic map

MATL, 32 30 28 27 bytes 4 bytes saved thanks to @Luis 3$:0:.01:1!i:"tU-y*]'.'3$XG The input format is r1, ...
Suever's user avatar
  • 11.1k
13 votes

Drawing the Peano curve

GFA Basic 3.51 (Atari ST), 156 134 124 bytes A manually edited listing in .LST format. All lines end with CR, including the last one. ...
Arnauld's user avatar
  • 193k
12 votes

Computer Generated Cracked Soil

Python 3 (using Kivy library and GLSL) First generated image Python code: ...
Gábor Fekete's user avatar
12 votes

The IHIH Pyramid

Python, 165 145 133 123 bytes A recursive solution: ...
Simon's user avatar
  • 266
12 votes

Generate a Padovan Spiral

Mathematica, 119 108 bytes Thanks to Martin Ender for saving 11 bytes! ...
Greg Martin's user avatar
  • 15.8k
12 votes

Draw this fractal generated by applying Newton's method to cosh(x) - 1

Desmos, 401 375 357 353 bytes -26 bytes thanks to @aiden-chow -18 bytes thanks to flexabrotnt#1409 ...
MathEnthusiast314's user avatar
11 votes

Create an "H" from smaller "H"s

Ruby, 72 bytes Output is a list of strings, one string per line. f=->n{n<1?[?H]:[*a=(x=f[n-1]).map{|i|i+' '*i.size+i},*x.map{|i|i*3},*a]} Try it online!
Value Ink's user avatar
  • 12.6k
11 votes

Create an "H" from smaller "H"s

APL (Dyalog Classic), 14 bytes ×/¨∘.≥⍨2|,⍳⎕⍴3 Try it online! evaluated input n ,⍳⎕⍴3 ...
ngn's user avatar
  • 15.3k
10 votes

Mandelbrot image in every language

TI-80 BASIC, 125 106 bytes ...
12Me21's user avatar
  • 6,701
10 votes

The IHIH Pyramid

Cheddar, 186 177 165 154 148 131 bytes ...
Downgoat's user avatar
  • 29k
10 votes

It's factors all the way down!

Python 3.5, 331 309 308 306 304 bytes It took quite a bit of messing with the spacing of the polygons (and the specification, too, to be honest) to get this answer to work, but I finally did it and ...
Sherlock9's user avatar
  • 12.3k
10 votes
Accepted

Make Some Snow!

Haskell, 308 300 299 bytes Edits: -4 bytes: Changing zipWith(+) to zipWith(-) and adjusting encodings and offsets got rid of ...
Ørjan Johansen's user avatar
10 votes

Create an "H" from smaller "H"s

Haskell, 50 bytes f 0=[[1]] f n=[x++map(*c)x++x|c<-[0,1,0],x<-f$n-1] Try it online! Makes a grid of 0's and 1's. One character longer for spaces and H's. ...
xnor's user avatar
  • 145k
10 votes

Drawing the Peano curve

Perl 6, 117 bytes {map ->\y{|map {(((++$+y)%2+$++)%3**(y+$^v,*/3...*%3)??$^s[$++%2]!!'│')xx$_*3},<┌ ┐>,$_,<└ ┘>,1},^$_}o*R**3 Try it online! 0-...
nwellnhof's user avatar
  • 10.5k
10 votes

Double the diagonal squares

Charcoal, 21 bytes ↶⁴FNF⁵«↷¹X²÷⁺﹪κ²ι²↷¹¶ Try it online! Link is to verbose version of code. Explanation: ↶⁴ Make the output ...
Neil's user avatar
  • 172k
9 votes

Draw a Dragon Curve

Python 2/3, 169 167 150 111 98 78 Bytes Note that the import is not included in the byte count, according to the challenge specs. Thanks to @AlexHall for saving 39(!) bytes and @nedla2004 for another ...
Theo's user avatar
  • 509
9 votes

Generate a Padovan Spiral

Matlab, 202 190 bytes ...
flawr's user avatar
  • 43.8k
9 votes

Is it within the Cantor set?

C (gcc), 61 59 58 bytes f(x,y,i){for(i=y;i--&&x<y;)x=(y-x<x?y-x:x)*3;return x<=y;} Exploits the symmetry of the Cantor set. Breaks after ...
nwellnhof's user avatar
  • 10.5k

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