1

Im looking to make my own implementation of these Identicons or Gravatars found here on StackOverflow. Most questions I could found was about utilizing existing 3rd party libraries, especially those hooked with Gravatar.

alt text
(source: levitated.net)

After some searching I stumbled upon this page. And from the looks of it, its not that hard. What needs to be randomly picked is:

  • One shape to be in middle
  • One shape for the corners
  • One shape for the edges
  • 2 colors
  • A rotation for all shapes except for the middle one

Seed a randomizer with the md5 hash value and start retrieving random numbers. Then, add (pi/2)*i to each shape around the edge to create that cool radial symmetry effect.

You could say Im thinking in text here, but I want to know if Ive misunderstood anything. Also, if you have any thought one what more could be randomized to increase the diversity. Will the look or feel be "broken" if I start changing the:

  • Scale of the shape?
  • And then maybe also the offset in position of the shape within the block?
  • Picking more than two colors? Two colors per block with the same radial symmetry?
Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Mizipzor
  • 51,151
  • 22
  • 97
  • 138
  • Don't you know that these are the mark of the beast. 666. –  Jul 03 '09 at 21:01
  • It forced all people, small and great, rich and poor, free and slave, to have a mark on the right hand or forehead. Without the mark of the name of the Beast or the number of its name, it was impossible to buy or sell anything. (The Bible in Revelation 13:16-17 MSG) This mark has been interpreted as so much. Gravatars like these with 9 blocks and 16 shapes are just too limited in number, aren't they? But nice idea - easy to tatoo and read. – Ralph M. Rickenbach Jul 03 '09 at 21:07

2 Answers2

2

As you can see in your own gravatar on this site, you can go for a 4x4 field. An even number of cells per side will limit less on the shapes used in the middle, as they are rotated as well.

Offsets could be allowed, if rotated. Offsets that are equal on both dimensions might look more symetrical and could be favoured, but it is not necessary to do so.

You can also rotate differently, by 180°, loosing some symmetry, but as you can see here, it does give you interesting identicons.

Of course you could pick more then two colors. From an estetical standpoint, choose wisely from colors within a certain scheme. Maybe some effects like making the colors lighter or darker towards the edges gradually would look very interesting.

Do I understand you correctly that you would seed the randomizer with the MD5 value of the users email address and thus be able to recalculate his gravatar on the fly? No need then to have him create an account.

Ralph M. Rickenbach
  • 12,893
  • 5
  • 29
  • 49
  • Yes. Or not from the email, since the target application for this isnt webbased. But the general idea of "generate on the fly from just a md5" is what Im aiming for. Should pick up that project again, this is inspiring. – Mizipzor Jul 03 '09 at 21:35