Marking Scheme for CSC 418 A1, Questions 5 and 6

Marker:   Ryan Meredith-Jones (at418mer@cdf)

Everyone who made an electronic submission for this assignment has been emailed a mark report for questions 5 and 6. The reports were mailed to the CDF accounts from which the submissions were made. This document explains the evaluation criteria used in grading these questions.

Question 5

I prepared a total of 8 test cases for each algorithm, and ran your code on them. You received 0.5 marks for each test that your code passed. If I discovered that your algorithms were incorrect but your code passed many of the tests through dumb luck, I deducted up to 2 marks from each of 5(a) and 5(b).

I realize that we were not clear enough on the input format that was to be used for this assignment. I did my best to ensure that your algorithms were operating on the proper data, to the point of modifying and/or debugging your input routines if necessary. Nobody was penalized for their input routines.

If you feel that your code has been marked incorrectly for a particular test case, then you need to describe to me how to pass the data for that case to your program such that the correct result is produced, and I'll be happy to correct your mark.

Here are the test cases and evaluation criteria:

Question 5(a) - Jordan Curve Theorem

Jordan Test 1
 3
 0  2
-2 -2
 2 -2
# of intersections = 1, so origin is INSIDE
Jordan Test 2
3
5 7
3 3
7 3
# of intersections = 0, so origin is OUTSIDE
Jordan Test 3
4
3  2
3 -2
1 -2
1  2
# of intersections = 2, so origin is OUTSIDE
Jordan Test 4
4
-1  2
 3 -2
-3 -2
-3  2
# of intersections = 1, so origin is INSIDE
Jordan Test 5
16
1  2
1 -2
2 -2
3  1
4 -2
5  1
6 -2
7  1
8 -2
9 -2
9  2
7  2
6 -1
5  2
4 -1
3  2
# of intersections = 12, so origin is OUTSIDE
Jordan Test 6
16
-1  2
-1 -2
 0 -2
 1  1
 2 -2
 3  1
 4 -2
 5  1
 6 -2
 7 -2
 7  2
 5  2
 4 -1
 3  2
 2 -1
 1  2
# of intersections = 11, so origin is INSIDE
Jordan Test 7
6
 4  4
-4  4
-4 -4
 4 -4
-1  2
-1 -3
# of intersections = 2, so origin is OUTSIDE
Jordan Test 8
12
 1  1
-1  1
-1 -2
-2 -2
-2  2
 2  2
 2 -3
-3 -3
-3  3
 3  3
 3 -4
 1 -4
# of intersections = 3, so origin is INSIDE

Question 5(b) - Nonzero Winding Rule

Winding Test 1
 3
 0  2
-2 -2
 2 -2
Winding angle = 360 degrees (i.e. winding number = 1), so origin is INSIDE
Winding Test 2
3
5 7
3 3
7 3
Winding angle = 0 degrees (i.e. winding number = 0), so origin is OUTSIDE
Winding Test 3
6
-2 4
-4 2
2 -4
5 -2
5 -1
4 2
Winding angle = 360 degrees (i.e. winding number = 1), so origin is INSIDE
Winding Test 4
6
-2 -1
-4 -3
2 -9
5 -7
5 -6
4 -3
Winding angle = 0 degrees (i.e. winding number = 0), so origin is OUTSIDE
Winding Test 5
8
5 5
5 6
-5 5
-5 -5
5 -5
5 -4
-2 -4
-2 4
Winding angle = 0 degrees (i.e. winding number = 0), so origin is OUTSIDE
Winding Test 6
8
8 5
8 6
-2 5
-2 -5
8 -5
8 -4
1 -4
1 4
Winding angle = 360 degrees (i.e. winding number = 1), so origin is INSIDE
Winding Test 7
6
 4  4
-4  4
-4 -4
 4 -4
-1  2
-1 -3
Winding angle = 720 degrees (i.e. winding number = 2), so origin is INSIDE
Winding Test 8
12
 1  1
-1  1
-1 -2
-2 -2
-2  2
 2  2
 2 -3
-3 -3
-3  3
 3  3
 3 -4
 1 -4
Winding angle = -360 degrees (i.e. winding number = -1), so origin is INSIDE

Question 5(c) - Differences between the two algorithms

I gave 0.5 marks for stating that the algorithms produce different results in some cases, and another 0.5 marks for illustrating (i.e. drawing a picture of) an example of a situation in which they produce different results. I was looking for something along the lines of the polygon used in Jordan Test 7 and Winding Test 7 above.

Question 6

The following chart shows what I was looking for in your interesting scene:

MarkCriteria
3/6 Very basic modifications of the template scene file.
4/6 Significant modification of the template, organization of primitives into a recognizable character or scene.
5/6 More inventive use of colour and/or geometry to model a character or scene. I liked that some people were using procedural modelling for their scenes (things like generating snowflake positions randomly or writing loops to revolve simple shapes about an axis to create interesting new shapes.
6/6 Particularly complex, artistic, or inventive scene. Simulation of reflections or use of advanced OpenGL features such as transparency, texture mapping, reflections would also put your scene into this category.