Mosaic Maker


A buddy of mine approached me the other day about creating a visually appealing way of randomly displaying images from a large collection. He cited the example on the CG Hug homepage. It had been a long time since I got to do some programming problem solving like this, so I accepted the challenge.

While there are still a few tweaks to be done (images don't always completely fill the allotted cell), I'm pretty dang happy with what has emerged. Click here if you want to give it a try. Every reload will give you a different mosaic pattern and different random assortment of pictures. Also feel free to tweak the parameters in the url for different sized grids. For the time being, I'm only pulling images from /stuff9 (my most recent year or so of posts), but it would be neat to expand it someday, maybe even integrate it into the header of the blog*.

Anyway, kind of a neat little project.
Thursday October 13 2011File under: coding, pics

Toggle Comments (4)comment?
on Fri 14th Oct, 2011 06:49 am PDT Saxtor said:
Woah woah woah! You can't type a title-text like that and not leave some context/detail...
************************
on Fri 14th Oct, 2011 08:21 am PDT Luke said:
Lets see if wren put any limits in his code:
http://blogduwren.com/dev/per/canvas.php?height=3000&width=5500&cols=150&rows=1000
************************
on Sun 23rd Oct, 2011 09:17 pm PDT Amiel Martin said:
Nice!
I like your usage of Array.prototype.sort(fn)
************************
on Sun 23rd Oct, 2011 10:03 pm PDT Wren said:
@Amiel: I'm pretty sure that's a dig, right? There's no protocoling anywhere near that code. The unnecessary <script> tags are due to hastily transferring a php array into a javascript one. Or maybe you were looking at some other code, in which case I will pretend I totally used the fancy way of doing things.
************************

<<One Seasons WorkFC 149 - No Money Down>>
  
Recent Comments:
*Andrew on My Second NYT Crossword
*Horge on My Circus Valentine 2018 Act
*AnddddrEw on My Circus Valentine 2018 Act
*Uncle Steve on My Circus Valentine 2018 Act
*Horge on Jamaica Public Transport Experience

Recent Content:
*TV and Film Resume
*2018 Summer Juggling Recap
*EXTRA EXTRA - American Vandal and others
*Sleeping Around 2017-18
*My Second NYT Crossword
*My Circus Valentine 2018 Act
*Five years of the ACPT
*Breakdown of Earnings 2017

Websites du Friends:
* Wren and Della
Della and my juggling website
* The Real Food Show
A circus-inspired elementary assembly show to teach kids about healthy eating
* Della Moustachella
Della's performance website
* The Fun Bags
Della and Sadye's Performance Troupe


Tags
Anacortes (39)
Cambodia (5)
China (14)
Korea (1)
Macau (1)
Mexico (13)
New Zealand (1)
Seattle (2)
Thailand (18)
USA (11)
Vietnam (5)
beard (5)
blog (8)
books (1)
coding (15)
comic (45)
contest (4)
environment (9)
events (12)
food (22)
games (15)
geocaching (4)
holidays (13)
juggling (8)
links (9)
meet-ups (1)
mexico (1)
misc (54)
movies (5)
open letter (2)
participation (1)
pics (39)
poetry (6)
poll (1)
quote (6)
road trip (25)
stats (1)
transportation (14)
travel (136)
video (6)
work (8)