CS 151 FAQ
This page will contain quick answers to commonly asked questions and (hopefully) helpful facts.
How do I get to my Personal directory in a terminal?
You need to use the cd, or change directory command to go to your personal web directory. On a mac, all mounted file systems are in the /Volumes directory. If you username was bmaxwell, then you would use the following command to go into your Personal network directory.
Just substitute your email username for bmaxwell in the path above. You will then need to cd to any subdirectories (like a cs151 folder) you may have created within your network directory.
How do I create an animated gif?
First capture all of the pictures you want to store in your animation sequence. You can use the window capture method on a mac to do this (recommended so that all of the images are the same size). To capture a window, use cmd-shift-4 and then hit the space bar to get the camera icon.
Next, open a terminal and cd to the directory where your images are located. If you have captured them on a mac, they will be on the Desktop. From your home directory type
To create an animated gif, use the command line tool convert. It is installed on the macs in the Olin lab, but you can also download it from the ImageMagick web site. There are binaries for both macs and PCs. If your images are image1.png, image2.png, and image3.png, you can combine them into an animated gif using:
convert image1.png image2.png image3.png anim.gif
You can also use the wildcard character * to make life easier.
convert image*.png anim.gifSo if you are using screen captures from a mac, you can do something like:
convert Picture*.png anim.gif
There is one catch, however. The order in which the files will be listed by Picture*.png is alphabetical. Hence, Picture 2.png will come after Picture 11.png, which is probably not what you want. The easiest way to fix this is to change the filenames of the first nine images. Change Picture 1.png to be Picture 01.png, Picture 2.png to be Picture 02.png, and so on through Picture 9.png. Then type the command above and you'll get the pictures in the proper order.
The convert tool is extremely powerful and has many options. There are options for controlling how fast your animation cycles, for example. Go to the ImageMagick web site to find documentation and usage examples.