crosspointVLFL

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 1.0, Creation date: 2012-10-26, Last change: 2025-09-14

returns the surfacepoint of a solid hit by a beam

Description

Straight forward but fast procedure to calucate the surface point of a beam starting at point p in the direction of ez.

See Also: intersectstriangle , VLprojection , crosspointVLFL2 , crosspointsVLFLofT

Example Illustration

 missing image of crosspointVLFL(VL,FL,p,ez)

Syntax

[cp,t,fi,a]=crosspointVLFL(VL,FL,p,ez)

Input Parameter

VL: Vertex list of a solid
FL: Facet list of a solid
p: beam starting point
ez: beam direction vector

Output Parameter

cp: cross point on surface, empty if there is no crossing point
t: distance (t * ez)
fi: facet index of 1st crossed surface
a: full list of facet index and distance [fi, d]

Examples


SG=SGtransP(SGbox([80,80,5]),[0 0 40]); p=[0 0 0];
crosspointVLFL(SG.VL,SG.FL,p,[0.2 0.1 1])
crosspointVLFL(SG.VL,SG.FL,p,[1 0 1.2])




Copyright 2012-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

Last html export of this page out of FM database by TL: 2025-09-21