Reference no: EM132177382
The vertices a, b, and c contain the xyz coordinates of the corners of the triangle depicted below.For the purposes of writing code, you can assume the vertices are of type glm::vec3

a. Write C++ code or a mathematical derivation that shows how you would find the area of atriangle defined by the vertices a, b, and c.
b. Write C++ code or a mathematical derivation that shows how you find a unit normal vector thatthat comes out of the front face of the triangle.
c. Write out an implicit equation of the plane in which the three vertices of the triangle lie.
d. Write C++ code or a mathematical derivation that shows how you determine the signeddistance of a point, k from the plane in which the triangle lies.
e. Write C++ code or a mathematical derivation that shows how you would determine if a point, j,in the plane of the triangle, is to the "left" or the "right" of a ray that runs from point c to point a.
f. Assume the viewing direction is described by the vector d. Write a C++ code fragment or amathematical derivation that shows how you determine whether or not the triangle containinga, b, and c faces towards or away from the viewing direction.
g. Write a parametric description of a ray that runs from vertex a towards vertex b. The directionvector in the description should be unit length.a A,