Syntax
BB=BBofT(T)
Input Parameter
T : | | List of 3x3 or 4x4 HT matrices |
Output Parameter
BB : | | [xmin xmax ymin y max zmin zmax] |
Examples
PS.A=PLcircle(10,36); PS.B=PS.A*2; T0=TofPose(PS), BBofT(T0)
TofPLpath(PLcircle(10)), BBofT(ans)
Copyright 2019-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, BBofT, calculates the bounding box (BB) for a list of transformation matrices. It is part of the SolidGeometry library and was introduced in version 4.5.
Input Parameters
- T: A list of 3x3 or 4x4 homogeneous transformation (HT) matrices.
Output Results
- BB: A vector [xmin xmax ymin ymax zmin zmax] representing the bounding box.
Algorithm Steps
- Check if T is a cell array. If so, convert it to a 3D matrix using
cell2matdim3
.
- If the number of rows in T is greater than 4, convert it using
TLL2TL
.
- Determine the size of T:
- If T has 3 columns, extract the 2D points from the third column of the first two rows and transpose them. Calculate the bounding box using
BBofCPL
.
- If T has 4 columns, extract the 3D points from the fourth column of the first three rows and transpose them. Calculate the bounding box using
BBofVL
.
- If T has an unknown size, raise an error.
- If no output is requested (nargout == 0), visualize the bounding box:
- Create a figure with
SGfigure
and set the view angle.
- Calculate the size of the bounding box with
sofBB
.
- Plot the transformation with
tplot
.
- Generate a solid geometry object from the bounding box with
SGofBB
.
- Plot the solid geometry with
SGplot
and set the lighting with setplotlight
.
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