Question

In: Math

Assume that a 3D polygon is tranformed by a transformation matrix T. Assume the normal vector...

Assume that a 3D polygon is tranformed by a transformation matrix T. Assume the normal vector of the polygon is n. Can we use the formula Tn to compute the normal vector of the transformed polygon? If not, drive the correct formula.

Solutions

Expert Solution

When lighting is enabled in OpenGL, the normal vectors are used to determine how much light is received at the specified vertex or surface. This lighting processing is performed at eye coordinate space, therefore, normal vectors in object coordinates are also transformed to eye coordinates with GL_MODELVIEW matrix.

However, normals vectors are transformed in different way as vertices do. We cannot simply multiply GL_MODELVIEW matrix and normal. Consider a normal vector (1,0,0) at vertex (0,0,0). If GL_MODELVIEW matrix is simply translating 2 unit up along Y-axis, then the vertex coordinates will be (0,2,0). But, the normal should be remain same as (1,0,0), not (1,2,0).

In order to understand how normal vectors are transformed to eye space, think the normals as coefficients of plane equations, which are perpendicular to the planes.


OpenGL Surface Normal Vector

Imagine a triangle polygon with 3 vertices; v1-v2-v3, and the normal of this surface is as a homogeneous plane.(For Euclidean space, the normal is .) If we think of the triangle as a homogeneous plane, then the plane equation becomes;

Since 3 vertices lie on this plane, the plane equation is also true when we substitute these vertices to the equation. For example, for , it satisfies;

The equivalent matrix form of the plane equation is;

The plane equation is multiplying the transposed normal (nT) and the vertex together.
Now, we modify the above equation to acquire normal vector transformation formula by inserting GL_MODELVIEW matrix M-1M in between;
(The following equation is still equivalent to the above because M-1M is identity matrix.)

As you can see, the right part of the above equation is transforming vertex to eye space, and the left part is going to be the normal vector in eye space because the plane equation is also transformed. It reads as"The transformed vertex lies on the transformed plane in eye coordinates space".

Therefore, transforming normal from object space to eye space with GL_MODELVIEW matrix M is;

Or, by converting pre-multiplication to post-multiplication form, we get;


Related Solutions

Find a matrix representation of transformation T(x)= 2x1w1+x2w2-3x3w3 from R3 to a vector space W, where...
Find a matrix representation of transformation T(x)= 2x1w1+x2w2-3x3w3 from R3 to a vector space W, where w1,w2, and w3 ∈ W. Clearly state how this matrix is representing the transformation.
compute the unit tangent vector T and the principal normal unit vector N of the space...
compute the unit tangent vector T and the principal normal unit vector N of the space curve R(t)=<2t, t^2, 1/3t^3> at the point when t=1. Then find its length over the domain [0,2]
Show the complete solution. Determine the unit tangent vector (T), the unit normal vector (N), and...
Show the complete solution. Determine the unit tangent vector (T), the unit normal vector (N), and the curvature of ?(?) = 2? ? + ?^2 ? – 1/3 ?^3 k at t = 1.
You have data that is bivariate normal. Give estimates for the covariance matrix, mean vector, and...
You have data that is bivariate normal. Give estimates for the covariance matrix, mean vector, and correlation matrix. x_1=[3.7,-1.6,-.6,.8] and x_2=[.7,1.7,5, 7]
In parts a and b, A is a matrix representation of a linear transformation in the...
In parts a and b, A is a matrix representation of a linear transformation in the standard basis. Find a matrix representation of the linear transformation in the new basis. show all steps. a. A = 2x2 matrix with the first row being 2 and -1, and the second row being 1 and 3; new basis = {<1, 2> , < 1, 1> } b. A = 3x3 matrix with the first row being 2, 1, -1, the second row...
T::R2->R2, T(x1,x2) =(x-2y,2y-x). a) verify that this function is linear transformation. b)find the standard matrix for...
T::R2->R2, T(x1,x2) =(x-2y,2y-x). a) verify that this function is linear transformation. b)find the standard matrix for this linear transformation. Determine the ker(T) and the range(T). D) is this linear combo one to one? how about onto? what else could we possibly call it?
The orbital angular momentum is a 3D vector. For an electron at a state associated with...
The orbital angular momentum is a 3D vector. For an electron at a state associated with quantum numbers (?, ?, ??), the magnitude of the orbital angular momentum is √?(? + 1) ℏ. The orbital angular momentum measured along the z axis, however, will be exactly ??ℏ. For a real orbital that combines two complex orbitals associated with two different ?? values, a measurement along the z axis will result in either of the two ?? values with an equal...
Create a family tree with a 3D vector in C++. Then, determine the worst, average and...
Create a family tree with a 3D vector in C++. Then, determine the worst, average and best time complexities of the program.
can a vector with dimensions R^N and a vector with dimensions R^N+1 be a matrix? and...
can a vector with dimensions R^N and a vector with dimensions R^N+1 be a matrix? and if so what would it dimension size be?
Let T : R2 → R3 be a linear transformation such that T( e⃗1 ) =...
Let T : R2 → R3 be a linear transformation such that T( e⃗1 ) = (2,3,-5) and T( e⃗2 ) = (-1,0,1). Determine the standard matrix of T. Calculate T( ⃗u ), the image of ⃗u=(4,2) under T. Suppose T(v⃗)=(3,2,2) for a certain v⃗ in R2 .Calculate the image of ⃗w=2⃗u−v⃗ . 4. Find a vector v⃗ inR2 that is mapped to ⃗0 in R3.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT