Cinema 4D Cinema 4D Prime XPresso XPresso Nodes Calculate (Group)
Function available in CINEMA 4D Prime, Visualize, Broadcast, Studio & BodyPaint 3D

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.

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.