Syntax
[VL,ptCloud]=VLreadPLY([FName,mag])
Input Parameter
FName : | | File Name or Empty for interactive selection |
mag : | | magnification; default is 1000 |
Output Parameter
VL : | | Vertex List; double prec |
ptCloud : | | Point Cloud; single prec |
Examples
VLreadPLY('/Volumes/LUETH-WIN/WIN AIM Matlab Libraries/Point Clouds/bunny/reconstruction/bun_zipper.ply')
References
http://graphics.stanford.edu/data/3Dscanrep/#bunny,
Copyright 2020-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This function, VLreadPLY
, is designed to read a point cloud from a PLY file and return a vertex list and a point cloud object. It is part of the SG-Library and was introduced in SolidGeometry 4.9.
Input Parameters
- FName: This is the file name of the PLY file to be read. If left empty, the function will prompt the user to select a file interactively.
- mag: This is the magnification factor applied to the vertex coordinates. The default value is 1000.
Output Results
- VL: This is the vertex list, returned as a double precision array.
- ptCloud: This is the point cloud object, returned as a single precision array.
Algorithm Steps
- The function retrieves the file name (
FName
) and magnification factor (mag
) from the input arguments using the getfuncparams
function. If FName
is not provided, it defaults to an empty string, and mag
defaults to 1000.
- If
FName
is empty, the function uses tryuigetfile
to open a file selection dialog for the user to choose a PLY file.
- The function reads the point cloud data from the specified PLY file using the
pcread
function, storing the result in ptCloud
.
- The vertex list
VL
is computed by multiplying the location data of the point cloud by the magnification factor and converting it to double precision.
- If no output arguments are specified, the function prints the command used to call it and plots the vertex list using
VLplot
with red dots. It also sets up a 3D plot with labeled axes.
Algorithm explaination created using ChatGPT on 2025-08-19 00:29. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21