Math Bytes by Chartier Tim

Math Bytes by Chartier Tim

Author:Chartier, Tim
Language: eng
Format: epub
Publisher: Princeton University Press
Published: 2014-04-13T04:00:00+00:00


Not a chocoholic? Skittles, Starbursts, Cheerios, or, for the calorie conscious, Sticky Notes could replace chocolate chips and be used to approximate π. In fact, you could even estimate this irrational number or compute an integral as you tile your bathroom floor or decorate a sheet cake.

Figure 8.9. Our palette of M&Ms for mathematical art.

Figure 8.10. The regions in (a) and (c) are approximated by the M&M mosaics in (b) and (d).

Candy Mosaics

We just used M&Ms to estimate the value of an integral. Now, we will create mosaics with candy. While we have many choices of candy to use as tiles, we’ll pick M&Ms since they melt in your mouth and not in your hand, giving us ample time to create our mosaic. So our palette of tiles is the group of M&Ms available in a standard bag of the treats as seen in Figure 8.9.

The image we want our tiling to approximate will be called the target image. Suppose we want to create an M&M mosaic to approximate the image in Figure 8.10 (a). Since each of the squares is the same color as an M&M, it is fairly clear that the mosaic in Figure 8.10 (b) is a good choice. Suppose instead we want to again use four M&Ms to create a mosaic but now the target image is Figure 8.10 (c). Visually, we can decide which candy pieces to use. How do we get a computer to choose on its own?

We again capture the three color intensities of a pixel as a coordinate triplet (r, g, b), where r is the amount of red, g is the amount of green and b is the amount of blue. The square in the upper left of Figure 8.10 (c) has the color (208, 231, 32). We use the distance formula to find the M&M with the closest color. Using Table 8.1 as the colors of the M&Ms, the distance between the color of the upper left square in Figure 8.10 (c) and the color of a blue M&M is

TABLE 8.1.

The red, blue, green values of M&M candies used in our candy mosaics.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.