How to create a boundary along the edges for 3d plot?

23 views (last 30 days)
Hello MATLAB Community,
I am having a problem creating boundary line for the point cloud as shown in the below image in RED colour.
(Note: the below image is taken from MATLAB blogs)
here is my code and excel document consisting of around 14000 points:
A = readmatrix('points435');
plot3(A(:,1),A(:,2),A(:,3),'.')
My code runs a part of the problem I am working on.
The image shown above is different from the results of the code attached.
I only need to trace a line along the boundary of the point cloud which is 3d.
Can anyone please help me with any suggestions.
Thank you in advance!!
I really appreciate your help.
Kind regards,
Shiv

Accepted Answer

Benjamin Thompson
Benjamin Thompson on 8 Mar 2022
There is a function called "boundary" that should work for you. Type "help boundary" or "doc boundary" for more information.
  3 Comments
Shiv Karpoor
Shiv Karpoor on 9 Mar 2022
Hi Benjamin,
I tried your method on the actual problem I am working on and I am glad to inform you that it worked.
Thanks for your help! I really appreciate it.

Sign in to comment.

More Answers (1)

Max Alger-Meyer
Max Alger-Meyer on 8 Mar 2022
So this is actually a pretty complicated problem. Luckily for you, someone already wrote and posted the code for this exact situation: https://www.mathworks.com/matlabcentral/fileexchange/60690-boundary-extraction-identification-and-tracing-from-point-cloud-data
  1 Comment
Shiv Karpoor
Shiv Karpoor on 9 Mar 2022
Hi Max,
I had a look at the link, its quite complicated.
But since my Z values are constant all the time, Benjamin provided a solution to trace the boundary.
Anyways, thanks for the suggestion.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by