Computer Science 112
The Art & Science of Computer Graphics
Fall 2015, The College of Saint Rose
Instructor and Course Information
Instructor: | Dr. James D. Teresco, Albertus Hall 400-6, (518) 485-3755 |
Electronic mail: | terescoj AT strose.edu (best contact method) |
Twitter: | @JTeresco_StR_CS |
Class URL: | [Link] |
Class hour: | Wednesday, Friday 9:00-10:15, Science Center 469A |
Office hours: | Wednesday 1:30-2:30, Thursday 2:00-3:30, Friday 1:30-2:30, and by appointment |
Course News
cd /Volumes/coolj342/cs112
Remember that a convenient way to do this is to type cd then "drag" the folder you want to be using from the Finder to the Terminal window, which results in this path being pasted right into your Terminal!
. 112
python3
and as your first Python statement, set up Ambrosia with
from ambrosia import *
touch sample.py
open -a Aquamacs sample.py
Or from the Finder, right click on the icon for your .py file and choose "Open with..." then choose "Aquamacs".
python3 sample.py
This section will contain descriptions of common problems that people encounter when using Ambrosia and what you probably did wrong.
What Happened? | What Might I Have Done Wrong? | How Can I Fix It? |
Your cd command failed to switch to your course directory (with an error like "No such file or directory" | You might have spelled something wrong, had a space somewhere it should not be or did not have one where it should be, did not capitalize something. | Check your spelling, punctuation, etc.. |
Your cd command failed to switch to your course directory (with an error like "No such file or directory" | You have not mounted your network drive yet. | Open a Finder window (double-click on the "Macintosh HD" icon), choose the "SAN4" or similar entry on the left, find and click on your username's folder in the big list. |
The "from ambrosia import *" statement produces an error like "ImportError: No module named 'ambrosia'" | You forgot to set up Ambrosia. |
Run the ". 112 " command before you run Python. It has to be
typed exactly: the period, followed by a space, followed by "112". |
The "from ambrosia import *" statement produces an error like "from: can't read /var/mail/ambrosia" | You are at the system prompt instead of the Python prompt. | First run the python3 command to get into Python. |
You are not seeing the "Edit" tab on your wiki page | You are probably not logged into your wiki account. | Log in! |
A statement like scene.add(...) produces an error like "NameError: name 'scene' is not defined | You have not imported Ambrosia. | Include the "from ambrosia import *" line. |
You see a "SyntaxError" | You have one or more statements that do not conform to the syntax rules of Python. | Check for imbalanced parentheses, missing or misplaced commas, and similar things. Remember that the mistake is often on the statement before the one where Python indicated an error! |
You get no error messages but no image appears when you run your model. | You forgot the "camera.shoot()" statement. | Put it in! |
Texts
There is no text for the course. Links to relevant web pages and occasional additional readings will be made available when appropriate.
We will make extensive use of the Ambrosia Modeling System, developed by Duane Bailey, and the documentation provided by that system.
Related Information and Links