Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project 1: linear algebra CPSC 484 - Principles of Computer Graphics Spring 2018 Instructor: Kevin Wortman (kwortman@fullerton.edu) Introduction In this project you will implement a

Project 1: linear algebra CPSC 484 - Principles of Computer Graphics Spring 2018 Instructor: Kevin Wortman (kwortman@fullerton.edu) Introduction In this project you will implement a C++ linear algebra library supporting the sorts of math used in graphics applications. The centerpiece of the library are vector and matrix template classes that support essential operations (e.g. dot product, matrix multiplication, etc.). You will reuse this code in later projects involving actual generation of graphics, based upon this matrix math. The Code You are provided with the following source files: 1. gfxmath.hh is a skeleton C++ header for the linear algebra library. It contains declarations for a vector class and matrix class. Each class has numerous member functions. Many function definitions are essentially empty with TODO comments; your task is to implement all those functions. 1. gfxmath_test.cc is a C++ program with a main() function that performs unit tests on the code in gfxmath.hh. 2. README.md contains a brief description of the project, and a place to write the names and CSUF email addresses of the group members. You need to modify this file to identify your group members. 3. rubrictest.hh is the unit test library used for the test program; you can ignore this file. As is common in the computer graphics industry, the code is sophisticated and performant modern C++, making use of features added in C++11. Depending on your C++ background, you may need to review the following C++ features: 1. Templates 2. Operator overloading 3. C++11 Smart Pointers 4. std::shared_ptr 5. Const Correctness 6. auto specifier (since C++11) 7. list initialization (since C++11) You may need to spend some time exploring how the library is structured. This is a common task for software developers, and is part of the work of this project. To help with this, there are extensive comments in gfxmath.hh that explain how the classes and their member functions ought to work. Refer to those comments for detailed specifications of what you need to implement. In addition, the unit test code in gfxmath_test.cpp shows many examples of how to use the vector and matrix code, with tests defined by inputs and expected outputs. The mathematical operations in these libraries correspond exactly to those that are described in chapters 2 and 5 of the textbook. I recommend referring to the textbook as you write your code. Each member function in the header corresponds to a math operation that is described clearly in the book, and I took care to use the same terminology and notation as the book. In addition to the textbook, you may find websites such as Wikipedia and chilimath.com to be helpful in understanding how some of the member functions should work. As you can see in the comments in the unit tests, several of the tests are actually worked examples from those kinds of websites. If one of the tests is failing, you can look at the shown-work on a website and compare it to what your code is doing to try to find the problem in your code. Development environment As mentioned above, the skeleton code is C++11, so you must finish the project in a modern C++11 environment. The endorsed environment is based upon Ubuntu MATE 16.04, with the addition of a CSUF-specific list of packages, maintained by Prof. Michael Shafae: https://gamble.ecs.fullerton.edu/resources The skeleton code was developed in this environment, and this environment will be used to test and grade student submissions. In the endorsed environment, you can compile the unit test program with $ make which will take care of details such as passing the --std=c++11 argument to the compiler, which is necessary to enable C++11 features. I recommend that you use the endorsed environment to avoid compatibility issues between us, and so that I might be able to help troubleshoot problems you might encounter. If you choose to use a different development environment, you must assume responsibility for compatibility problems and your own troubleshooting. Obtaining and Submitting Code This document explains how to obtain and submit your code: GitHub Education Instructions Here is the invitation link for this project: https://classroom.github.com/g/XeIguzj2 What to Do In summary, do the following: 1. As stated on the syllabus, you may work alone or in a group of two or three students. 2. Follow the GitHub Education Instructions to create a GitHub account (unless you already have one), use the invitation link in this document to form a group, and use GitHub tools to push your submitted code as you make progress. 3. Edit README.md to contain the names and CSUF email addresses of all your group members. 4. Fill in the missing function bodies in gfxmath.hh. Run the gfxmath_test.cpp unit test program to see whether your code is correct or not. Push your changes to GitHub at regular intervals. 5. Check that your code works one last time, and that your final draft has been pushed to GitHub, before the deadline. Grading Rubric Function refers to whether your code works properly as defined by the test program. We will use the score reported by the test program as your Function grade. Form refers to the design, organization, and presentation of your code. A grader will read your code and evaluate these aspects of your submission. The grading rubric is below. 1. Function: 60% of project score, divided into 18 points a. vector constructor: 1 point b. vector operators: 2 points c. vector miscellaneous member functions: 1 point d. vector cross product: 1 point e. vector subvector, shrink, and grow: 1 point f. matrix constructor: 1 point g. matrix operators except multiplication: 2 points h. matrix multiplication: 2 points i. matrix submatrix, shrink, grow: 1 point j. matrix miscellaneous member functions: 2 points k. matrix determinant: 2 points l. matrix solve: 1 point 2. Form: 40% of project score a. README.md complete: 10% b. Style (whitespace, variable names, comments, etc.): 10% c. Design (where appropriate, uses encapsulation, helper functions, reuse, etc.): 10% d. Craftsmanship (no memory leaks, gross inefficiency, unsafe coding practices, etc.): 10% Deadline The project deadline is Thursday, March 15, 11 am. You will be graded based on what you have pushed to GitHub as of the deadline. Commits made after the deadline will not be considered. Late submissions will not be accepted.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions