What is the difference between a vector and a vertex?

I often see the words “vector” and “vertex” (multiple “vertices”) used in the context of 3D programming.

From what I can say, both of them describe a point in n-dimensional space. The XNA framework, for example, has the Vector2, Vector3, and Vector4 classes, but it seems that the Vertex class does not exist.

What is the exact difference between a vector and a vertex?

+6
source share
1 answer

A ' vector ' is a mathematical concept; roughly speaking, it represents an offset in some coordinate space. A vertex is an element of some 3D (or 2D, really) geometry, which usually has a position and some other attributes (color, texture coordinates, etc.).

The position of the vertex (and, therefore, sometimes the vertex itself) can be represented by a vector if we assume that the vector is an offset from the origin of the coordinate system. Sometimes people call this representation of the vector "position vector."

So, roughly speaking, the difference is that vectors can be used to describe (in whole or in part) a vertex.

+13
source

Source: https://habr.com/ru/post/916011/


All Articles