Reference no: EM132626800
Write a Python program one.py with PyOpenGL to display an animation of sine function y=Asin(x+B), satifying the following requirements:
The window application's size is (600, 600), and its upper-left corner is at (250, 250) on the screen;
The window application's title is Animated Sine Curve.
The ranges of x and y are [-4, 4] (x is in radians);
The amplitude A is a random float in [1, 2], and it is updated each time the window application restarts;
The phase shift B is a float; it is initialized as 0, and incremented by 0.01 each time the screen refreshes;
The two axes are drawn in white, with an arrow towards the positive direction at the end of each axis;
The sine curve is drawn in yellow.
Orthogonal projection is used in this task.
The following figure illustrates the expected window application.