Starting from:

$25

ComputerGraphics - A09 – Primitives - Solved

The goal of the application contained in index.html, is to create three simple models: the outline of letter F, a filled S-shaped pattern, and a filled pentagon. Models are created in file models.js. In particular, it uses the procedure addMesh(), that receives as parameters an array of three elements vectors with the coordinates of the vertices, a letter (between quotes) that denotes the type of the mesh, and an RGB color (a three-elements array, with the value of the red, green and blue components of the color, each one in the 0-1 range). The letters denoting the mesh type are:

 

            “T” for triangles lists

            “S” for triangles strips

            “F” for triangles fans

             “L” for lines lists

            “P” for lines strips

             “O” for line loops

 

 

In the application, the mouse turns the view, and the slider at the bottom of the page can be used to change the objects being displayed.  

 

More products