This teachpack provides a variety of functions for manipulating graphical images. To use it, you'll need to
This should be done once on your home computer, and you'll never have to do it again (unless I come up with an improved version). If you do it on a classroom computer, the teachpack may be uninstalled before the next time you come to class, so you'll have to do it again (unless I can persuade the Computing Center to install it permanently).
Start DrScheme, go to the "File" menu, choose "Install .plt file...", make sure you're in the "Web" tab rather than the "File" tab, type the URL http://home.adelphi.edu/sbloch/class/160/tiles.plt into the blank, and hit "OK". It should be downloaded and installed. You'll know that it worked if you see a message window ending with "Done setting up".
However, on some computers this doesn't seem to work: you get messages like "gnu-unzip: bad header" and "not an unpackable distribution archive". If that happens, try...
Right-click on the link tiles.plt, choose "Save file as...", and save it somewhere on your computer. Wherever you put it, it should appear with a red-white-and-blue DrScheme logo. If so, double-click on it and it should install automatically (perhaps showing a black window for a few seconds).
If the file appears with some other kind of logo, try...
Once you've saved the
tiles.plt file somewhere on your computer,
start DrScheme, choose "File->Install .plt file...", click the "File"
tab, then the "Browse" button, navigate to wherever you put the file,
select it, and hit "OK".
You should get a bunch of messages ending with "Done setting up."
If that doesn't work, talk to me.
When you start DrScheme, you can tell it you want to use these added functions, and it'll remember that for the next time you start DrScheme on the same computer... unless somebody else using the same computer tells it not to use this teachpack, in which case you'll need to go through these steps again.
Go to the "Language" menu in DrScheme and choose "Add Teachpack", select "tiles.ss", click "Open", and then click the "Run" button. You should see a message saying "Teachpack: ... tiles.ss" in the interactions window. The next time you start DrScheme, it should remember this unless you choose "Language->Clear Teachpack" to remove the teachpack.
You can copy-and-paste images from a Web browser into DrScheme and use them just like any other value: you can store them in a variable, etc. This teachpack includes several useful functions for manipulating images:
image-above: image image ... -> imageCombines two or more images into one, putting the first above the second (above the third, ...).
image-above-align-right: image image ... -> imageJust like
image-above, but lines up the right-hand edges of all the images.
image-above-align-left: image image ... -> imageJust like
image-above, but lines up the left-hand edges of all the images.
image-beside: image image ... -> imageCombines two or more images into one, putting the first to the left of the second (to the left of the third, ...).
image-beside-align-top: image image ... -> imageJust like
image-beside, but lines up the top edges of all the images.
image-beside-align-bottom: image image ... -> imageJust like
image-beside, but lines up the bottom edges of all the images.
reflect-vert : image -> imageflips an image top-to-bottom.
reflect-horiz : image -> imageflips an image left-to-right.
reflect-main-diag : image -> imageflips an image top-right to bottom-left.
reflect-other-diag : image -> imageflips an image top-left to bottom-right.
rotate-cw : image -> imagerotates an image 90 degrees clockwise.
rotate-ccw : image -> imagerotates an image 90 degrees counter-clockwise.
rotate-180 : image -> imagerotates an image 180 degrees.
In practice, you'll probably also want to add another teachpack, "image.ss" (which lives inside the "htdp" folder). This provides a variety of other functions useful for building and manipulating images in DrScheme. To learn about them, start DrScheme, choose "Help -> Help Desk", and search for "image.ss".