Fundamentals of Computer Science I (CS151.02 2007S)
[Skip to Body]
Primary:
[Front Door]
[Syllabus]
[Glance]
[Search]
-
[Academic Honesty]
[Instructions]
Current:
[Outline]
[EBoard]
[Reading]
[Lab]
[Assignment]
Groupings:
[EBoards]
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Projects]
[Readings]
Reference:
[Scheme Report (R5RS)]
[Scheme Reference]
[DrScheme Manual]
Related Courses:
[CSC151 2006F (Rebelsky)]
[CSC151.01 2007S (Davis)]
[CSCS151 2005S (Stone)]
This lab is also available in PDF.
Summary: In this lab, you will experiment with GIMP, the GNU Image Manipulation program. You will also think about how you might give instructions to someone else to draw pictures using GIMP.
Contents:
Because of the timing of this lab, no preparatory reading was available. Hence, this lab begins with a few short notes. A longer optional reading is also available.
The GNU Image Manipulation Program (GIMP
, for short) is an
open-source, freely-distributed graphics editing program that can serve
as a reasonable alternative to Adobe Photoshop. Like Photoshop,
GIMP provides tools for both making new images and for manipulating
existing images.
GIMP distinguishes itself from Photoshop in three key ways: First, it is an open source application, which means that you can get it for free and (if you have enough talent) can even modify the source code. Second, it is available on all three major operating system platforms (Mac, Windows, and Unix/Linux). Third, and perhaps most importantly for this course, GIMP is scriptable. In particular, you can interact with GIMP using a Scheme-like language. You can use this language to give simple commands or to write complex scripts.
We will explore these applications over the coming weeks.
a. Open a terminal window by clicking on the picture of the computer screen in your task bar.
b. Start GIMP by typing gimp
. It will probably ask you
whether it can install some files. Allow it to do so.
c. Play for awhile with the various tools. Feel free to share ideas and questions with neighbors.
The GIMP relies on its selection tools to support a variety of kinds of drawing. You may have noted that there are three selection tools: A rectangular tool, an oval tool, and a freehand (lassoo) tool. The strategy one normaly uses is to select some area and then fill or stroke that area.
a. Create a new image.
b. Set the foreground and background colors to something recognizable (say, red and green).
c. Choose an interesting brush (say, one of the Calligraphic brushes or the Pencil Sketch brush).
d. Using the selection tool of your choice, select a moderately large area of the screen.
e. From the
menu, select . Observe what happens.f. From the
menu, select and click from the dialog that appears. Choose the Paintbrush as the paint tool. Click the button. Observe what happens.g. Select different areas and stroke and fill with different colors, paint tools, and stroke lines.
By default, when you select a second area, GIMP forgets the previously selected area. However, there are ways to combine selections. In particular, when you hold down the shift key, you get one behavior and when you hold down the control key, you get another behavior.
a. Select a large rectangular area.
b. While holding down the shift key, select an overlapping rectangular area. What happens? What does that suggest about selection with the shift key?
c. While holding down the control key, select an overlapping rectangular area. What happens? What does that suggest about selection with the control key?
d. While holding down both the shift key and the control key, select yet another overlapping rectangular area. What happens? What does that suggest about selection with both keys?
e. Stroke or fill the area you've just created.
If you are unsure of any of your answers, you may wish to check the notes on this problem.
Draw a smiley face using whatever tools you deem most appropriate.
a. Sketch, in English, instructions for replicating the drawing you
just made. (You can assume a reasonably competent reader. While
I may attempt to replicate your instructions, I won't do my normal
imitation of a sentient but malicious computer
or of a clueless
computer scientist
.)
b. Share your instructions with neighboring groups.
c. Using one of the sets of instructions you received from a neighboring group, make a new drawing.
Start with the word Computer Science and make an interesting logo. You might add colors, shadow, more. You might find the
and menus useful.Sketch, in English, instructions you might give someone else to create a logo like that.
Generalize your instructions from the previous step so that they could be used with any word.
The shift key serves as the add modifier. The newly selected area is added to the previous selection.
The control key serves as the remove modifier. The newly selected area is removed from the previous selection.
The combination of the shift key and the control key is the intersection modifier. Only stuff that is both in the the previously selected area and the newly selected area is selected.
http://www.cs.grinnell.edu/~rebelsky/Courses/CS151/History/Labs/gimp.html
.
[Skip to Body]
Primary:
[Front Door]
[Syllabus]
[Glance]
[Search]
-
[Academic Honesty]
[Instructions]
Current:
[Outline]
[EBoard]
[Reading]
[Lab]
[Assignment]
Groupings:
[EBoards]
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Projects]
[Readings]
Reference:
[Scheme Report (R5RS)]
[Scheme Reference]
[DrScheme Manual]
Related Courses:
[CSC151 2006F (Rebelsky)]
[CSC151.01 2007S (Davis)]
[CSCS151 2005S (Stone)]
Disclaimer:
I usually create these pages on the fly
, which means that I rarely
proofread them and they may contain bad grammar and incorrect details.
It also means that I tend to update them regularly (see the history for
more details). Feel free to contact me with any suggestions for changes.
This document was generated by
Siteweaver on Thu Sep 13 20:54:19 2007.
The source to the document was last modified on Mon Mar 5 12:46:38 2007.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS151/2007S/Labs/gimp.html
.
You may wish to
validate this document's HTML
;
;
http://creativecommons.org/licenses/by-nc/2.5/
or send a letter to Creative Commons, 543 Howard Street, 5th Floor,
San Francisco, California, 94105, USA.