The resulting two vectors have been rotated by an arbitrary angle on a particular 2D plane, but maintain orthogonality.The dot product of the second pair of vectors in option B, ( 1, 4) and ( 2, 8), can be found to. Add the "remainder" set aside earlier back to the mapped ND vector. Lesson Explainer: Parallel and Perpendicular Vectors in 2D.Transform the rotated 2D vectors back into ND vectors in the main coordinate system by multiplying the by the Nx2 matrix.Perform the rotation transformation on the 2D vectors. Construct the 2D rotation matrix corresponding to the desired rotation within the 2D plane identified in the first step.Keep in mind that the 2D vector is now in a modified coordinate space, not the original. Perform a change of basis on the projected N-D vectors so that they can be expressed as the product of a 2D vector and an Nx2 matrix, which has its columns set to each of the corresponding basis vectors calculated. Break up each of the two N-D orthogonal vectors you want to rotate into the sum of two vectors: 1) the vectors' projections onto the 2D plane you've constructed and 2) the "remainder" of the vector that doesn't fall on the 2D plane.Combined the N basis vectors should span the ND space. Find the remaining (N-2)D basis vectors that are linearly independent to these first 2 vectors.(the vectors you want to rotate, a and b, aren't necessarily on this plane) Find 2 linearly independent ND basis vectors of the 2D plane in which you want to rotate the two vectors.Here's a general outline of the steps I would take: Unless I've overlooked something, it'd be necessary to implement ND rotation from scratch. Preexisting implementations of 3D Rotation matrices include the Scipy function .from_rotvec and Python's quaternion module (see henneray's answer), but these are only for 3D vectors. The set of all orthogonal matrices of size n with determinant +1 is a representation of a group known as the special orthogonal group SO(n). #uncomment following to make basis orthonormalĪssert np.allclose(basis_vectors.dot(basis_vectors), 0)īecause you want to rotate both vectors in the same manner, there must be a way to preserve information on the way each rotation is carried out (e.g. Vector -= basis_vector.dot(vector) * vector We present respective visualization algorithms for 2D planar vector fields and tangential vector fields on curved surfaces, and demonstrate that those algorithms lend themselves to efficient and interactive GPU implementations.I have an answer to your first question and some thoughts on how to approach the second. In addition, a filtering process is described to achieve a consistent and temporally coherent animation of the orthogonal vector field visualization. Vision research indicates that local motion detectors are tuned to certain spatial frequencies of textures, and the above decoupling enables us to generate spatial frequencies optimized for motion perception. This decoupling of the line direction from the direction of animation allows us to choose the spatial frequencies along the direction of motion independently from the length scales along the LIC line patterns. This visualization is combined with animation based on motion along the vector field. Line patterns are generated by line integral convolution (LIC). This paper introduces orthogonal vector field visualization on 2D manifolds: a representation by lines that are perpendicular to the input vector field.
0 Comments
Leave a Reply. |