CG2PointsFromLineLine
Section: C Library Functions (3)
Updated: IRIT Version 6.0
Index
Return to Main Contents
NAME
CG2PointsFromLineLine()
SYNOPSIS
geom_lib/geomat3d.c:846
int CG2PointsFromLineLine(PointType Pl1,
PointType Vl1,
PointType Pl2,
PointType Vl2,
PointType Pt1,
RealType *t1,
PointType Pt2,
RealType *t2)
DESCRIPTION
Routine to find the two points Pti on the lines (Pli, Vli) , i = 1, 2
with the minimal Euclidian distance between them. In other words, the
distance between Pt1 and Pt2 is defined as distance between the two lines.
The two points are calculated using the fact that if V = (Vl1 cross Vl2)
then these two points are the intersection point between the following:
Point 1 - a plane (defined by V and line1) and the line line2.
Point 2 - a plane (defined by V and line2) and the line line1.
This function returns TRUE iff the two lines are not parallel!
PARAMETERS:
Pl1, Vl1: Position and direction defining the first line.
Pl2, Vl2: Position and direction defining the second line.
Pt1: Point on Pt1 that is closest to line 2.
t1: Parameter value of Pt1 as (Pl1 + Vl1 * t1).
Pt2: Point on Pt2 that is closest to line 1.
t2: Parameter value of Pt2 as (Pl2 + Vl2 * t2).
FUNCTION RETURN VALUE
int: TRUE, if successful.
ORIGIN
(C) Copyright 1989/90-95 Gershon Elber, Technion, IIT
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- PARAMETERS:
-
- FUNCTION RETURN VALUE
-
- ORIGIN
-
This document was created by
man2html,
using the manual pages.
Time: 07:27:06 GMT, July 20, 2024