Z-buffering lab; Thurs, 3/19/09, 9:57 am A few items have been added since class on Thurs, 3/19, indicated by * Due Thursday, 3/25/09, with demos at the start of class, as usual. Verification data will be supplied to you by 7:55am on This should be executed entirely in software and should be your own original code. You should be able to perform z-buffering on polygons. To ease the peformance concerns, you may restrict your display to 1/4 of your full screen area and also assume that you only need to process the polygon boundaries. * You should ***not*** include perspective projection. * You should provide me a `smoke test' on your own selection of 3 polygons, where you draw them in sequence (with sufficient stopping time in between for me to inspect, best if you just allow an indefinite pause in-between until the next one is requested. You should have a parallel window open to show the co-ordinates of the vertices for each polygons, in the designated format). * Each polygon should be a different color and your overall choice of colors should be easy to distinguish your choices (For instance, don't pick 20 closely varying shades of yellow, as I won't be able to tell one yellow pixel from another.) However, each polygon can have a different color boundary and you should be able to process as many as 20 polygons. The intersections may be quite complex over the whole collection of polygons, so you should be very aggressive in your own testing. The verification data supplied to you will be aggressive. * Each polygon can be assumed to have a maximum of 12 vertices. * Your origin should be in the center of your 1/4 screen window. * The plane of your monitor should be assumed to have z = 0. * The z-axis should be assumed to have increasing z-values towards your view, with a maximum z = 500. Thus, you should position your view to be at z = 600. The format of the polygons will be a variant of what was previously used for lines, as sent on Tuesday, February 03, 2009 6:49 AM. Namely, that data will be augmented to be a list of polygons, each polygon will have a list of vertices and each vertex will be 3D. * The data will have an opening integer K, where K indicates the totoal number of polygons and should be no more than 20. An example follows for 2 polygons, the first composed of 4 edges and the second composed of 3 edges, where an edge is formed from consecutive vertices and the last edge is formed from connecting the last point to the first point: 2 1 4 0.000 300.000 500.2 0.000 350.1 500.2 40.000 400.1 500.2 200.875 500.2 500.2 2 3 0.000 300.000 500.2 0.000 0.000 100.2 0.000 0.000 500.2 Question: Do you need to assume that each polygon is non-self-intersecting? I will specifically ask how your algorithm handles the issue of self-intersecting polygons and such polygons could be part of the verification data. * Total value of Lab4 = 15 points (so grades inclusive of this will sum to a max of 60) 5 points: your `smoke test' 8 points: my data tests 2 points: response to question posed, above about self-intersections.