quiz حل الأسئلة الجامعية manage_search الأرشيف

تم الحل ✓
categoryتغير المناخ schoolبكالوريوس event_available2026-07-15

السؤال

Transcribed Image Text:

Q4 Supposed a 2-dimensional clipping window has its lower left corner at A (20, 20) and its upper right corner at C (90, 90). There are 2 lines PiP2 with Pi (10,15) P2 (80,80) and P2P with P3 (30,95) in the window. By using Cohen-Sutherland line clipping algorithm. (a) find the region codes for the endpoints P1, P2 and P3. (b) calculate the new endpoints P₁ and P. (6 marks) (10 marks) (c) draw the output that will be displayed in the window. (4 marks) Q5 Given below is an OpenGL code to generate a square. glBegin (GL_QUADS); glVertex2i (50,50); glVertex2i (100,50); glVertex2i (100,100); glVertex2i (50, 100); glEnd(); (a) By using the homogeneous coordinate, write the individual transformation matrices to implement the following transformation glRotatef (45.0f, 0.0f, 0.0f, 1.0f); glScalef (0.5, 0.5, 1.0f); glTranslatef (100.0f, 0.0f, 0.0f); (6 marks) (b) Calculate the new position of the square if it were subjected to transformations in Q4 (a). (8 marks) (c) Sketch an output display of the square at it's initial position and after performing the transformation. (4 marks)

check_circle الجواب — حل مفصل خطوة بخطوة

hourglass_top