8
\$\begingroup\$

This challenge was xnor's idea, taken from Digital Trauma's challenge donation thread.


Your challenge is to write a program that, as xnor put it, "procedurally generate[s] the splotchy black-and-white marbled pattern on the covers of composition notebooks":

1]

Your program can either display it on the screen or save it in a file. The image should be at least 300 pixels in each dimension, and it should be different between runs of the program. Your program should not just load an external image and use that as its output; the image should be generated by your program.

This is a , and it will use xnor's criteria for voting:

  • Similarity to the reference texture above.
  • Simplicity of generation method.
\$\endgroup\$
7
  • 4
    \$\begingroup\$ I don't think it's a good idea to post another user's challenge straight out of the sandbox, although it has a highly voted critical comment. At the very least, you should repost it in the sandbox, addressing those concerns and getting some up-to-date feedback. I do think this is way too broad to work well as a pop-con and it's also too similar to codegolf.stackexchange.com/q/43274/8478. \$\endgroup\$ Jan 5, 2016 at 23:00
  • 1
    \$\begingroup\$ Lastly, I don't understand how it's possible to generate such an image without some form of noise. Whether I use a pre-made function to generate the noise, or port some Perlin noise code from elsewhere into my program doesn't really make a difference for a popcon since there is no incentive to keep the code short. \$\endgroup\$ Jan 5, 2016 at 23:00
  • 1
    \$\begingroup\$ @MartinBüttner I understand your points, but I think this is different from that other challenge. This image is simpler than the pictures of the wall, and I think it's clearer what exactly the output should look like. I removed the part about external noise generators, because I agree with you and I think it was unclear. \$\endgroup\$
    – KSFT
    Jan 5, 2016 at 23:05
  • 2
    \$\begingroup\$ @MartinBüttner your first comment could give the impression KSFT stole this challenge from Xnor. But on investigation I understand Xnor gave it away. \$\endgroup\$ Jan 5, 2016 at 23:58
  • 1
    \$\begingroup\$ @steveverrill that's not what I meant to imply. I'm saying even you post another user's challenge with their permission, you shouldn't just copy it straight from the sandbox to main. Usually there's a very good reason why the original author didn't do just that. \$\endgroup\$ Jan 6, 2016 at 0:03

1 Answer 1

16
\$\begingroup\$

Mathematica

Blur[Binarize[Blur[RandomImage[1, {1000, 1000}, ImageSize -> Large], 6], .52]]

Quite simple. Creates a random grayscale image, blurs it, takes the pixels above a threshold, and blurs it again. It uses a couple of hand-tweaked values. The result:

\$\endgroup\$
2
  • 1
    \$\begingroup\$ This is really good! On first glance I thought you reposted the reference image. \$\endgroup\$
    – xnor
    Jan 6, 2016 at 2:49
  • \$\begingroup\$ @xnor I myself was surprised what a small amount of hand-tweaking could do. \$\endgroup\$ Jan 6, 2016 at 12:01

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