Question: Question 1 a) PROVIDE the OpenGL (LWJGL) animation code that makes a pendulum swing. Consider the method drawPendulum() already exists, so you do not need

 Question 1 a) PROVIDE the OpenGL (LWJGL) animation code that makes

Question 1 a) PROVIDE the OpenGL (LWJGL) animation code that makes a pendulum swing. Consider the method drawPendulum() already exists, so you do not need to define the object vertices and develop the draw method. To do so, provide the code for the Update Scene() method and the correct transformation call in renderScene() method. Initialize the control variables in InitScene() method. The images below show illustrations of the pendulum, presenting the initial and final positions so that you can define the variables (angles between -30 and 30) to control the animation (rotation). The animation must stop after 3 full cycles (-30 to 30) with the final angle set to 0. (25 marks) Frame Angle 0 -30 30 0 60 30 90 0 120 -30 Figure 1. Example of a Pendulum animation

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!