Nature of Computing

 

CSCI 104 (Section 04), spring 2018

 

 

To the Bottom of the Page

 

Instructor:     Dr. Shieu-Hong Lin

Email: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: LinEmail

 

Class:              Wednesday 1:30-3:20PM at Busn 210

 

Dr Lin’s Office Hours: Math & CS department at Lim 137.

·         Contact Dr. Lin in advance to set up an appointment by email.

·         M T Th 9:00-10:30am 1:30-3:00pm.

 

Syllabus: Full version

 

Approach: As the key component of the class, we'll conduct a light-weight exploration of the "nature of computing" using simple programming experiments for generating animation and visual beauty. In that regard, we'll learn the basics of Processing, a simple programming language widely used by visual artists, through lectures and supplementary stuff available online.

 

*****************************************************************

 

Week 1: Overview and Introduction 

 

Reading for Week #1: Processing Overview on processing.org

 

            Showcases on the nature of computing: programming AI applications

·         Artificial creatures and robotic zoo: 1, 2, 3

·         IBM Watson in the Jeopardy show: 1

·         Automatic recognition of facial expressions: 1, 2 

 

 

Class activities:

·         Copy and paste the code in this Mouse and Lines program into the Processing environment to create and run your first interactive Processing program.

·         Read the descriptions about line( ), stroke( ), and background( )  to understand how they are used in the Mouse and Lines program. Modify the parameter values used where line( ), stroke( ), and background( ) in the program in different ways and run the program as experiments to see the effects.

·         Read the descriptions about rect( ), fill( ), and background( ) to understand how to draw rectangles. Instead of drawing lines in the Mouse and Lines program, modify the program to draw rectangles instead as experiments to see the effects.

·         Play with simple Processing examples such as: Continuous Lines, Bouncing Ball, and more.

·         Work on a program to draw the rows and columns of the board for tic-tac-toe (i.e. to create 3 rows and 3 columns) on a 900 by 900 canvas window by using 2D primitive functions such as rect( ), fill( ), and background( ). Alternatively you may also use line( ), stroke( ), and background( ) to accomplish the task.

 

 

Attendance Report #1 Due: Wednesday, Jan. 10

·         Download and fill out this attendance report. Submit your report under Canvas.

 

Lab assignment #1 Due: Wednesday, Jan. 17

·         Download and install Processing on your own computer: check it out from processing.org.

·         Based on what you have learned in the class, write a program to draw the rows and columns of the board for tic-tac-toe (i.e. to create 3 rows and 3 columns) on a 900 by 900 canvas window by using 2D primitive functions such as rect( ), fill( ), and background( ). Alternatively you may also use line( ), stroke( ), and background( ) to accomplish the task.

·         Submit your program on Canvas: Copy and paste your program into the text pane for this assignment under Canvas.

 

*************************************************************************************************

 

Week 2: Coordinate System and Introduction to the Creation of Simple Dynamics

 

Reading for Week #2: Tutorial on the coordinate system and basic shapes on processing.org

 

 

Concepts explored and revisited in the class

·         Program: a collection of instructions (Statements and comments) for the computer to behave

·         Function: a module in a program that can be called as needed for accomplishing some specific task

·         Predefined function: a function that is predefined and provided by Processing, e.g. point( ), line( ), rect( ), ellipse( ),   size( ), stroke( ), background( ), println( )

·         User-defined functions: Programmers can define their own functions. For example, you can define two fundamental functions setup( ) and  draw( ) to create interactive Processing programs.

·         Variables for the memory of information: Variables are symbolic names to refer to memory storage of information. For example, mouseX and mouseY are two predefined variables that keep track of the coordinates of the mouse position.

·         The coordinate system and basic shapes in Processing: Read and learn more from this tutorial.

 

New concepts to explore in the class

·         Predefined variables: They are names predefined by Processing to refer to memory storage of important information. For example, mouseX and mouseY are two predefined variables that keep track of the coordinates of the mouse position, and the information in these two variables allow your program to interact with use based where the user places the mouse on the canvas.

