crop the polygon from the 3D surface
Mostrar comentarios más antiguos
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 comentarios
Kelly Kearney
el 18 de Jun. de 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
el 18 de Jun. de 2020
Editada: Mammadbaghir Baghirzade
el 18 de Jun. de 2020
Respuesta aceptada
Más respuestas (1)
darova
el 20 de Jun. de 2020
0 votos
Here is another idea using triangulation (initmesh)
- create polygon

- use initmesh to triangulate it

- calculate Z coordinate

- rotate the object

5 comentarios
Mammadbaghir Baghirzade
el 21 de Jun. de 2020
Mammadbaghir Baghirzade
el 21 de Jun. de 2020
darova
el 21 de Jun. de 2020
try following modifications

Mammadbaghir Baghirzade
el 21 de Jun. de 2020
darova
el 22 de Jun. de 2020

Categorías
Más información sobre Polygons en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
