280 likes | 474 Vues
CSE 590 ET. Student submission examples. Kelvin Sung. Scene Node. Transform Op. P List. SN-List. Scene Nodes. Transform Operator Translation/Scale/Rotate A Primitive List A List of primitives A SceneNode List A List of SceneNodes Concatenation of Transform operators. 3. 45 o. SN.
E N D
CSE 590 ET Student submission examples
Scene Node Transform Op. P List SN-List Scene Nodes • Transform Operator • Translation/Scale/Rotate • A Primitive List • A List of primitives • A SceneNode List • A List of SceneNodes • Concatenation of Transform operators
3 45o SN SN S(2) R(45o) 1 2 SN Ty(2) 0.5 For example …
SN R(45o) SN Ty(-2) SN R(-45) -2 -2 What does these do?
The Fate of Software Projectsin Industry: Question • Under some reasonable definition of a “project” (you make it up), what would you guess is the percentage of software projects that fail (i.e., that don’t accomplish their goals)? Choose the nearest approximation: • 0-20% • 20-40% • 30-60% • 60-80% • 80-100%
The Fate of Software Projects in Industry: Answer • Historically, 85% of software projects fail. • Here is how the software engineering class voted:
Chief Reasons for Software Project Failures: Question • What might be the main reasons behind such a large percentage of software project failures? State one reason that you think is prevalent.
Chief Reasons for Software Project Failures: Answers • Most students pointed out valid reasons. • What seasoned professionals say is that the majority of software projects fail • not because of technical deficiencies or problems • but because of underestimating or sometimes even completely ignoring the human aspect, including: • the relationship with the customer • regular and explicit communication between all stakeholders – managers, developers, testers, marketing, sales, customers
Hunt for Errors • Fix as many errors as possible in the code on the next slide. • C++ code (so answers provided) • Level: Finding semi-colons, declaring variables, formatting cout, using comments
Hunt for Errors: Find and Correct #include <iostream> #include <cmath> int main() { int num1; float fnum(4.576); sum=num1*fnum; cout << The correct answer is << sum << \n; return 0; }
Hunt for Errors: Solution //Output of values so that they are understandable cout << "Input values " << num1 << " and " << fnum << "were added together.\n"; cout << "The correct answer is " << sum << "\n"; return 0; } /* The goal of this program is to add a floating point number to an integer and store it as a floating point number. */ #include <iostream> #include <cmath> using namespace std; int main() { //Declaration of three variables used int num1; float fnum(4.576), sum; //Initialization of uninitialized values num1=23; //Calculation sum=num1+fnum;
Working with Loops • Given the following code, write the output of the code and count the number of iterations. • Examples include input inside and outside the loops. • One loop is infinite. • The iterator of a for loop also changes inside the loop.
Loop 1 count=1; MAX=15; while (count<MAX) { cout << count; count+=4; } cout << count;
Loop 1: Answer count=1; MAX=15; while (count<MAX) { cout << count << endl; count+=4; } cout << count; Output: 1 5 9 13 17 Iterations: 4
Loop 2 sum=0; n=20; while (n>0) { sum+=n; } cout << sum;
Loop 2: Answer sum=0; n=20; while (n>0) { sum+=n; } cout << sum; Output: (no output) Iterations: Infinite
Loop 3 sum=0; for (iterate=1; iterate<=10; iterate++) { sum+=iterate; iterate++; cout << iterate << endl; } cout << sum;
Loop 3: Answer sum=0; for (iterate=1; iterate<=10; iterate++) { sum+=iterate; iterate++; cout << iterate; } cout << sum; Output: 2 4 6 8 10 25 Iterations: 5
Just what is CS anyway? Write down up to five adjectives that you think describe computer science:
Linked List vs. Array List one advantage and one disadvantage for each:
Affine Transformations • Rotation (Rot[<deg. CW>]) • Reflection (Rx, Ry)
Affine Transformations (Cont.) • Translation ( Trans[x,y] ) • Multiple Transformations • Transformations can be concatenated ( * ) • Operations Performed from Left-to-Right
Exercise Perform the following Affine Transformation: Rx * Trans[0,2] * Rot[45]