TplanesofPCnormals

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analytical Geometry
Introduced first in SolidGeometry 4.3, Creation date: 2018-10-08, Last change: 2025-09-14

returns the HT matrices for the points and normals

Description

in fact this function makes quite clear that the vertex normals of a point cloud are all oriented into the center of the origin

See Also: TplanesofVLFLfacets

Example Illustration

 missing image of TplanesofPCnormals(pc)

Syntax

[T,DVL,FL]=TplanesofPCnormals(pc)

Input Parameter

pc: point cloud or vertex list

Output Parameter

T: cell list of transformation matrices
DVL: Triangle vertex list
FL: facet list

Examples


loadweb IntelRealsense.mat % loads vertex lists from RS300 and RS415
VLdownsample(VL_D415a,30); NVL=ans; whos('VL_D415a'), whos ('NVL')
TplanesofPCnormals(NVL)




Copyright 2018-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, TplanesofPCnormals, processes a point cloud to generate transformation matrices, a triangle vertex list, and a facet list. It is part of the SG-Library and was developed by Tim Lueth.

Input Parameters

Output Results

Algorithm Steps

  1. Check if the input pc is a 3-column matrix. If so, convert it to a point cloud object using pointCloud(pc).
  2. Determine the number of vertices nv in the point cloud using size(pc.Location,1).
  3. If the normals of the point cloud are empty, compute them using pcnormals(pc).
  4. Initialize a cell array T to store transformation matrices for each vertex.
  5. For each vertex in the point cloud, compute a transformation matrix using TofPez and store it in T.
  6. Calculate the size of the bounding box s using sofBB(pc.Location).
  7. Initialize matrices DVL and FL to store triangle vertices and facets, respectively.
  8. For each vertex, compute the triangle vertices using the transformation matrix and update DVL and FL.
  9. If no output arguments are specified, plot the transformation matrices using tfplot and set the view angle.
Algorithm explaination created using ChatGPT on 2025-08-19 07:44. (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