Implementation of Vector, Matrix, Quaternion and application