·         User-defined variables: You can also create your own user-defined variables to store information you want to keep track of. To define a variable of your own, you need to declare the “type” of the variable. Examine the float type and see the examples there regarding how you may define your own variables.

·         Arithmetic Operators: You can have the computer calculate new information by applying numerical operations (such as +, , *, / ) to the information stored in variables and numbers. The computer can calculate the result of any arithmetic expressions composed of numerical operators (such as +, -, *, / ) and numerical operand (such as numerical variables and numbers). For example,

400+0.01*( mouseXmouseY)

is an arithmetic expression involving the operators: +, , * and the  operands: 400, 0.01, mouseX, and mouseY.

·         Storing information into user-defined variables: You can use the assignment operator =  to change the information stored in user-defined variables. On the right hand side of the assignment operator =, you need to provide an arithmetic expression as a formula. On the left hand side of the assignment operator = , you need to specify a variable as the destination for storing the result. The computer will then calculate the result of the formula and store it into the variable. For example, following the statement

y_Blue_Rect  = y_Blue_Rect +5;

the computer will calculate the result of y_Blue_Rect +5 first and then store the result into y_Blue_Rect to update the contents of y_Blue_Rect.

 

·         Relational Operators: You can have the computer test the information stored in variables, numbers, and arithmetic expressions using relational operators such as != (inequality) , < (less than) , <= (less than or equal to) , == (equality) , > (greater than) , >= (greater than or equal to) and get an answer of true or false.

·         if and else statements: You can use if and else statements to have the computer behave differently according to whether the test result of a relational operator is true or false.

 

 

Class activities:

·         Copy and paste the code in the following sample programs 1, 2, 3 one by one into the Processing environment and run them to see the dynamics created.

·         Go through each of the program to understand the concepts of variables, assignment operation, and if statements.

·         Work on a program to have two rectangles bouncing back and forth left to right and right to left in different speeds.

 

 

Attendance Report #2 Due: Wednesday, Jan. 17

·         Download and fill out this attendance report. Submit your report under Canvas.

 

Lab assignment #2 Due: Wednesday, Jan. 24

·         Based on what you have learned in the class , write a program to have two rectangles bouncing back and forth left to right and right to left in different speeds.

·         Submit your program on Canvas: Copy and paste your program into the text pane for this assignment under Canvas.

 

*************************************************************************************************

 

Week 3: More on the Coordinate System and Simple Dynamics (I): Bouncing Balls and Walls

 

·         Reading for Week #3: Tutorial on Interactivity on processing.org regarding ways of interactions using the keyboard and the Mouse.

 

Concepts to know in the class:

·         Revisit all the earlier concepts explored in Weeks 1-2.

·         Manhattan distance: The Manhattan distance between a point (x1, y1) and another point (x2, y2) as |x1-x2| + |y1-y2|, i.e. the sum of ‘the absolute value of the difference of the X coordinates’ and that of the Y coordinates. See this example.

 

 

Class activities: Bouncing ball

·         Bouncing ball: Please carefully study the following sample Processing programs simulating the dynamics of a bouncing ball: 1 (a bouncing ball in a box), 2 (add a vertical ‘mouse’ wall moving along with the mouse, but no interaction with the ball), 3 (the ball now bouncing from the vertical mouse wall too).

·         Manhattan distance: We’ll learn about the absolute value function abs( ) and use it to help us determine the Manhattan distance between a point (x1, y1) and another point (x2, y2) as |x1-x2| + |y1-y2|, i.e. the sum of ‘the absolute value of the difference of the X coordinates’ and that of the Y coordinates.

 

Attendance Report #3 Due: Wednesday, Jan. 24

·         Download and fill out this attendance report. Submit your report under Canvas.

 

 

Lab assignment #3 Due: Wednesday, Jan. 31

