» 3d Vector Mathematics
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

3d Vector Mathematics



a vector is an element of vector space. a vector contains the same number of elements than the vector space has dimensions.

vvvv's vector space is (a numerical approximation to) R3, a 3-dimensional euclidean space of real numbers. so a vvvvector is a set of three numbers (x, y, z) of 3d vvvvector space of vvvv numbers.


a vector v can be interpreted as:

direction (x, y, z) and length |v|, arrow, a translation, connection between two points (see Subtrcation), as point (if the vector is a bounded vector to the origin), force, speed, velocity ....

as symbol:
letters, often bold or underlined v, v

as three numbers (x, y, z):
the vvvvector space is build up by combination of three orthogonal 1-dimensional directions, the x-, y- and z-axis. every direction that is not parallel to the axes could be described as a linear combination of three directions (vectors) that are parallel to the axes. a linear combination here is adding three vectors (see Addition). to include the second aspect of a vector (the length) the three (axis) vectors n1, n2, n3 are set to length one, this is a orthonormal base. to build all other vectors with this base, the three base vectors length gets scaled with the numbers x, y, z and then the vectors are added together:

v = x*n1 + y*n2 + z*n3 =

because the n vectors are (1, 0, 0), (0, 1, 0) and (0, 0, 1) the result is:

v = ( 1*x, 0*x, 0*x ) + ( 0*y, 1*y, 0*y ) + ( 0*z, 0*z, 1*z ) =

= ( x, 0, 0 ) + ( 0, y, 0 ) + ( 0, 0, z ) = (x, y, z)


Absolute value |v| (length)


one real number defined by:

|v| = |(x, y, z)| = sqrt( x² + y² + z² )

vvvv node

use Normalize (3d). outputs at first output pin a vector with same direction but length one, the input length on the second output pin. multiplication of them with * (Value) is the original vector.

Multiplication with scalar s


multiply a vector with a scalar is multiply every vector element with the scalar.

v*s = ( x*s, y*s, z*s ) ( = s*v )


* (Value)


scaling the length, the direction is invariant but gets negative if the scalar is negative.

imortant result:
|v*s| = |v|*|s|



vector addition is adding the elements of same dimension.

v + w = ( x, y, z ) + ( a, b, c ) =

= ( x + a, y + b, z + c ) ( = w + v )

vvvv node

+ (Value)


take vector v and place the start of vector w at the tip of v. now the vector from the start of v to the tip of w is the result of adding v and w (or w and v).



by analogy to the addition the subtraction is the subtraction of the elements of same dimension. but here v - w is NOT w - v but -(w - v).

v - w = ( x, y, z ) - ( a, b, c ) =

= ( x - a, y - b, z - c ) = - ( w - v )

vvvv node

- (Value)


place the start of v and w at the same point. now the vector from the tip of w to the tip of v is the result of subtracting w from v. subtracting v from w (w - v ) ist the same, but the resulting vector starts at the tip of v and ends at the tip of w.

Dot product

aka inner product or scalar product


one real number defined (in every space) by the multiplication of elements at same dimension an adding the results. OR (in euclidean space) multiplication of the absolute values and the cosine of the angle phi between the vectors.

v * w = ( x, y, z ) * ( a, b, c ) =

= x*a + y*b + z*c ( = w * v )


v * w = ( x, y, z ) * ( a, b, c ) =

= |v| * |w| * cos(phi)

vvvv node

 * (3d Dot)


start v and w at a common start point, then the length of v is multiplied with the length of the projection (shadow) of w onto v (or vice versa). geometrically not really interesting, but with the two formulas the angle between two vectors can be calculated. if the result is zero the vectors are orthogonal (angle 90°).

Angle phi between two vectors


the two formulas of the dot product are used to get the cosine of phi.

x*a + y*b + z*c = |v| * |w| * cos(phi)

cos(phi) = ( x*a + y*b + z*c ) / ( |v| * |w| )

vvvv nodes

use * (Value) and + (Value Spectral) to get the dot product. use two Normalize (3d Vector) nodes to get the absolute values (lengths) from the vectors and multiply them with another * (Value). now divide the dot product by the multiplication of the lengths using the / (Value) node, this is the cosine of phi. the term arccos(A) in Expr (Value) node gives phi in radian (from 0 to Pi).

Cross product


the multiplication of: the legth of v and w, the sine of the angle phi between v and w and a unit vector n (length = one) that is orthogonal (perpendicular) to v AND w.

v x w = ( x, y, z ) x ( a, b, c ) =

= |v| * |w| * sin(phi) * n

there is simpler formula in the euclidean space:

v x w = ( x, y, z ) x ( a, b, c ) =

= ( y*c - z*b, z*a - x*c, x*b - y*a )

vvvv node

  • (3d Cross)


a vector that is orthogonal to v an w. the value of the length is the area size of a parallelogram with v and w as sides.

by tf

anonymous user login


~9h ago

joreg: the 2018 numbers are in: vvvv-in-numbers-2018 #vvvv

~1d ago

microdee: There was a problem with DX11’s VPM pack, now I switched everything depending on DX11 to the contrib zip file. It should work now.

~1d ago

unti: Please remove Hauppauge from the list of supported videoIn cards. They still don't seem to work with vvvv.

~2d ago

Lorenz: What if screens could be shaped into any form? screenization-experiment-materiality

~4d ago

joreg: @bo27 one cross each!

~4d ago

bo27: @joreg should I answer again? :))

~5d ago

joreg: ~200 answers to the survvvvey so far. Can we double this? Please remind your friends/collegues to fill out: https://t.co/gHvameecfn #vvvv

~6d ago

gegenlicht: The "im not a robot" login dialog just gave me a minor existential crisis.

~7d ago

tonfilm: @schlonzo dark theme is not released yet, you have to wait a bit for the vvvv gamma release...