NAME

distance_between_lines_as_points - Calculates the distance between two lines.

SYNOPSIS

#include "g/g_point_projection.h"

Example compile flags (system dependent):
  -DLINUX_X86_64 -DLINUX_X86_64_OPTERON  -DGNU_COMPILER 
   -I/home/kobus/include
   -L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
  -lKJB                               -lfftw3  -lgsl -lgslcblas -ljpeg  -lSVM -lstdc++                    -lpthread -lSLATEC -lg2c    -lacml -lacml_mv -lblas -lg2c      -lncursesw 


int distance_between_lines_as_points
(
	double *distance,
	int *is_parallel,
	const Vector *line_one_point_one,
	const Vector *line_one_point_two,
	const Vector *line_two_point_one,
	const Vector *line_two_point_two
);

PARAMETERS

double *distance
Will hold the minimum distance between the lines.
int *is_parallel
Will be zero if the lines are not parallel.
const Vector *line_one_point_one
A point of a given line.
const Vector *line_one_point_two
A point of a given line.
const Vector *line_two_point_one
A point of a given line.
const Vector *line_two_point_two
A point of a given line.

DESCRIPTION

Used to check for intersection and parallelism. Given four points, assumes two lines from them and calculates the smallest distance between them. If the lines intersect, this distance will be zero. Also set a boolean flag if the lines are parallel.

RETURNS

ERROR if the points are not 4-vectors or if they aren't homogenized. NO_ERROR otherwise.

RELATED

plane_from_lines_as_points, plane_from_plucker_lines, points_from_plucker

DISCLAIMER

This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.

AUTHOR

Andrew Emmott (aemmott)

DOCUMENTER

Andrew Emmott (aemmott)

SEE ALSO

points_from_plucker , plane_from_lines_as_points , plane_from_plucker_lines , point_projection_matrix_from_line_projection_matrix