·         Based on what you have learned in the class, modify program in 3 to do the following.  (i) Create two bouncing balls with different speeds and colors of their own. (ii) Each of the balls should be able to move in its own directions and bounce back from the box boundary and the moving ‘mouse’ wall properly. (iii) The two balls ‘collide’ when their Manhattan distance is less than a small number (let’s say 20) and each ball should then move in a direction opposite to its direction before the collision.

·         Submit your program on Canvas: Copy and paste your program into the text pane for this assignment under Canvas.

 

 

*************************************************************************************************

 

Week 4: More on the Coordinate System and Simple Dynamics (II): Chasing and Following

 

·         Reading for Week #4: Tutorial on Interactivity on processing.org regarding ways of interactions using the keyboard and the Mouse.

 

Concepts to know:

·         Revisit all the earlier concepts explored in Weeks 1-3.

·         Functions about 2D primitives and shapes: line( ), rect( ), ellipse( ), arc( ), triangle( ), quad( ),

·         Functions about the settings of background, stroke, and fill: background( ),  stroke( ),  strokeWeight( ), noStroke( ), fill( ), noFill( )

·         User-defined functions: For an interactive Processing program, you need to define two fundamental functions setup( ) and  draw( ) to make the program interactive. Programmers can also define additional functions of their own.

 

 

Class activities: More on Simple Dynamics

·         Following and Chasing (Circle vs Rectangle): Carefully study the following sample Processing programs: 1 (slower when closer), 2 (game and text), 3 (faster when closer), 4 (going away faster when closer), 5 (a chasing game).

 

 

Attendance Report #4 Due: Wednesday, Jan. 31

·         Download and fill out this attendance report. Submit your report under Canvas.

 

 

Lab assignment #4 Due: Wednesday, Feb. 7

·         Based on what you have learned in the class, create 2 programs to do the following.  (i) Modify program in 1 to create 2 circles such that the first circle will follow the rectangle while the second circle will follow the first circle. If you want yo can extend it to have more circles following one another in a similar fashion (ii) Modify program in 5 such that there are more than one “capture” areas to capture the circle as fish.

·         Submit both of your programs on Canvas: Upload your programs as two separate text files under Canvas.

 

 

*************************************************************************************************

 

Week 5: Simple 2D Modeling Using Basic Shapes: First Exploration

 

·         Reading for Week #5: Read the technical descriptions of triangle( ) and quad( ).

 

Concepts to know:

·         Revisit all the earlier concepts explored in Weeks 1-4.

·         Functions about 2D primitives and shapes: line( ), rect( ), ellipse( ), arc( ), triangle( ), quad( )

·         Functions about the settings of background, stroke, and fill: background( ),  stroke( ),  strokeWeight( ), noStroke( ), fill( ), noFill( )

·         User-defined functions: For an interactive Processing program, you need to define two fundamental functions setup( ) and  draw( ) to make the program interactive. Programmers can also define additional functions of their own.

 

 

Class activities:

·         2D Modeling of fish using triangle( ) and quad( ): Carefully study the following sample Processing programs: 1 (a school of fish modeled by circles ), 2 (the first fish now modeled by the user-defined drawFish function).

 

 

Attendance Report #5 Due: Wednesday, Feb. 7

·         Download and fill out this attendance report. Submit your report under Canvas.

 

 

Lab assignment #5 Due: Wednesday, Feb. 14

·         Based on what you have learned in the class about the user-defined drawFish function, modify program in 2  to define two similar functions drawFish2  and drawFish3 to model the other fish. Each fish should look different in their appearance when we call these functions to draw the school of fish.  Also try to modify the dynamics such that the fish will keep some distance away from one another, instead of completely overlapping with one another in the end when we stop moving the mouse.

·         Submit your program on Canvas: Upload your programs as a text file under Canvas.

 

*************************************************************************************************

 

Week 6: Modeling Fish: Rigid Body with Active Fins and Tails

 

·         Reading for Week #6: Read the technical descriptions of triangle( ) and quad( ).

 

