70 likes | 147 Views
Midterm Review. Computer Graphics Hardware Point and Line Drawing Polygon Filling C++. Computer Graphics Hardware. Describe the fundamental difference in operation between a vector and raster device Discuss some relative advantages & disadvantages of both
E N D
Midterm Review • Computer Graphics Hardware • Point and Line Drawing • Polygon Filling • C++ CS-321Dr. Mark L. Hornick
Computer Graphics Hardware • Describe the fundamental difference in operation between a vector and raster device • Discuss some relative advantages & disadvantages of both • Compute the amount of video memory required for an N-color raster display of resolution n x m pixels • Compute the video bus data transfer rate required for such a display with a specific refresh rate CS-321Dr. Mark L. Hornick
Point and Line Drawing • Compare/contrast the various line generation algorithms • Simple (y=mx+b) • DDA • Bresenham • Compute the formulas for Bresenham’s algorithm • Explain the purpose of anti-aliasing algorithms • Describe how various anti-aliasing algorithms work • Supersampling a thin line • Supersampling a “thick line” using • Uniform weighting • Center weighting CS-321Dr. Mark L. Hornick
Polygon Filling • Given an arbitrary shape, determine inside-outside using • Odd-even rule • Non-zero winding rule • Compute line segment (x,y) intersections by solving parametric equations • Explain how scan-line fill uses inside-outside testing and edge intersection information to determine when to fill • Determine the progression of a recursive fill algorithm when filling a simple shape • Using 4-connected recursion • Using 8-connected recursion • Explain boundary fill vs. flood fill CS-321Dr. Mark L. Hornick
C++ Language Concepts • Explain which constructors are automatically generated by the compiler • Explain the function of the default implementation of these automatically generated constructors. (i.e. what do they do?) • Explain the specific circumstances under which the compiler no longer provides a default ctor and/or copy ctor • Write example statements that cause • The copy ctor to be invoked • The operator= to be invoked • State the order of construction in inheritance situations • Explain which base class constructor is automatically invoked when derived objects are created (using derived class ctors) • Explain the purpose of using an initializer to invoke a specific base class ctor • Explain the function of the default implementation of operator=() • Explain the function of the default implementation of the destructor • Explain the order of destruction in inheritance situations CS-321Dr. Mark L. Hornick
C++ Inheritance & Polymorphism • Describe the “virtual” method declarator specifier and its effect • Explain the concept of an abstract base class • Explain which methods can contain implementation and which cannot • Explain the concept of a pure virtual method • Explain when you must override a virtual method in a derived class • When using a pointer to a base class to reference a derived class object, describe • What happens when the base class method [is/is not] declared virtual • What happens the base class (non-pure) virtual method is not overridden CS-321Dr. Mark L. Hornick
UML Class & Sequence Diagrams • Given a class diagram, write the corresponding C++ class declaration(s) • Given C++ class declaration(s), draw the corresponding class diagram and the relationship between classes • Using appropriate connectors • Given a sequence diagram illustrating method invocations, write the corresponding C++ code • Given C++ code, create a sequence diagram CS-321Dr. Mark L. Hornick