Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
4.4.5.4 Geometric Functions<br />
$FGLNXPL Intersection point of line and plane<br />
$FGLSXSP Intersection point of line segment and sphere<br />
$FGPLPT3 Plane constructed from 3 points<br />
<strong>Virtual</strong> <strong>Machine</strong> Reference, Model Customization<br />
Simulation Macro Functions, Geometric Functions<br />
Geometric functions accept and return sequences that define the canonical form of geometrical<br />
entities. The canonical forms currently in use are:<br />
� Point: {x,y,z} coordinates of the point<br />
� Line: {x,y,z,i,j,k} point on line and direction vector of the infinite line<br />
� Plane: {d,i,j,k} distance from origin and normal vector<br />
It is important to note that geometric functions work with sequences and not arrays. The input<br />
arguments to geometric functions can be constructed using the $FSEQ function or the { }<br />
sequence operators. For example, the following are equivalent:<br />
P1=$FSEQ(1,2,3)<br />
P1={1,2,3}<br />
Geometric functions will return a value of $NULL if the geometric entity cannot be created.<br />
The $FGLNXPL Function<br />
result=$FGLNXPL(line,plane)<br />
This function returns an {x,y,z} sequence defining the point at the intersection of an infinite line<br />
and plane. A value of $NULL is returned if the line does not intersect the plane.<br />
The $FGLSXSP Function<br />
result=$FGLSXSP(point1,point2,point3,radius)<br />
This function returns a sequence defining the point(s) of intersection between a line segment and<br />
sphere. The line segment is defined by the start and ending points: point1 and point2. The sphere<br />
is defined by its center point3 and radius. The return sequence has a length of 2, 5 or 8, with<br />
values as follows:<br />
1 Number of intersection points: 0, 1 or 2<br />
2 Segment location with respect to sphere:<br />
–1: Segment is entirely inside the sphere<br />
0: Segment intersects the sphere<br />
1: Segment is entirely outside the sphere<br />
3:5 First intersection point<br />
6:8 Second intersection point (furthest from start of line segment)<br />
<strong>ICAM</strong> Technologies Corporation – Proprietary 157