Concepts to know:

·         Revisit all the earlier concepts explored in Weeks 1-5.

·         Functions about 2D primitives and shapes: line( ), rect( ), ellipse( ), arc( ), triangle( ), quad( )

·         Functions about the settings of background, stroke, and fill: background( ),  stroke( ),  strokeWeight( ), noStroke( ), fill( ), noFill( )

·         User-defined functions: For an interactive Processing program, you need to define two fundamental functions setup( ) and  draw( ) to make the program interactive. Programmers can also define additional functions of their own.

 

 

Class activities:

·         Further 2D Modeling of fish using triangle( ) and quad( ): Carefully study the following sample Processing demo programs to understand the design and the use of the new drawFish function: 1 (derived from 3 circles following the mouse, with the first circle now rendered as a fish),  2 (derived from 3 circles following the mouse, with the first two circles now rendered as two fish), 3 (derived from 3 circles following a bouncing ball with the first two circles now rendered as two fish). Carefully study the following sample Processing demo programs to understand the design and the use of the drawFishWithActiveFins function: 4 (derived from 3 circles following the mouse, with the first circle now rendered as a fish),  5 (derived from 3 circles following the mouse, with the first two circles now rendered as two fish), 6 (derived from 3 circles following a bouncing ball with the first two circles now rendered as two fish).

 

 

Attendance Report #6 Due: Wednesday, Feb. 14

·         Download and fill out this attendance report. Submit your report under Canvas.

 

 

Lab assignment #6 Due: Wednesday, Feb. 21

·         Based on what you have learned in the class about the user-defined drawFishWithActiveFins function, modify the program 5 and  6 to create a program that has (i) 3 fish of different sizes and colors following the mouse and (ii) 3 fish of different sizes and colors following the bouncing ball.  If you can, add an optional feature that will make the ball bounce back in opposite direction when it collides with the mouse.

·         Submit your program on Canvas: Upload your program as a text file under Canvas.

 

*************************************************************************************************

 

Week 7: Modeling Fish: Rigid Body with Active Fins and Tails Using the Object-Oriented Approach

 

·         Reading for Week #7: Read the tutorial on objects and classes in Processing.

 

Concepts to know:

·         Revisit all the earlier concepts explored in Weeks 1-6.

·         New: Objects and object-oriented programming depicted in the tutorial on objects and classes.

 

 

Class activities:

·         Further 2D Modeling of fish using object-oriented programming: Carefully study this sample Processing demo program to understand the design of the RigidFish class and the use of RigidFish objects to more conveniently model the interactions of fish.

 

 

Attendance Report #7 Due: Wednesday, Feb. 21

·         Download and fill out this attendance report. Submit your report under Canvas.

 

 

Lab assignment #7 Due: Wednesday, March 7.

·         Based on what you have learned in the class about the design of the RigidFish class and the use of RigidFish objects, modify this sample Processing demo program to create a program that has (i) 3 RigidFish objects to model one school of 3 fish of different sizes and colors following the mouse, (ii) another 3 RigidFish objects as a second school of 3 fish of different sizes and colors following a bouncing ball, and  (iii) make the ball bounce back in opposite direction when it collides with the mouse.

·         Submit your program on Canvas: Upload your program as a text file under Canvas.

 

*************************************************************************************************

 

Week 8: Modeling Fish and Movement I: RigidFish Class + MovingItem Class

 

·         Reading for Week #8: Read the tutorial on objects and classes in Processing.

 

Concepts to know:

·         Revisit Objects and object-oriented programming depicted in the tutorial on objects and classes.

·         Revisit all the earlier concepts explored in Weeks 1-7.

 

 

Class activities:

