A Seastar Rearrangement

Figure 1. If you look closely you may recognize that this is a scrambled image of the Madreporite logo.

Figure 1. If you look closely you may recognize the scrambled pieces of the Madreporite logo.

By Allan Roberts

One of the things that makes the stats and graphics application R so flexible is that there are lots of extension packages, or libraries, available. Some of these come with R by default, and others are available from the R Project website. The image in Figure 1 was made by using a function in the “png” library to read a .png image of the Madreporite logo into R. I used the “grid” library to create a view port for each tile. Then I used a modified version of the script posted in the Sliding Tile Game with R post to scramble the tiles.

References

Urbanek, S., 2011. png: Read and write PNG images. R package
version 0.1-4. http://CRAN.R-project.org/package=png

R Core Team (2012). R: A language and environment for statistical computing. R
Foundation for Statistical Computing, Vienna, Austria. http://www.R-project.org/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s