User's Reference - Normals

### Normals

Category

Rendering

Function

Computes normals for shading a specified surface.

Syntax

    normals = Normals(surface, method);

Inputs

Name | Type | Default | Description
--- | --- | --- | ---
`surface` | geometry field | none | surface on which to compute normals
`method` | string | "positions" | component on which to base normals

Outputs

Name | Type | Description
--- | --- | ---
`normals` | field | the surface with normals

Functional Details

`surface` | is the surface for which normals are to be created.
`method` | is the computational method used to create normals for the specified surface. If the parameter specifies: "connections," the normal for each connection in the field is computed as the perpendicular to that element. "faces," the normal for each face is computed as the perpendicular to that face. This method is intended for use with faces, loops, and edges data (see "Faces, Loops, and Edges Components" in IBM Visualization Data Explorer User's Guide). "positions," the normal at each position in the field is determined by averaging the face normals of the quads or triangles incident on the point. Each face normal is weighted by the distance between the position and the centroid of the face.

Notes:

1. The Normals module assumes that the triangles or quads have consistent point orderings so that the average of the face normals at a given point is meaningful.

2. The Shade module also adds normals to a surface.

3. Smooth shading (`method`="positions") is not supported for faces, loops, and edges data. However, you can convert faces, loops, and edges data to triangles using Refine, and then perform smooth shading.

Components

Creates a "normals" component that is position dependent. All other input components are propagated to the output.

Example Visual Programs

    WarpingPositions.net

See Also

FaceNormals, Shade, Display, Render, Image

[ OpenDX Home at IBM | OpenDX.org ]