Filter löschen
Filter löschen

Extracting point cloud from patch model

8 Ansichten (letzte 30 Tage)
Alla
Alla am 5 Jun. 2017
Kommentiert: KSSV am 8 Jun. 2017
Hi everyone, So I have a model I created using patch function and I need a point cloud of said model to play around with the depth information, so I was wondering if it is possible or not to extract a point cloud from a model and if yes how would I go about on doing so?
  7 Kommentare
Walter Roberson
Walter Roberson am 7 Jun. 2017
The patch object does not store the surface points, only the vertices.
KSSV
KSSV am 8 Jun. 2017
If you have the vertices in hand..you can create the surface using meshgrid.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Walter Roberson
Walter Roberson am 6 Jun. 2017
There are two ways of constructing patch objects.
  • For one of them, you can fetch the XData, YData, and ZData properties. Each column represents a face, so there are as many rows as the longest face; shorter faces have NaN to pad them out
  • For the other, more efficient one, you can fetch the Vertices property to get a matrix in which each row defines a unique point. The Faces property gives information about how the vertices are connected.

Kategorien

Mehr zu Lighting, Transparency, and Shading finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by