Registered Member
|
Hi everyone,
I have a question and I hope someone can help me to know whether what I've done is correct? The problem: I have 300 particles move in 3D space. Their movement is very simple. They move together one step every second. *We are not very interested in the deformation of the shape that can be consisted of the particles while they are moving.* The requirements: I want to visualize the principal axes of the shape at every timestep. I used Eigen to calculate the SVD to find the rotation matrix but I don't know how to get the principal axes? I've done some research and I found that the principal axes are associated with the largest eigenvectors. The question: Am I in the right direction ( i.e by computing the SVD and trying to find the eigenvectors). If yes, how can I get the eigenvectors? how can they be used to visualize the Axes (do they represent the axes directly or do I need to do some calculation on them )? This topic is the most related one in this forum: viewtopic.php?f=74&t=109403&hilit=SVD+eigenvector I hope someone can help. Nai |
Registered Member
|
Hi,
I've got the answer elsewhere (no URL available). After calculating the svd: JacobiSVD<Eigen::Matrix3d> svd(H, Eigen::ComputeFullU | Eigen::ComputeFullV ); we can obtain the U matrix which includes the eigenvectors U = svd.matrixU(); the eigenvectors can be accessed by using the col property (each eigenvector is stored in a column) for example: U.col(0) will return the first eigenvector U.col(1) the second and so on. You need to figure out the direction of each eigenvector by finding the largest component of that eigenvector. I hope that helps someone. Nai |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]