By George Hart for the Museum of Mathematics
Tim Chartier at Davidson College has discovered that if you make things out of candy there’s no lack of volunteers to help you clean up. He takes images and transforms them mathematically into arrays of candy pieces. Here you can see President Obama, as rounded to the set of m&m color values. Mathematically, the algorithm picks the available color which is closest in red-green-blue-space to the average of the pixels it replaces.
Tim’s program has controls that allow the user to change the image, the candy, and the resolution. Since Easter is coming up, you may find a use for this recipe to make another U.S. president, this time from 400 peeps:
As Tim notes on his blog, “The best part is taking it apart!”
More:
See all of George Hart’s Math Monday columns



New project: Candy Drawbot…
But somebody else has to do it, I’m trying to lose weight.
It seems like the applet on the website only allows you to use 3 preloaded images. A workaround for this if you wanted to use different images would be to use standard photomosaic software and then use pictures of individual candies on a white background as the images that make up the mosaic tiles. Presumably the math that these programs use is similar to that used by this program.
I’ve used the freely available andrea mosaic to make photo and video mosaics previously and probably will play with this idea sometime soon.
http://www.andreaplanet.com/andreamosaic/
I would like to see an updated program that takes advantage of the 24 colors that are available in M&Ms at certain mall stores and specialty shops.
I would like to see an updated program that takes advantage of the 24 colors that are available in M&Ms at certain mall stores and specialty shops.
These are incredible! Thanks to Tim for sharing this cool tool – it recently inspired one of our users (@LukeSelfWalker) to create a pointillist of President Obama: http://www.desmos.com/calculator/g1ty27ovzk
// What's Trending
Raspberry Pi Design Contest
Dad Builds Son an Iron Man Arc Reactor
Teardrop Camper Trailer
Seventeen Sneaky Secret Hides
What to do with an 800 Lb Eucalyptus Slab
10 Things to Connect to Your Raspberry Pi
80-Ruxpin Art Installation
3D Printed Kinetic iPhone Cases
// What's Shared
A better way to slice a pumpkin
DIY Nerf Darts
100 Dollar Store Organization Ideas for Craft Rooms and Beyond
In the Maker Shed: Minty Boost USB Charger
Mad’s Mouse House
Lace Princess Crowns
I Have a (Puzzling) Dream
Play the Rings of a Tree Trunk Like a Record
// Most Commented
Plastic Bags into Plastic Blocks: Revisited
10 Hot New Boards to Watch
Why the Maker Movement is Here to Stay
MAKE Asks: Roadside Hacks
Ten Tips for Hand Saws and Blades
DIY Hacks & How To’s: Convert From Battery Power to AC
How To Make Your Own Laundry Detergent
What to do with an 800 Lb Eucalyptus Slab
Trending Topics
Get our Newsletters
About Maker Media
Subscribe
to MAKE!
Get the print and digital versions when you subscribe