Syntax
[CPL,a]=CPLofSGboreholes(SG,[ez,ms])
Input Parameter
SG : | | Solid Geometry |
ez : | | direction vector; default is [ 0 0 1] |
ms : | | minimal diameter of hole; default is 4; neg => holes only
|
Output Parameter
CPL : | | Contour of shadow |
a : | | area of contours |
Examples
SG=SGsample(25);
CPLofSGboreholes(SG,[0 0 1]);
CPLofSGboreholes(SG,[0 1 0]);
CPLofSGboreholes(SG,[1 0 0]);
CPLofSGboreholes(SG,'',1);
CPLofSGboreholes(SG,'',2);
CPLofSGboreholes(SG,'',-1);
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, CPLofSGboreholes
, calculates the contour of the shadow core of a solid geometry (SG) when viewed from above. It is part of the SolidGeometry library.
Input Parameters
- SG: The solid geometry object to be analyzed.
- ez: A direction vector indicating the view direction. The default is [0, 0, 1], which represents a view from above.
- ms: The minimal diameter of the hole to be considered. The default is 4. If negative, only holes are considered.
Output Results
- CPL: The contour of the shadow.
- a: The area of the contours.
Algorithm Steps
- Retrieve the direction vector
ez
and minimal diameter ms
from the input parameters or use default values.
- Normalize the direction vector
ez
.
- Calculate the transformation matrix
T
using the function TofPez
to align the solid geometry with the view direction.
- Transform the solid geometry
SG
using the transformation matrix T
.
- Plot the transformed solid geometry for visualization.
- Calculate the contour of the shadow using the function
CPLofgcaborehole090
.
- Calculate the area of each contour using the function
CPLarea
.
- Filter the contours based on the minimal diameter
ms
. If ms
is positive, select contours with an area greater than ms
. If ms
is negative, select contours with an area less than ms
.
- Return the selected contours and their areas.
- If no output arguments are specified, plot the contours and the solid geometry for visualization.
Algorithm explaination created using ChatGPT on 2025-08-19 07:43. (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