Select points in 3D space with polygon

4 ビュー (過去 30 日間)
jambig3
jambig3 2016 年 3 月 4 日
回答済み: Reza 2024 年 2 月 17 日
Hi, I'm plotting thousands of points in 3D space (with scatter3 or plot3) and would like to be able to select a subset of points within a prism generated from a polygon defined by user click points. The three axes have different scales, and the view angle, zoom, etc., are arbitrary. There is a function on File Exchange called rbb3select (link below) that does something similar, except that the prism is generated from a user-defined rectangle (using the rbbox rubberband box function). Also, I find that this function sometimes includes inappropriate data points if the axes have different scales.
Any advice is appreciated.

回答 (1 件)

Reza
Reza 2024 年 2 月 17 日
You might consider first mapping all the point data to your 2D axes space (which would include using camera parameters and axes scales) then use the inpolygon function to find which points are inside the polygon.

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by