·         Further 2D Modeling of fish using object-oriented programming: Carefully study the following sample Processing demo programs 1 (an aggressive fish chasing a visible bouncing ball), 2 (an aggressive fish chasing an invisible bouncing ball), 3 (similar to 1 but the head oriented toward the mouse), 4 (a cautious but curious fish tracking a visible bouncing ball), 5 (a cautious but curious fish tracking an invisible bouncing ball), 6 (similar to 4 but the head oriented toward the mouse), 7 (similar to 5 but with the tail oriented toward the ball), 8 (similar to 7 but with an invisible ball), 9 (a cautious but curious fish tracking the leading fish a school of 3 fish, which follow the mouse) to understand the design of the RigidFish class + MovingItem class and the use of RigidFish objects and MovingItem objects to more conveniently model the dynamics of fish.

 

 

Attendance Report #8 Due: Wednesday, Mar. 7

·         Download and fill out this attendance report. Submit your report under Canvas.

 

 

Lab assignment #8 Due: Wednesday, March 14.

·         Based on what you have learned  about (i) the design of the RigidFish class and the MovingItem class and (ii) the use of RigidFish objects and MovingItem objects, design a scenario of at least three schools of fish (each school with one or more fish) interacting with the mouse and two moving objects in some interesting way, implement your scenario based on the demo programs you play with in the class today, and  explain your scenario as comments in the beginning of your program.

·         Submit your program on Canvas: Upload your program as a text file under Canvas.

 

*************************************************************************************************

 

Week 9: Modeling Fish and Movement II: Enhancing the MovingItem Class

 

·         Reading for Week #9: Read the tutorial on objects and classes in Processing.

 

Concepts to know:

·         Revisit the concepts of objects and object-oriented programming depicted in the tutorial on objects and classes.

·         Review the sample programs from Week 8: 1 (an aggressive fish chasing a visible bouncing ball), 2 (an aggressive fish chasing an invisible bouncing ball), 3 (similar to 1 but the head oriented toward the mouse), 4 (a cautious but curious fish tracking a visible bouncing ball), 5 (a cautious but curious fish tracking an invisible bouncing ball), 6 (similar to 4 but the head oriented toward the mouse), 7 (similar to 5 but with the tail oriented toward the ball), 8 (similar to 7 but with an invisible ball), 9 (a cautious but curious fish tracking the leading fish a school of 3 fish, which follow the mouse) to understand the design of the RigidFish class + MovingItem class and the use of RigidFish objects and MovingItem objects to more conveniently model the dynamics of fish.

 

 

Class activities:

·         Enhancing the MovingItem class to allow more moving patterns: 1, 2

 

 

Attendance Report #9 Due: Wednesday, Mar. 21

·         Download and fill out this attendance report. Submit your report under Canvas.

 

 

Lab assignment #9 Due: Wednesday, March 28.

·         Based on what you have learned in the class about the design of (i) the RigidFish class and the MovingItem class and (ii) the use of RigidFish objects and MovingItem objects, complete the implementation of three or more new methods for the MovingItem class such that MovingItem objects can move up and down, left and right, along a circle, or randomly.  You should then have at least 4 RigidFish objects tracking (i.e. move toward) 4 MovingItem objects that move as a bouncing ball, up and down, left and right, along a circle, or randomly respectively.

·         Submit your program on Canvas: Upload your program as a text file under Canvas.

 

*************************************************************************************************

 

Week 10: Modeling Fish and Movement III: Enhancing the MovingItem Class + Interaction through Keyboard Inputs

 

·         Reading for Week #10: Read the Tutorial on Interactivity from Processing.org.

 

 

Concepts to know:

·         Read the Trigonometry Primer from Processing.org.

·         Functions for random number generation and trigonometry: random ( ), sin ( ), cos ( ), radians ( )

·         Predefined variables about keyboard interactions: key, keyCode, keyPressed

 

 

Class activities:

