[SOLVED] CPT205- Assessment 2: Cohen-Sutherland 2D Line Clipping

30.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)

Coverage

This is the third and last component of Assessment 2.  The task is similar to the first two components but the format is slightly different.  The component covers the following aspects:

  • Understanding of Cohen-Sutherland line clipping algorithm
  • Implementation of a case for Cohen-Sutherland line clipping algorithm
  • Drawing output from the implementation

2. The Task

Your task for this assessment component will be implemented with OpenGL, which

  • Shows the 9 regions for 2D Cohen-Sutherland line clipping
  • Decides and shows at least a trivial accept and trivial reject case
  • Decides and shows at least a case with non-trivial reject

 

You can use dash lines (e.g. to show the outside regions).  To draw dash lines, you can call PlotStippleLine() (which you have exercised in the previous labs).

You can of course use the sample program provided for the lab. Use of other sources must be properly acknowledged (e.g. as comments in your code).

In addition to this guidance, you should also read and follow the general assessment brief for Assessment 2 (available under the Assessments area in Learning Mall).

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.