We want to calculate a new vector that has no weight on the special axis.
Calculate the projected vector on the special axis and remove it, the result is what we want.

PointStruct CalculateVectorWeight(PointStruct vec0, PointStruct vec1)
{
    vec0.Unit();
    double dotValue = vec1.Dot( vec0 );
    PointStruct onVec0 = vec0 * dotValue;
    PointStruct newVec = vec1 - onVec0;
    return newVec;
}



Categories: Math

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

3D Model Viewer: add grid plane and convex hull.
Add google translate tool at right-bottom position.

X
A prohibited operation
0
Would love your thoughts, please comment.x
()
x