·         Review the sample programs from Week 8: 1 (an aggressive fish chasing a visible bouncing ball), 2 (an aggressive fish chasing an invisible bouncing ball), 3 (similar to 1 but the head oriented toward the mouse), 4 (a cautious but curious fish tracking a visible bouncing ball), 5 (a cautious but curious fish tracking an invisible bouncing ball), 6 (similar to 4 but the head oriented toward the mouse), 7 (similar to 5 but with the tail oriented toward the ball), 8 (similar to 7 but with an invisible ball), 9 (a cautious but curious fish tracking the leading fish a school of 3 fish, which follow the mouse) to understand the design of the RigidFish class + MovingItem class and the use of RigidFish objects and MovingItem objects to more conveniently model the dynamics of fish.

·         Inspection and experiment: Examine and play with the sample program here, which collects all the 9 behavior patterns from the sample programs above into one place and allow the user to select any of the 9 patters by pressing a digit in 1 to 9. Note that make sure you click on the graphics window to select the window once before you start to use the keys to select the patterns.

 

 

Attendance Report #10 Due: Wednesday, Mar. 28

·         Download and fill out this attendance report. Submit your report under Canvas.

 

 

Lab assignment #10 Due: Wednesday, April 4.

·         Based on what you have learned in the class about the design of the MovingItem class, implement one more new method inside the MovingItem class such that MovingItem objects can move up in a circle.  

 //*****************************************************************************************

  // For each object of the MovingItem class:

  // The following method allows us to move the object along a given circle centered at (circleCenterX , circleCenterY)

  //     with a given radius in a given angular speed.

  //*****************************************************************************************

  void moveInCircle(float circleCenterX, float circleCenterY, float radius, float angularSpeed)

  {  //Implement you code

 

  }

·         Like Lab 9 last week, you should then have at least 4 RigidFish objects tracking (i.e. move toward) 4 MovingItem objects that move in various ways. But for this lab, one of the MovingItem objects must move in a circle. Optional: In the draw function, write some code using the information in keyPressed and key to allow the user to have that object (i) move slightly faster each time the key f is pressed, (ii) move slightly slower each time the key s is pressed, (iii) slightly increase the radius each time the key a is pressed, (iv) slightly decrease the radius each time the key d is pressed. In the draw function, write some more code using the information in keyPressed and keyCode to allow the user to move the center of  that object move left, right, up, down accordingly when  the special keys for LEFT, RIGHT, UP, DOWN are pressed.

·         Submit your program on Canvas: Upload your program as a text file under Canvas.

 

*************************************************************************************************

 

Week 11: Modeling Fish and Movement IV: MovingItem Class + Interaction through Keyboard Inputs

 

·         Reading for Week #11: Review the Tutorial on Interactivity from Processing.org.

 

 

Concepts to know:

·         Read the Trigonometry Primer from Processing.org.

·         Functions for random number generation and trigonometry: random ( ), sin ( ), cos ( ), radians ( )

·         Predefined variables about keyboard interactions: key, keyPressed

 

 

Class activities:

·         Examine and play with the sample program here, which collects all the 9 behavior patterns from the sample programs above into one place and allow the user to select any of the 9 patters by pressing a digit in 1 to 9. Note that make sure you click on the graphics window to select the window once before you start to use the keys to select the patterns.

·         Examine and play with this program to see a fish moving in a circle and a fish moving with somewhat random perturbation.

·         Play with this sample program and examine the code in the draw function to see how it can allow us to move a racket up, left, right, down by pressing the keys i, j, k, m respectively by using the information in keyPressed and key.

 

 

Attendance Report #11 Due: Wednesday, April 4

·         Download and fill out this attendance report. Submit your report under Canvas.

 

 

Lab assignment #11 Due: Wednesday, April 11.

·         In Lab 10 last week, you have at least 4 RigidFish objects tracking (i.e. move toward) 4 MovingItem objects that move in various ways, and one of the MovingItem objects must move in a circle. This time add code to do the following things in addition.  First: (i) declare variables outside and before the draw function to record the initial settings of the circle such as the X and Y coordinates of the center, the radius, and the angular speed and (ii) in the draw function, have one of the MovingItem objects must move in a circle. Second: in the draw function, write some code using the information in keyPressed and key to allow the user to have that object (i) move slightly faster each time the key f is pressed, (ii) move slightly slower each time the key s is pressed, (iii) slightly increase the radius each time the key a is pressed, (iv) slightly decrease the radius each time the key d is pressed. Third: in the draw function, write some more code using the information in keyPressed and key to allow the user to move the center of  that object move left, right, up, down accordingly by pressing the keys i, j, k, m respectively.

