Write a program that takes in an integer from 0 to 65535 (2<sup>16</sup>-1) and generates a *unique* 500&times;500 pixel image that looks as similar as possible to these 6 real life images of cracked soil:

[![cracked soil sample 1][1]][2] [![cracked soil sample 2][3]][4] [![cracked soil sample 3][5]][6] [![cracked soil sample 4][7]][8] [![cracked soil sample 5][9]][10] [![cracked soil sample 6][11]][12]  
<sup>**These are thumbnails, click them to see the full-size 500&times;500 images.**</sup>

The goal here is to make your computer generated images as photorealistic as possible. So ideally, if any of the images output by your program were mixed in with the 6 images above, someone seeing the images for the first time would not be able to tell the computer generated ones apart from the real ones.

Perfect photorealism is tricky however, so just do the best you can. This is a [tag:popularity-contest] so the answers that have more realistic outputs will be upvoted more and be more likely to win.

##Rules

- You may use image processing functions or libraries.

- You may base your algorithm on information gathered from the 6 sample images, but your 65536 (2<sup>16</sup>) possible output images should be visually distinct from each other *and* the sample images, especially with regard to the arrangement of the cracks. You must truly generate your images, don't just rotate and translate a selection from a preexisting photo.

- The output images must be exactly 500&times;500 pixels.

- The output images may be saved in any common image file format, or simply displayed.

- Be sure to include a few example output images in your answer, and their corresponding input numbers.

- **The answer with the most votes wins.**

The 6 sample images were taken from [texturelib.com][13]. 1000&times;1000 pixel area selections were taken from [two larger images of cracked soil][14] and then resized to 500&times;500. You may use analysis from these larger images in your program but the output should specifically imitate the 6 chosen sample images.

  [1]: http://i.stack.imgur.com/GqnaPs.png
  [2]: http://i.stack.imgur.com/GqnaP.png
  [3]: http://i.stack.imgur.com/IYtgDs.png
  [4]: http://i.stack.imgur.com/IYtgD.png
  [5]: http://i.stack.imgur.com/6uWqus.png
  [6]: http://i.stack.imgur.com/6uWqu.png
  [7]: http://i.stack.imgur.com/Aa3YVs.png
  [8]: http://i.stack.imgur.com/Aa3YV.png
  [9]: http://i.stack.imgur.com/C4WJbs.png
  [10]: http://i.stack.imgur.com/C4WJb.png
  [11]: http://i.stack.imgur.com/WVXRls.png
  [12]: http://i.stack.imgur.com/WVXRl.png
  [13]: http://texturelib.com/
  [14]: http://texturelib.com/texture/?path=/Textures/soil/cracked/soil_cracked_0038