crop the polygon from the 3D surface
Afficher commentaires plus anciens
Hi all,
I have such an attached 3D surface and a polygon on it. (Code is provided below)
I aim to crop the portion which is only inside the polygon and delete everything outside the polygon.
I found out the function of "inpolygon", but it did not work well enough since it is for 2D.
Then I encountered with "inpolyhedron" which is written for 3D, but was not that successfull on using it.
Is there any other way that you would suggest?
Thank you
Regards
2 commentaires
Kelly Kearney
le 18 Juin 2020
It's difficult to tell from the picture... does all the data (both the surface and polygon) fall along a single plane?
Mammadbaghir Baghirzade
le 18 Juin 2020
Modifié(e) : Mammadbaghir Baghirzade
le 18 Juin 2020
Réponse acceptée
Plus de réponses (1)
darova
le 20 Juin 2020
0 votes
Here is another idea using triangulation (initmesh)
- create polygon

- use initmesh to triangulate it

- calculate Z coordinate

- rotate the object

5 commentaires
Mammadbaghir Baghirzade
le 21 Juin 2020
Mammadbaghir Baghirzade
le 21 Juin 2020
darova
le 21 Juin 2020
try following modifications

Mammadbaghir Baghirzade
le 21 Juin 2020
darova
le 22 Juin 2020

Catégories
En savoir plus sur Geometry and Mesh dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