·         Submit your program on Canvas: Upload your program as a text file under Canvas.

 

*************************************************************************************************

 

Week 12: Faith-and-Learning Reflection | Planning for the Final Fish-Pond Project

 

Faith and Learning Integration Assignment I: (Go to è Assignments è Faith and Learning Reflections) Wednesday April 11, the submission link open till April 13.

 

Attendance Report #12

·         No separate attendance report needed this week. Instead, work on the Faith and Learning Integration Assignment I and submit your work for Faith and Learning Integration Assignment I.

           

Lab assignment #12: Formation Stage I of the Fish-Pond Project Due: Wednesday, April 18.

·         Overview: We have seen artificial creatures and robotic zoos (1, 2, 3) created in the physical world. We would like to build our own artificial fish pond with its own dynamics in a virtual world.

·         Examples of Dynamics: Examine and play with the sample program here, which collects all the 9 behavior patterns from the sample programs above into one place and allow the user to select any of the 9 patters by pressing a digit in 1 to 9. Note that make sure you click on the graphics window to select the window once before you start to use the keys to select the patterns.

·         Submission: Carefully read the descriptions regarding the Formation Stage I of the Fish-Pond Project and submit your work accordingly as Lab assignment #12.

 

*************************************************************************************************

 

Week 13: Working toward the Final Fish-Pond Project  |  Lily Pads + More Moving Patterns

 

·         Reading for Week #13: Review the Tutorial on Interactivity and Trigonometry Primer from Processing.org.

 

 

Concepts to know:

·         Revisit the concepts from the previous weeks.

·         Functions for random number generation and trigonometry: random( ), sin ( ), cos ( ), radians ( )

·         Predefined variables about keyboard interactions: key,  keyPressed

 

 

Class activities:

·         Play with this program to see (i) how a fish can interact with a lily pad and/or the mouse in three different ways when you press the keys a, b, and c respectively, (ii)  how fish can move in a zigzag fashion, and (iii) how fish can move along an ellipse. You can press the keys v and i to make the guiding MovingItem objects (balls) visible or invisible.

·         Examine the code in the draw function to see how we make the behavior above happen by properly using the MovingItem objects to move in the patterns we want and let the RigidFish objects trace them. Do experiments to change the moving patterns of the lily pad.

 

 

Attendance Report #13 Due: Wednesday, April 18

·         Download and fill out this attendance report. Submit your report under Canvas.

 

 

Lab assignment #13 Due: Wednesday, April 25.

·         Based on the program we examine in the class, create a pond of at least 3 lily pads, each of which has its own size, location, and moving pattern together with at a fish or a school of fish interacting with it.

·         Submit your program on Canvas: Upload your program as a text file under Canvas.

 

*************************************************************************************************

 

Week 14: Wrapping up the Fish Pond Project

 

Game Project: Submission of the self-evaluation report + your program due: Thursday, May. 3

·         Specification of the Fish Pond Project

·         A very simple demo program:  1 (try the keys a, b, c, i, and v)

·         Optional help time during the final week: Tuesday May 1st 2:35-4:35pm at Busn 210.

·         Submission: Fill out this self-evaluation report and then upload both (i) the report and (ii) your final Processing program through Biola Canvas.

 

Faith and Learning Integration Assignment II: (Go to:  Assignments : Faith and Learning Reflections) due: Thursday, May. 3.

 

IDEA course evaluation: Please provide your feedback there to help us determine the value of a programming course like this for 3 math units in the core curriculum.

 

*************************************************************************************************

 

 

 

To the Top of the Page