[SOLVED] ComputerGraphics - A09 – Primitives

30.00 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (1 vote)

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.

 

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.