Extracting profiles from a point cloud surface along the mazimum dip of the plane
Dear all,
Based on the result of this code (blue cloud rotated), I need to extract a series of profiles (with a fixed diastance) to get the Z values of all the points constituting the profile. These profiles should be extracted from vertical planes oriented according to the maximum slope of the cloud.
Thanks in advance!!
you have other ideas, they are accepted!! I have included a sketch of what I would like.
clear all
close all
clc
load(‘XYZ’);
X = XYZ(:,1);
Y = XYZ(:,2);
Z = XYZ(:,3);
xyz0=mean(XYZ,1);
A=XYZ-xyz0; % center the data at zero
% Find the direction of most variance using SVD and rotate the data to make
% that the x-axis
[~,~,V]=svd(A,0);
a=cross(V(:,3),[0;0;1]);
T=makehgtform(‘axisrotate’, a, -atan2(norm(a),V(3,3)));
R=T(1:3,1:3);
A_rot = A*R;
A_rot = A_rot + [xyz0(1) xyz0(2) 0]; % move so the centers are aligned in z-diection
% Plot the raw data
close all
scatter3(X,Y,Z,0.1,"magenta")
hold on
scatter3(A_rot(:,1),A_rot(:,2),A_rot(:,3),0.1,’blue’);
xlabel(‘X-Axis’,’FontSize’,14,’FontWeight’,’bold’)
ylabel(‘Y-Axis’,’FontSize’,14,’FontWeight’,’bold’)
zlabel(‘Z-Axis’,’FontSize’,14,’FontWeight’,’bold’)
axis equalDear all,
Based on the result of this code (blue cloud rotated), I need to extract a series of profiles (with a fixed diastance) to get the Z values of all the points constituting the profile. These profiles should be extracted from vertical planes oriented according to the maximum slope of the cloud.
Thanks in advance!!
you have other ideas, they are accepted!! I have included a sketch of what I would like.
clear all
close all
clc
load(‘XYZ’);
X = XYZ(:,1);
Y = XYZ(:,2);
Z = XYZ(:,3);
xyz0=mean(XYZ,1);
A=XYZ-xyz0; % center the data at zero
% Find the direction of most variance using SVD and rotate the data to make
% that the x-axis
[~,~,V]=svd(A,0);
a=cross(V(:,3),[0;0;1]);
T=makehgtform(‘axisrotate’, a, -atan2(norm(a),V(3,3)));
R=T(1:3,1:3);
A_rot = A*R;
A_rot = A_rot + [xyz0(1) xyz0(2) 0]; % move so the centers are aligned in z-diection
% Plot the raw data
close all
scatter3(X,Y,Z,0.1,"magenta")
hold on
scatter3(A_rot(:,1),A_rot(:,2),A_rot(:,3),0.1,’blue’);
xlabel(‘X-Axis’,’FontSize’,14,’FontWeight’,’bold’)
ylabel(‘Y-Axis’,’FontSize’,14,’FontWeight’,’bold’)
zlabel(‘Z-Axis’,’FontSize’,14,’FontWeight’,’bold’)
axis equal Dear all,
Based on the result of this code (blue cloud rotated), I need to extract a series of profiles (with a fixed diastance) to get the Z values of all the points constituting the profile. These profiles should be extracted from vertical planes oriented according to the maximum slope of the cloud.
Thanks in advance!!
you have other ideas, they are accepted!! I have included a sketch of what I would like.
clear all
close all
clc
load(‘XYZ’);
X = XYZ(:,1);
Y = XYZ(:,2);
Z = XYZ(:,3);
xyz0=mean(XYZ,1);
A=XYZ-xyz0; % center the data at zero
% Find the direction of most variance using SVD and rotate the data to make
% that the x-axis
[~,~,V]=svd(A,0);
a=cross(V(:,3),[0;0;1]);
T=makehgtform(‘axisrotate’, a, -atan2(norm(a),V(3,3)));
R=T(1:3,1:3);
A_rot = A*R;
A_rot = A_rot + [xyz0(1) xyz0(2) 0]; % move so the centers are aligned in z-diection
% Plot the raw data
close all
scatter3(X,Y,Z,0.1,"magenta")
hold on
scatter3(A_rot(:,1),A_rot(:,2),A_rot(:,3),0.1,’blue’);
xlabel(‘X-Axis’,’FontSize’,14,’FontWeight’,’bold’)
ylabel(‘Y-Axis’,’FontSize’,14,’FontWeight’,’bold’)
zlabel(‘Z-Axis’,’FontSize’,14,’FontWeight’,’bold’)
axis equal profile extraction, point cloud MATLAB Answers — New Questions