Textbook Notes (280,000)
US (110,000)
BU (1,000)
CAS CS (6)
Chapter 1-4

CAS CS 101 Chapter Notes - Chapter 1-4: Boolean Expression, Infinite Loop, Minimum Bounding Box

Computer Science
Course Code
CAS CS 101
Aaron Stevens

This preview shows pages 1-2. to view the full 6 pages of the document.
Chapter 1 Alice Notes
Flow - a series of steps that precisely specify (in order) the behavior of each
object in the story
in programming, known as an algorithm (a sequence of steps that solve a
Object Tree - where the objects in your world are listed (main programming
occurs here)
contains several objects:
Camera - can be moved within the world, its position determines the world
window, changes the position and orientation
Light - can be moved, but rarely | can change the position, orientation, color,
Ground - doesn’t make sense to move it but has options (snow, grass, dirt, etc.)
Details Area - includes properties, methods, and functions panes
properties pane: lists properties, or changeable attributes of an object
includes color, opacity, vehicle, skin texture, fill style, point of view, and visibility
methods pane: lists the messages we can send that object to animate it
functions pane: lists the messages we can send the object to get information
from it
includes: proximity, size, spatial relation, point of view, subparts
Editing Area - where we edit or build the program that controls the animation,
contains “world.myfirstmethod” (starts empty, or without statements)
Events Area - where we can tell Alice what to do when special actions (events)
clicking “Play” will run through the “my first method” which is made up of any
statements within it
doInOrder - a structure within which we can place program statements and will
perform them in the order they appear, top to bottom
methods - behavior-producing messages
target - the things that which we want an object to point at, move toward, etc.
doTogether - a structure within which we can place program statements to
perform them simultaneously
Chapter 2 Alice Notes
Creating your own methods (under “world"):
to divide your story into manageable pieces to help keep it more organized
to provide an object with a behavior it should have, but does not
NOTE: methods should start with lowercase letters and should NOT have spaces
Send all the new scenes the “world.myfirstmethod” in order for Alice to play them
TIP: if you need to use the scroll bar to view all the statements in a “scenes”
method, it’s good to break scenes down to separate shots
edit each shot individually, then order them under their specific scene, and
ultimately put the “play scene” in the “world.myfirstmethod”

Only pages 1-2 are available for preview. Some parts have been intentionally blurred.

Object Methods
Used to define a complex behavior for a single object
NOTE: in the editing area, you can use “//“ to place your own personal comments
in between statements so that you can understand what they do
Reusing your work
Drag your work to the clipboard in the top right corner in order to copy and paste
it to a different world method or use later
to use in a different world:
right click object, choose “save object…”, and pick a place to save it, then “File”
—> “import”
Dummies - an invisible marker in your world that has a position and an
Manually move the camera until it is in the position and orientation where you
want it for a given shot
Drop a dummy at this specific camera position to gain the camera’s point of view
Rename the dummy something descriptive
At the beginning of the method for this shot, send the camera the
setPointOfView() message with the dummy as its target
3D Thinking
Every object has the 2 following properties
1. an object’s position determines its location within the 3D world
2. an object’s orientation determines the way it is facing in the 3D world,
determining what is in front and behind, left and right, and above and below the
Every object has 3 axes
1. backward & forward
2. right & left
3. Up & down
we can use the axes to determine an object’s exact location, these make up an
object’s position
1. Left-Right determines width (LR axis)
2. Up-Down determines height (UD axis)
3. Forward-Backward determines depth (FB axis)
The “Move” method contains these three axes
1. Yaw: causes an object’s rotation on the same axis, rotates on the UD axis (turn
object left and right) (ex. shaking head no)
2. Pitch: cause an object to “dive” up or down, rotates on the LR axis (ex. a plane
pointing up or down) (ex. shaking head yes)
3. Roll: cause an object to “roll” left or right, sort of like banking a turn, uses the FB
You're Reading a Preview

Unlock to view full version