Question: Give the The advantage of polygon scan conversion is that it is fast. Polygon scan conversion algorithms are used in computer games, flight simulators, and
Give the The advantage of polygon scan conversion is that it is fast. Polygon scan conversion algorithms are used in computer games, flight simulators, and other applications where interactivity is important. To give a human the illusion that they are interacting with a 3D model in real time, you need to present the human with animation running at 130 frames per second or faster for passive viewing on a monitor, TV, or movie screen. ------- NOT NCESSARY INFORMATION Research at the University of North Samra has experimentally shown that for immersive virtual reality applications this is not high enough and at least 15 frames per second is a minimum. A scan converted model of a city (courtesy of Jon Sewell). Compare and contrast the struct and union keywords in C, supplying an example of a situation where it would be more appropriate to use a union rather than a struct. [4 marks] (c) Explain the following C or C++ language concepts. You may find it helpful to use short code fragments or diagrams to illustrate your answer. (i) The virtual keyword used to qualify a C++ member function and its impact on generated code. [4 marks] (ii) The role of the C preprocessor in the source-code compilation cycle, and why it is a useful tool for debugging. [4 marks] (iii) Templated functions in C, next-generation banking system a number of transactions are to be scheduled to run concurrently: Debit (DAS) transactions to make payments from customer accounts to a credit card company. 2Polygon scan conversion.This term encompasses a range of algorithms where polygons are rendered, normally. , then maximum 3 marks [5] (ii) comment on which student(s)' name will be output e.g. The first student with the highest score will be output [1] 4 UCLES 2019 0478/02/SM/20 Section B 2 (a) 1 mark for value of c and message 51020: value of c: 5 message: PIN OK (1 mark) 5120: value of c: 4 message: error in PIN entered (1 mark) [2] (b) length check [1] 3 Engine Count Number Size Average OUTPUT 0 0 0 11.8 1.18 1 112 21.0 3.8 2 22 1.0 4.8 3 1.3 6.1 4 1.0 7.1 5 2.5 9.6 3 6 2.0 111.6 4 7 11.3 12.9 8 1.8 14.7 5 9 1.3 16.0 10 -1 1.6 1.6, 5 (1 mark) (1 mark) (1 mark) (1 mark) (1 mark) (1 mark) [6] 4 1 mark for each error identified + suggested correction line 5: this should read IF x > h THEN h = x line 7: PRINT h should come after the end of the repeat loop line 8: this should read UNTIL c = 20 or UNTIL c >= 20 or UNTIL c > 19 [3] 5 UCLES 2019 0478/02/SM/20 [Turn over 5 (a) 5 [1] (b) Field: At Risk Age in Years Type Map Position Table: TREES TREES TREES TREES Sort: Show: 9 9 Criteria: True >100 or: One mark per correct column. [4] 6 (a) marking points: the way to find and print the largest value a 1 mark the way to find and print the largest value b 1 mark the way to find and print the largest value c 1 mark sample algorithm: INPUT a, b, c IF a > b AND a > c THEN PRINT a (1 mark) ELSE IF b > c THEN PRINT b (1 mark) ELSE PRINT c (1 mark) [3] one at a time, into a frame buffer. The term scan comes from the fact that an image on a CRT is made up of scan lines. Examples of polygon scan conversion algorithms are the painter's. [7 ma1 (a) (i) Many correct answers, they must be meaningful. This is an example only. StudentNames[1:30] [1] (ii) Many correct answers, they must be meaningful. This is an example only. StudentMarksTest1[1:30] StudentMarksTest2[1:30] StudentMarksTest3[1:30] (1 mark) StudentTotalScore[1:30] (1 mark) [2] (b) (i) - outside loop zeroing total for loop (sum in example below) - loop for all students - input name and all test scores - in loop adding a student's total - storing the total - inside loop printing student's name and total - outside loop calculating class average - printing class average sample algorithm: [8] (ii) any relevant comment with regards to efficient code (e.g. single loop) [1] (c) Many correct answers, these are examples only. 1 mark per data set and reason Set 1: 20, 25, 35 Reason: valid data to check that data on the upper bound of each range check is accepted Set 2: 21, 26, 36 Reason: invalid data to check that data above the upper bound of each range check is rejected [2] 3 UCLES 2019 0478/02/SM/20 [Turn over (d) (i) Maximum 5 marks in total for question part Maximum 3 marks for algorithm Description (max 3) - set variable called HighestScore to zero and variable called BestName to dummy value - loop 30 times to check each student's total score in turn - check student's score against HighestScore - if student's score > HighestScore then - replace value in HighestScore by student's score and store student's name in BestName - output BestName and HighestScore outside the loop Sample algorithm (max 3): HighestScore ... 0 BestName ... "xxxx" (1 mark) FOR Count ... 1 TO 30 IF StudentTotalScore[Count] > HighestScore (1 mark) THEN HighestScore ... StudentTotalScore[Count] BestName ... StudentName[Count] (1 mark) ENDIF NEXT Count (1 mark) PRINT BestName, HighestScore (1 mark) If algorithm or program code only
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
