open all | close all

Dot Operator

点算符

Basic 基础Node 节点Parameter 参数

Dot Operator

点算符

The dot product, or scalar product as it is often called, calculates the projection of a vector onto another vector. You can think of this as the shadow that is cast onto a sun dial, where one of the vectors lies on the dial plate, the other vector represents the direction of the gnomon (the part that points out and casts the shadow) and the sun is directly above the sun dial. This shadow corresponds to the dot product of the two input vectors.

点积(通常称为标积)计算一个矢量到另一个矢量的投影。你可以把它想象成投射在日晷上的阴影,其中一个矢量位于日晷盘上,另一个矢量代表圭表的方向(指出并投射阴影的部分) ,而太阳正好在日晷的正上方。这个阴影对应于两个输入向量的点积。

You can connect the two input vectors either way round to the Input 1 and Input 2 ports (the result will be the same no matter which way round you connect the input vectors). The inputs must always be vectors, but you can change the data type of the node itself in the Attribute Manager. You have a choice of Color, Vector or Normal.

您可以将两个输入向量反向连接到 Input 1和 Input 2端口(无论您以何种方式连接输入向量,结果都是相同的)。输入必须始终是向量,但您可以在 Attribute Manager 中更改节点本身的数据类型。你可以选择颜色,矢量或者法线。

Here the dot product is used to calculate the angle between two input vectors. The following applies: the dot product of Vector 1 and Vector 2 = the length of Vector 1 * the length of Vector 2 * the cosine between Vector 1 and Vector 2.

这里点积用来计算两个输入向量之间的夹角。矢量1和矢量2的点积 = 矢量1的长度 * 矢量2的长度 * 矢量1和矢量2之间的余弦。