83%(6)5 out of 6 people found this document helpful
This preview shows page 4 - 9 out of 9 pages.
contains the code to create the canvas, frame and animation. There is an extrabit of code to center the frame on start up. openGL version 2 is used. reshape – a bit of code to support translations, zooming can be configured here bymanipulating the first value of the gluPerspective method call. display – Where the bulk of the code occurs. Notice the green commented sections with thename of the shape to be drawn using openGL primitives and vertex methods. Translations, rotations and sometimes scaling is performed on each shape.A lighting transformation is coded at the end of this method. Color transformation is also applied to each shape, the lighting transformation hides this. 5
Test Plan : What is testedInputExpected OutActual OutPass/FailFrame is displayedFrame is displayedFrame is displayedpass6 Images are displayed6 Images are displayed6 Images are displayedpassTranslationsTranslations occurTranslations occurpassRotationsRotations occurRotations occurpassScalesScaling occursScaling occurspassAnimation sequenceAnimationoccursAnimationoccurspassLighting transformationLighting transformationoccursLighting transformationoccurspassColor transformationglu.gluPerspective(1* 45.0f, h, 1.0,20.0);changing 2 to 1 asthe fovy multiplierColors are transformedColors are transformedpasszoomZoom occursZoom occursExit on close Program shuts down when x button is hit Program shuts down when x button is hit pass
6Lighting transformation, notice the darkness of the left hand side
7Color transformation6 shapes easily visibleleft to right: rhombus, two 3d triangles (one scaled), line loop (above pyramid), cube, 3D lineZoom in
9References HWS Department of Mathematics and Computer Science. (n.d.). Retrieved November 19, 2017, from Point, T. (2017, August 15). JOGL Tutorial. Retrieved November 19, 2017, from (n.d.). Retrieved November 19, 2017, from