[SOLVED] 代写 C++ html math  Practice using functions.

30 $

File Name: 代写_C++_html_math__Practice_using_functions..zip
File Size: 471 KB

SKU: 7397864646 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


 Practice using functions.
 Practice abstraction and using parameters.
 Understand basics of computer rendering.
 Learn about Lissajous Curves.
Write a program in C++ that will display the image subdivided into four colored sections as seen on the right. Teal on the top left, yellow on the top right, white on the bottom left and purple on the bottom right.
 In the white square draw a filled yellow circle.
 In the teal square draw a Lissajou curve with parameters ωx=5, ωy=6 or ratio=5/6.
 In the yellow square draw a Lissajou curve with parameters ωx=3, ωy=5 or ratio=3/5.
 In the purple square draw a Lissajou curve with parameters ωx=7, ωy=4 or ratio=7/4.
Select some contrasting colors so that the curves are visible.
Implement the background coloring and Lissajous curves using parameterized functions FillRectangle(); and DrawLissajou(); (so that each of the squares will be calling the same FillRectangle(); using a different set of parameters);
The Lissajou curves are a family of simple trigonometric curves parameterized as:
You can think of ωx as a parameter which dictates how quickly the cosine function revolves in that direction, influencing how many revolutions the curve will make as it spans its width. You can learn more about them here: http://mathworld.wolfram.com/LissajousCurve.html
To fill in the circle, you can think of it as coloring in all the points that are within a certain distance from the center. Consider the equation for the distance between two points:

CalcImage();
setPixel(int x, int y, unsigned char red, unsigned char green, unsigned char blue);
Sets the pixel at position [x,y] to the RGB color(red,green,blue) where the color
components are on the range 0-255.
MAX
The total width / height of the image in pixels.
Keyboard(int key);
Called whenever a key is hit. There is a switch inside to handle different inputs. glutPostRedisplay();
Informs the window that it should be repainted.
Extra credit will be awarded for making some element of the rendering animated.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] 代写 C++ html math  Practice using functions.
30 $