VLreadPLY

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - VL/Vertices/PC/Clouds
Introduced first in SolidGeometry 4.9, Creation date: 2020-01-13, Last change: 2025-09-14

reads in a Point Cloud in PLY Format



See Also: SGreadPLY

Example Illustration

 missing image of VLreadPLY(FName,mag)

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

Output Results

Algorithm Steps

  1. 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.
  2. If FName is empty, the function uses tryuigetfile to open a file selection dialog for the user to choose a PLY file.
  3. The function reads the point cloud data from the specified PLY file using the pcread function, storing the result in ptCloud.
  4. 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.
  5. 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