07.01.2013 Views

3D graphics eBook - Course Materials Repository

3D graphics eBook - Course Materials Repository

3D graphics eBook - Course Materials Repository

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Surface normal 207<br />

Surface normal<br />

A surface normal, or simply normal, to a flat surface is a vector that<br />

is perpendicular to that surface. A normal to a non-flat surface at a<br />

point P on the surface is a vector perpendicular to the tangent plane to<br />

that surface at P. The word "normal" is also used as an adjective: a line<br />

normal to a plane, the normal component of a force, the normal<br />

vector, etc. The concept of normality generalizes to orthogonality.<br />

In the two-dimensional case, a normal line perpendicularly intersects<br />

the tangent line to a curve at a given point.<br />

The normal is often used in computer <strong>graphics</strong> to determine a surface's<br />

orientation toward a light source for flat shading, or the orientation of<br />

each of the corners (vertices) to mimic a curved surface with Phong<br />

shading.<br />

Calculating a surface normal<br />

For a convex polygon (such as a triangle), a surface normal can be<br />

calculated as the vector cross product of two (non-parallel) edges of the<br />

polygon.<br />

For a plane given by the equation , the<br />

vector is a normal.<br />

For a plane given by the equation<br />

,<br />

A polygon and two of its normal vectors<br />

A normal to a surface at a point is the same as a<br />

normal to the tangent plane to that surface at that<br />

i.e., a is a point on the plane and b and c are (non-parallel) vectors lying on the plane, the normal to the plane is a<br />

vector normal to both b and c which can be found as the cross product .<br />

For a hyperplane in n+1 dimensions, given by the equation<br />

,<br />

where a 0 is a point on the hyperplane and a i for i = 1, ... , n are non-parallel vectors lying on the hyperplane, a normal<br />

to the hyperplane is any vector in the null space of A where A is given by<br />

.<br />

That is, any vector orthogonal to all in-plane vectors is by definition a surface normal.<br />

point.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!