🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Does each vector have its own basis vector?

Started by
6 comments, last by alvaro 6 years ago

Does each vector in a given vector space have its own basis vector. Are basis vectors essentially just the components of a given vector? Do all vertices in model space (subspace) have a basis vector?

Advertisement

Better say every vector space have a its own basis. Any vector (vertex) into vector space is  a sum of  space's basis vectors multiplied by components of vector. [x,y,z] coordinates of vertex mean x*i+y*j+z*k  where i j k - is a basis vectors of model space.

#define if(a) if((a) && rand()%100)

So in regards to a cube in model space, each of the vertices are part of a set in a span? Is it accurate to say 3D model space is a subspace of 3D world space?

2 hours ago, TheStudent111 said:

So in regards to a cube in model space, each of the vertices are part of a set in a span? Is it accurate to say 3D model space is a subspace of 3D world space?

I'm not entirely familiar with the mathematical definition of a subspace, but I think the answer is yes.  Any space like your 3D model space is just a Euclidian coordinate frame defined by 3 basis vectors in the parent space... the 3D world space in this case.  Any point in that model space is therefore in terms of that coordinate frame, and needs to be transformed using the basis vectors as Fulcrum.013 said in the post above.

Some definitions and theorems:

  • A vector space is a set of elements we'll call vectors that can be added, subtracted and scaled. A vector space has a special vector 0, which can be added to any vector without changing it.
  • A linear combination of some vectors is a [finite] weighted sum of those vectors.
  • A set of vectors is said to be linearly independent if the only way to get 0 as a linear combination of them is to make all the coefficients 0.
  • The span of a set of vectors B is the set of vectors that can be obtained as a linear combination of vectors in B.
  • A set of vectors is called a generating set if its span is the whole vector space.
  • A set of vectors that is both linearly independent and a generating set is said to be a basis.
  • The number of vectors in a basis is the same for all choices of basis, and it's called the dimension of the vector space.
  • If you have a vector space and a basis for it, you can express any vector as a linear combination of the basis vectors in a unique way. The coefficients of the linear combination are called coordinates. This allows you to do computations.

In light of this, you can see that the questions in the original post don't make sense. I don't understand the first question in your second post either. I would say that "3D model space is a subspace of 3D world space" is not accurate. Model space is a 3-dimensional affine space (which I didn't define because this is getting long enough) where the vertices of the model are specified. These vertices can be mapped into the world space (another affine space) using an affine transformation. Once you have specified an origin and a basis for each affine space, an affine transformation can be described as certain 4x4 matrix.

 

 

alvaro, I thought affine spaces lack an origin. The OpenGL graphics API has an origin in NDC and screen coordinates.

An affine space doesn't have an origin, correct. "Origin" is a property of the frame of reference you are using to define coordinates.

affine frame of reference selection == origin selection + basis selection

 

This topic is closed to new replies.

Advertisement