jasonlong / geo_pattern

Create beautiful generative geometric background images from a string.
http://jasonlong.github.io/geo_pattern/
MIT License
1.25k stars 88 forks source link

Random pattern #32

Closed p-lambert closed 10 years ago

p-lambert commented 10 years ago

Currently, there are 17 available patterns. The last one, “chevrons” has index 16, thus it will be never randomly picked, as generate_pattern uses the 21th hexadecimal character from the hash (which will be 15, at maximum) to pick up a pattern.

Thank you very much for this gem!

jasonlong commented 10 years ago

Wow, unbelievable. I remember counting these towards the end (taking into account the 0-based indexing) and must have miscounted.

At this point, I think I'm more inclined to remove one of the patterns and keep the pattern choice based on a single SHA value. I'd probably choose to remove triangles_rotated since it's very similar to triangles.

@p-lambert Would you like to update your PR to do this? If not, I'm happy to take care of it. We'll need to update the README as well. Either way, thanks for pointing this out!

p-lambert commented 10 years ago

@jasonlong, I’ll be glad to help. just to be sure if I got it right: should I leave generate_pattern like it was before (since the map call will be no longer needed) and just remove (including README) the aforementioned pattern?

jasonlong commented 10 years ago

Yeah, that's what I was thinking. Thanks!

On Sun, Mar 9, 2014 at 5:27 PM, Pedro Lambert notifications@github.com wrote:

@jasonlong, I’ll be glad to help. just to be sure if I got it right: should I leave generate_pattern like it was before (since the map call will be no longer needed) and just remove (including README) the aforementioned pattern?

Reply to this email directly or view it on GitHub: https://github.com/jasonlong/geo_pattern/pull/32#issuecomment-37140245

jasonlong commented 10 years ago

Looks good, thx @p-lambert.