Skip to content

Commit

Permalink
Updated Point List Normal Node.
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarEmaraDev committed Nov 3, 2018
1 parent d201555 commit b64c4b5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 11 additions & 7 deletions docs/user_guide/nodes/geometry/point_list_normal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,21 @@ Point List Normal
Description
-----------

This node takes multiple vectors which represent points of a polygon and return the normal of that polygon.

At least 3 points are needed to compute the normal. If more than 3 points were input, the resulted normal will be the average of the normals of each 3 points.
This node takes multiple vectors representing the points of a polygon and computes the normal of that polygon. At least 3 points are needed to compute the normal. If more than 3 noncoplanar points were input, the computed normal will be the average of the normals of each 3 points. If the points are collinear, the node will return a zero vector because no norml can be computed.

.. image:: images/point_list_normal_node.png
:width: 160pt

Inputs
------

- **Point List** - A vector list that contain the locations of the polygon points.
- **Point List** - A vector list that contain the locations of the polygon's points.

Outputs
-------

- **Normal** - A unit vector that represent the normal of the polygon. A zero vector if points weren't valid.
- **Is Valid** - A boolean which is True if blender was able to calculate the normal.
- **Normal** - A unit vector representing the normal of the polygon. A zero vector if points weren't valid, that is, collinear.
- **Is Valid** - A boolean which is True if the points are not collinear and False otherwise.

Advanced Node Settings
----------------------
Expand All @@ -30,9 +28,15 @@ Advanced Node Settings
Notes
-----

The order of points matter as cross product is used to compute the normals, So points in reversed order will return a normal that is in the reverse direction of the normal computed by the original list.
The order of points matter, because the cross product is used to compute the normals. So, reversing the order of points reverse the direction of the normal.

Examples of Usage
-----------------

The normal of a triangle formed from three points is computed using the *Point List Normal* node, this normal, in turn, is used to orient a cylinder such that its principal axis aligns with the normal of the triangle. Moreover, the cylinder is positioned in the center of the triangle, which is computed by taking the average of the points.

.. image:: gifs/point_list_normal_node_example.gif

The polygon normals output of the *Mesh Object Input* node is identical in magnitude to the normals computed using the *Point List Normal* node.

.. image:: images/point_list_normal_node_example.png

0 comments on commit b64c4b5

Please sign in to comment.