Previous SAXO Documentation Assistant: Overview Next

Utilities/

lineintersection.pro

Calculate coordinates of the intersection between 2 straight lines or of a succession of 2 straight lines.

lineintersection Utilities

result = lineintersection(abc1, abc2, FLOAT=FLOAT)

Return value

2 possibilities: 1) by default: it is a vector of complex whose each element is the coordinates of the intersection point of a pair of straight lines. 2) if FLOAT is activated, it is a array of reals of dimension 2, number_of_pairs_of_straight_lines whose each row is the coordinates of the intersection point of a pair of straight line.

Parameters

abc1        in required type: 3d array

is the first array of dimension 3, number_of_pairs_of_straight_lines, whose each line contain the 3 parameters a, b and c of the first linear equation of the type ax+by+c=0

abc2        in required type: 3d array

is second array of dimension 3, number_of_pairs_of_straight_lines, whose each line contain the 3 parameters a, b and c of the second linear equation of the type ax+by+c=0

Keywords

FLOAT       

To return the output as a array of real numbers instead of vectors of complex (by default)

Examples

 IDL> abc1=linearequation(complex(1,2),[3,4])
 IDL> abc2=linearequation(complex(1,2),[8,15])
 IDL> print, lineintersection(abc1, abc2)
 (      1.00000,      2.00000)
 IDL> print, lineintersection(abc1, abc2,/float)
 1.00000      2.00000

    

Version history

Version

$Id: lineintersection.pro 327 2007-12-13 16:22:35Z pinsard $

History

Sebastien Masson (smasson@lodyc.jussieu.fr) 10 juin 2000

Known issues

Restrictions

If the 2 straight lines are parallel, we return coordinates (!values.f_nan,!values.f_nan) Beware of the precision of the machine which make that calculated coordinates may not exactly verify equations of the pair of straight lines.

 


  Produced by IDLdoc 2.0.