![]() Norm(A) = A.norm() = A/|A|, a unit vector in the direction of the vectorĪ/|A|, a unit vector in the direction of the vector an alternative to A.norm(), based on the fact that unit vectors are customarily written in the form ĉ, with a "hat" over the vectorįor convenience, norm(vec(0,0,0)) or vec(0,0,0).hat is calculated to be vec(0,0,0).ĭot(A,B) = A.dot(B) = A dot B, the scalar dot product between two vectorsĬross(A,B) = A.cross(B), the vector cross product between two vectorsĭiff_angle(A,B) = A.diff_angle(B), the angle between two vectors, in radians Mag2(A) = A.mag2 = |A|*|A|, the vector's magnitude squared ![]() Mag(A) = A.mag = |A|, the magnitude of a vector The following functions are available for working with vectors: This is a convenient way to make a separate copy of a vector. ![]() It is okay to make a vector from a vector: vector(v2) is still vector(10,20,30). You can refer to individual components of a vector: Vectors can be added or subtracted from each other, or multiplied by an This creates a 3D vector object with the given components x, y, and z. The vector object is not a displayable object but isĪ powerful aid to 3D computations.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |