|
N V Fitton, Assistant Professor in Mathematics and Computer Science Northern Virginia Community College Alexandria campus |
|
|
e-mail:
vfitton@nvcc.edu |
NVCC home page NVCC phone books etc. Alexandria campus math department NVCC computer science home page Alexandria campus sciences division |
|
|
return to Fitton's home page Computer Science Advising Guide, written to help students choose CSC courses
Here is my introduction to Logo. It is 20 pages long.
Programming in Logo Logo is a wonderful programming language that anyone can download and use for free. It's easy to learn, it allows us to draw wonderful pictures, and it has enough depth for serious programming. Download this. We use a version of Logo called MSWLogo, written for machines running Microsoft Windows 95 or later. This Logo was created by George Mills, building on the work of Brian Harvey and others. If it is already on your machine when you do this installation, you may get some confusing messages about deleting files. Accept the deletion, then do the installation again. Here's an earlier version of MSWLogo that fits on a floppy. Hooray! It doesn't have the convenient Edall (edit all) button, which shows all of your procedures at once, but you can write edall on the command line for the same effect. Here is my favorite Logo art site. Check out the links for different kinds of pictures at the bottom of the page, and observe that the site includes code for everything. And here are some tutorials written by teachers in Australia and Canada:
You may study and use these code bits if you like. Instructions follow this list. Very simple procedures: These use some color, random numbers (like throwing dice), and xy coordinates. A more complex and colorful design:
Here's a flowchart for the method that follows, which isn't the only way to do it, just the one that's easiest for me:
Using the code in the Art Gallery above may require more work. Study the code, try cutting and pasting parts of it that look relevant to what you want to do; if you would like more help with it after doing those things, come to see me. Saving your work There are two elements to your work: the pictures you draw, which to Logo are bitmaps; and the code you write to create the pictures. Saving the picture You can save all or part of the Logo screen as a bitmap and then include the bitmap in another file, such as a word-processing document or a web page. (Bitmap is a method of representing pictures in memory; .bmp is the last name that Microsoft gives to bitmap files, used in the same way as .gif, .mp3, and so on.) It would be nice if you could cut and paste Logo bitmaps with the mouse, but as far as I know, that capability is not built into the program. Here's a PDF flowchart you can print from your browser with complete instructions. For the flowchart-impaired, here are the same instructions in words: To save a bitmap, do this:
I advise you next to check out the picture on your desktop to ensure that it's what you want. Logo's default is to take a 1000 x 1000 pixel area in the center of the screen. If that doesn't suit you, you may need to enlarge the area using Bitmap menu/ Active Area. If you need to cut it back, I suggest using Windows' built-in Paint accessory (Start menu/ Program Files/ Accessories). For general file viewing and conversion, nothing beats IrfanView. Saving the program Take my flowchart, please. To save the code that creates your work, you should first put it in one or more Logo procedures and test them. You can create procedures either directly in the editor window or by cutting and pasting between the command history and the editor using the mouse to select, Control-C to copy, Control-V to paste. Once you have your procedures all in order, File menu/ Save will save all of your code to a file with the last name .LGO. You can attach the .LGO file to an e-mail and send it to yourself; you can also cut and paste your code directly into the text of an e-mail, but depending on the mailer, you might lose line breaks. It doesn't work! I will help you. Here are the first questions I will ask:
Expectations for Math 151 students The handout that we used for the class meeting in the computer laboratory is based on several fundamental concepts that occur in virtually all programming environments:
You must write a Logo procedure whose name can be entered on the Logo command line (with or without variable values) to produce your design on the screen. Your procedure should call one or more other procedures. You are free to use the work of other programmers for inspiration and hints, but the work you submit must be your own, or your own team's, if you are working with other students. If your design relies on certain colors, then they should be set within the Logo procedure. Send your work as a file with .LGO extension (Logo's default) attached to an e-mail. In the e-mail, tell me what procedure name and variable values, if any, to enter on the Logo command line. You may certainly submit more than one procedure!
|