발행일 : 03/10/2025

Specify Normal Vectors

Normal vectors point in a direction perpendicular to a surface. For a plane, all normals are the same. For a more complicated surface, normals are more complicated. JSL enables you to specify the normal vector for each vertex. These normals specify the orientation of the surface in space, necessary for lighting calculations. Accurate normals assure accurate lighting.

The normal vector is of length 1 and is perpendicular to the vertex. Typically, a vertex is shared between several polygons. A smooth shaded effect is desired, so the perpendicular at the vertex is calculated as a (possibly weighted) average of the polygon’s normals. It is important to calculate the “outward” normal for polygons unless two-sided shading is enabled because only the outer face of the polygon is illuminated. With a scaled polygon, the normal’s length is not 1 after scaling, and the lighting is wrong.

Normal vectors are set at the same time the surface is constructed, and are specified with the Normal function. Use the Enable(NORMALIZE) function to have the normals re-normalized to 1 each time the scene is drawn.

더 많은 정보를 원하십니까? 질문이 있습니까? JMP 사용자 커뮤니티에서 답변 받기 (community.jmp.com).