trigonometry

Reconstruct a sphere from 6 patches

天涯浪子 提交于 2020-07-23 09:08:29
问题 It sounds easy for me until I tried The implementation uses lib igl but the problem is not there but in my lack of math knowledge :-\ Eigen::MatrixXd p; const int size = 128; p.resize(size * size, 3); int index = 0; for (int y = 0; y < size; y++) { double ypos = (double(y) / double(size - 1)) - 0.5; for (int x = 0; x < size; x++) { double xpos = (double(x) / double(size - 1)) - 0.5; const double sphericalTheta = xpos * (pi / 2.0); const double sphericalPhi = ypos * (pi / 2.0); const double mX

Reconstruct a sphere from 6 patches

梦想的初衷 提交于 2020-07-23 09:07:11
问题 It sounds easy for me until I tried The implementation uses lib igl but the problem is not there but in my lack of math knowledge :-\ Eigen::MatrixXd p; const int size = 128; p.resize(size * size, 3); int index = 0; for (int y = 0; y < size; y++) { double ypos = (double(y) / double(size - 1)) - 0.5; for (int x = 0; x < size; x++) { double xpos = (double(x) / double(size - 1)) - 0.5; const double sphericalTheta = xpos * (pi / 2.0); const double sphericalPhi = ypos * (pi / 2.0); const double mX

Reconstruct a sphere from 6 patches

前提是你 提交于 2020-07-23 09:06:45
问题 It sounds easy for me until I tried The implementation uses lib igl but the problem is not there but in my lack of math knowledge :-\ Eigen::MatrixXd p; const int size = 128; p.resize(size * size, 3); int index = 0; for (int y = 0; y < size; y++) { double ypos = (double(y) / double(size - 1)) - 0.5; for (int x = 0; x < size; x++) { double xpos = (double(x) / double(size - 1)) - 0.5; const double sphericalTheta = xpos * (pi / 2.0); const double sphericalPhi = ypos * (pi / 2.0); const double mX

Rotate normal vector onto axis plane

时光总嘲笑我的痴心妄想 提交于 2020-07-17 06:31:32
问题 I have a set of data points in 3D space which apparently all fall onto a specific plane. I use PCA to compute the plane parameters. The 3rd component of PCA gives me the normal vector of the plane (weakest component). What I want to do next is to transform all the points onto said plane and look at it in 2D. My idea was to do the following: Find a center point (average point) on the plane Substract it from all data points to arrange them around the origin Rotate the normal so that it becomes