Download presentation
Presentation is loading. Please wait.
Published byBaldric Thornton Modified over 9 years ago
1
CS123 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Spring 2012
2
Administrative Notes Please contact your instructor immediately if you are eligible for extended time for the Proficiency Exam Please also review your bbVista Lab and Quiz grades and report any discrepancies to your instructor As with cs121 and cs122, there will be an opportunity to earn a 2% bonus for submitting a student evaluation. Details to follow! Lab 4 completion sessions along with the makeup lab will be moved to Tuesday, 5/29 due to the Memorial Day holiday on 5/28 –Rooms to be determined
3
Proficiency Exam Preview Same logistics as in cs121 and cs122 –Proctored format –Two quizzes (25 and 70 minutes) –Sign-in and score verification –No access to bbVista – will have access to all course site materials To be conducted during week of June 4th (week 10) in class for your regularly scheduled lab session Practice – week of May 28 (week 9) –All 4 quizzes and quizlets taken throughout the term will be re-posted on Tuesday, 5/29 – note that quiz 4 will take place during week 9 –A special quiz containing some problems not included in regular quizzes will also be issued – these questions are candidates for inclusion –Full quiz week (9) CLC coverage – Monday through Friday Graduating seniors are NOT exempt from the proficiency exam!!
4
Lab 4 Overview Based on materials from Chapter 19 readings and Lab 4 description –Chapter 19 – general high level overview of the Computation lab sequence –Lab 4 – development of a game using another API
5
Lab 4 Overview Lab 4 outline – 3 parts –Part 0 – practice with the game API’s functions –Part 1 – create an animation of the game –Part 2 – create a user interface to control the game settings
6
Lab 4 Maple Concepts Discussion of the Game A take-off of the popular “Angry Birds” game Numerous concepts from previous labs utilized –CS121 – Lab 4 – use of disk plot feature to draw the bouncing ball –CS122 – Labs 1 and 2 – use of a “home grown” API to develop the basic scenario –CS122 – Lab 3 – use of DrawBox logic to define the lower left corner of the target –CS122 – Lab 4 – the bouncing ball script will simulate the toss of a ball to a target Will also create an animation similar to the way we constructed one in CS122 – Lab 4 –CS123 – Lab 3 – construction of a user interface using Maple’s GUI (components) feature
7
Lab 4 Maple Concepts: Discussion Game API – 3 key functions available –createTarget(x,y,w,h) Creates a target area consisting of 2x2 squares –x, y represent the coordinates of the lower left corner of the target area –w, h represent the target area’s width and height –drawBoard(T) Takes the list of target coordinates (T) and creates a plot structure of the target area for display –detectHits(x,y,radius,T) Performs collision detection (number of squares in the target area that have been knocked over) –x, y = coordinates of the center of the ball (disk object) –radius = radius of the ball –T = target list as created by createTarget function
8
Lab 4 Maple Concepts: Discussion Flow of lab –1 st copy the zipped file from the course site (to the desktop or downloads folder) and then extract (MAC may automatically extract for you) Same as in CS122 – labs 1 and 2 – Car Simulation API –Part 0 – open starter script (Lab4Part0.mw) and follow instructions from lab description –Parts 1and 2 – open starter script (Lab4Parts1and2.mw) and follow instructions from lab description
9
Anatomy of an animation (from Lab 4 – CS122) # 1 st, create a table variable to store frames –frames := table(); # Within loop, populate table with individual frames –frames[i] := plot([xp],[yp],style=point, color=“Green”); # this plot is of a single point (xp,yp) # after all frames are populated, run an animation # insequence=true causes the animation to take place –display(convert(frames,list), insequence=true,scaling=constrained);
10
Quiz Week (9) Activities Quiz 4 will be released on Friday (5/25) at 6 PM –Deadline: Thursday (5/31) at 4:30 PM –Makeup quiz – from Friday (6/1) at 9 AM through Sunday (6/3) at 11:00 PM 30% penalty No Pre-lab quizlet Be sure to visit the CLC for quiz assistance Practice week for Proficiency Exam –Will be posting practice quizzes on Tuesday, 5/29 –Exam to be conducted during week of June 4 (week 10 - final week of regular classes)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.