Your Perfect Assignment is Just a Click Away

We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

Task 1:  Animated Sine Curve

Task 1:  Animated Sine Curve

TASK 1:  Animated Sine Curve
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.
TASK 2:  Clamped B-Spline
 Write a Python program two.py with PyOpenGL to display a clamped B-spline, satifying the following requirements:

The window application’s size is (550, 550), and its upper-left corner is at (150, 150) on the screen;
The window application’s title is Special B-Splines.
The program reads a text file named control-points.txt, including an x,y coordinate pair in each line as a control point, in the same folder;
Control points are drawn with size 4 in green.
Based on the control points, a clamped B-spline is drawn.
P(t)’s color, mixed by red and blue, depends on its curvature (R = curvature / 5, G = 0.0, B = 1 – curvature / 5);
Curvature is clipped by [0, 5].
Orthogonal projection is used in this task.

The following figure illustrates the expected window application, reading the sample control-points.txt provided.
TASK 3:  Hexagonal Pyramid
 Write a Python program three.py with PyOpenGL to display a 3D hexagonal pyramid, satifying the following requirements:

The window application’s size is (400, 400), and its upper-left corner is at (100, 100) on the screen;
The window application’s title is Hexagonal Pyramid.
The program reads a text file named pyramid-params.txt, including one line as x,y,z,H,R, in the same folder, where x, y and z are the coordinates of the top vertex v, H is the height, and R is the radius; we assume the top vertex v and the base centroid c are on the same vertical axis, and c is always under v; the distance between c and any base vertex vi is always R.

Based on the above information, a hexagonal pyramid is drawn.
All faces are randomly and differently colored, except for the base in white.
When the key R is pressed, the radis increases by 0.01 and the hexagonal pyramid is redrawn.
When the key H is pressed, the height decreases by 0.01 and the hexagonal pyramid is redrawn.
The hexagonal pyramid is static by default; When the key X, Y or Z is pressed, the hexagonal pyramid toggles between being static and rotating 1 degree/refresh along the corresponding axis (i.e., the key X corresponds to the x axis), taking c as the origin.
Perspective projection is used in this task (FoV is 90 degrees towards the y-axis; Camera looks at the origin and uses the y-axis direction as the up-vector).

The following figure illustrates the expected window application, reading the sample pyramid-params.txt provided.

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: Blackboard Experts only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Blackboard Experts are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Blackboard Experts is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Blackboard Experts, we have put in place a team of experts who answer to all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.