Starting from:

$25

Computer Graphics-Assignment 1 2D Normalized Screen Coordinates Solved

Using only colored triangles, create a children-like drawing of a house, similar to the one shown as soon as you run the assignment application. Only modify the file triangles.cpp, which is included in the main code contained in file Assignment01.cpp . In particular, use the given procedure:

 

Triangle(float x1, float y1, float x2, float y2, float x3, float y3, float r, float g, float b) 

 

to draw a triangle with the given vertices, and the provided color. The function draws a triangle connecting points (x1,y1)  (x2, y2) and (x3, y3), colored with the (r,g,b) specified color. Vertex are expressed in Normalized screen coordinates, (i.e. in range [-1,+1]), following the Vulkan convention. The red, green and blue (r,g,b) values are in the range [0,1]. Three examples of uses of the function are already provided in file triangles.cpp. Once you have understood how they work, remove them and start drawing your house. It is not required to be identical to the one shown by the program: such drawing is given just as a reference. Pressing the SPACE BAR, changes the visualization.

 

More products