OpenGL program
$7-12 USD
货到付款
Using C++ programming language (on any platform) with OpenGL library Create the following picture: Use the variables "vPosition" and "vColor" to pass the vertex and color information to the vertex shader. The shapes should be drawn as GL_TRIANGLES. The Circle: use the parametric equation of a circle to create multiple vertexes in a polygon. The parametric equations is: y=sin( angle ) x=cos( angle ) You will need to step the angle between 0 and 2*pi to draw the circle. You can scale and move the circle by multiplying the coordinates and adding offsets to them. Vary the red color by the step of pi to get the shading effect. The Ellipse: For the ellipse, use the same equation but scale the y down to 60% . The Square: For the square, draw multiple squares ontop of each other, varying the color from black to white. Its a good idea to base the square off of an angle, making the first point at pi/4, and then every pi/2 after that (this will help in the next assignment). The Triangle: Its a good idea to use angle to draw the points here too. The window should be 500x500 pixels.
项目ID: #2789426