How to convert a point cloud to a 3-d surface

249 views (last 30 days)
KEDI YAN
KEDI YAN on 9 Jan 2020
Commented: KEDI YAN on 13 Jan 2020
I have three set of datas and their corresponding values. For example, the value of point [x1(1),y(1),z(1)] is S21_1(1) or [x3(2),y(2),z(2)] is S21_3(2)
l = 110;
x1 = [3,3,3,3,3,3,3,3];
x2 = [5,5,5,5,5,5,5,5];
x3 = [8,8,8,8,8,8,8,8];
y = [l*sind(0),l*sind(1),l*sind(2),l*sind(3),l*sind(4),l*sind(5),l*sind(6),l*sind(7)];
z = [l-l*cosd(0),l-l*cosd(1),l-l*cosd(2),l-l*cosd(3),l-l*cosd(4),l-l*cosd(5),l-l*cosd(6),l-l*cosd(7)];
S21_1 = [-12.829,-13.591,-16.019,-20.054,-21.29,-22.542,-26.333,-30.121];
S21_2 = [-14.76,-15.357,-16.146,-19.42,-22.873,-29.781,-37.933,-46.454];
S21_3 = [-16.12,-15.243,-21.417,-24.621,-25.024,-26.114,-28.044,-30.751];
Using the following code to generate a point cloud
ptCloud1 = pointCloud([x1(:),y(:),z(:)],'Intensity',S21_1(:));
ptCloud2 = pointCloud([x2(:),y(:),z(:)],'Intensity',S21_2(:));
ptCloud3 = pointCloud([x3(:),y(:),z(:)],'Intensity',S21_3(:));
pcshow(ptCloud1,'MarkerSize',1000)
hold on
pcshow(ptCloud2,'MarkerSize',1000)
hold on
pcshow(ptCloud3,'MarkerSize',1000)
hold off
QQ截图20200109110617.jpg
My question is how do I convert the point cloud plot to a 3-d surface while maintain the intensity of each point so that the surface will have a gradient color that indicate the intensity change.

Accepted Answer

Soham Chakraborty
Soham Chakraborty on 13 Jan 2020
  1 Comment
KEDI YAN
KEDI YAN on 13 Jan 2020
Thanks. I acually figured it out after posting the question. I also checked the link and it used the same function as I did. Thanks though!

Sign in to comment.

More Answers (0)

Products


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!