3
\$\begingroup\$

After noticing all the fractal submissions/questions, I thought it would be fun to start a contest where everyone submits their favourite fractal.

The Contest

Generate a fractal in under 200 characters using any language. The output of the function can be an image, ascii art or any representation of a fractal you can think of. In your submission include your code, how to run your code, and sample outputs of your fractal. This is a popularity contest, so the submission with the most votes wins.

Rules

  • You may use any libraries, except those which generate fractals (e.g. a library function that generates a mandelbrot set is not allowed)
  • It is difficult to define a true fractal, so I will accept anything that has self-similarity and has fractal dimension greater than its topological dimension
  • You may submit multiple answers

Good luck, have fun!

\$\endgroup\$
8
  • 1
    \$\begingroup\$ This is likely to be marked as a duplicate since there are many many answers to previous questions that could simply be copied over. \$\endgroup\$ Commented Oct 14, 2014 at 2:50
  • \$\begingroup\$ The rules of this question do allow a lot of previous submissions to be used, however this a popularity contest. Part of the challenge will be creating a visually appealing fractal, in order to get votes. A code-golfed submission means less than an artistic submission. \$\endgroup\$
    – Cameron
    Commented Oct 14, 2014 at 3:07
  • 7
    \$\begingroup\$ This question appears to be off-topic because it is an art contest rather than a programming contest. \$\endgroup\$
    – Dennis
    Commented Oct 14, 2014 at 3:18
  • 1
    \$\begingroup\$ Having read the meta post(s?) about art contests, I don't see a big problem with this post. The point is that there's a big restriction on the source, so it's not just an art contest, it has a substantial code golfing element as well. (Though personally I think 512 characters is too much, I've seen and created quite a few nice fractals in 140 characters or less. Someone just posted an entire ray tracing engine in 467.) \$\endgroup\$
    – N. Virgo
    Commented Oct 14, 2014 at 4:45
  • 4
    \$\begingroup\$ While I agree that this is in the same vein as the tweetable maths challenge, I'd still close vote this: as too broad. The main problem I see is that it preempts dozens of interesting fractal challenges. Imagine this question gets reopened and does get popular with tons of answers - it might get solutions for a dozen fractals or more. Any future code golf challenge drawing one of the fractals that has been drawn here, would have to be closed as duplicate, because one ore more competitive answers could already be found here. \$\endgroup\$ Commented Oct 14, 2014 at 8:19

1 Answer 1

4
\$\begingroup\$

Python, 127 bytes

Creates a Sierpinski triangle.

import Image
f=1e3
a=Image.new('RGB',(f,f))
p=a.load()
r=range(f)
for i in r:
 for j in r:p[i,j]=(i*16&j*16,)*3
a.save('s.png')

\$\endgroup\$
4
  • \$\begingroup\$ a=I.new('RGB',(t,t)) and a.save('s.png') and p[i,j]=m,m,m \$\endgroup\$
    – gnibbler
    Commented Oct 15, 2014 at 0:37
  • \$\begingroup\$ you can also get rid of r, for j in range(a.size[1]):p[i,j]=(i*16&j*16,)*3 \$\endgroup\$
    – gnibbler
    Commented Oct 15, 2014 at 0:45
  • \$\begingroup\$ @gnibbler Thanks for that! \$\endgroup\$
    – Beta Decay
    Commented Oct 15, 2014 at 5:58
  • \$\begingroup\$ t=1000and (t,t) can be shortened to (1000,)*2 \$\endgroup\$
    – ThinkChaos
    Commented Oct 15, 2014 at 16:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.