Changeset 133 for trunk/SRC/Utilities/lineintersection.pro
- Timestamp:
- 07/07/06 11:57:27 (18 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Utilities/lineintersection.pro
r132 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME: lineintersection6 5 ; 7 ; PURPOSE: Calcule les coordonnees de l''intersection de 2 droites ou 8 ; d''une serie de 2 droites 6 ; @file_comments 7 ; Calculate coordinates of the intersection between 2 straight lines 8 ; or of a succession of 2 straight lines. 9 9 ; 10 ; CATEGORY:petit truc qui peut etre utile (sans boucles, ca va de soit!) 10 ; @categories utilities 11 ; 12 ; @param abc1 {in}{required} is the first table of dimension 3, number_of_pairs_of_straight_lines, 13 ; whose each line contain the 3 parameters a,b and c of the first linear 14 ; equation of the type ax+by+c=0 11 15 ; 12 ; CALLING SEQUENCE: point=lineintersection(abc1, abc2) 13 ; 14 ; INPUTS: abc est un tableau de dimensions 3, 15 ; nbre_de_couple_de_droites, dont chaque ligne contient les 3 16 ; parametres a, b, c de l''equation de droite du type ax+by+c=0 16 ; @param abc2 {in}{required} is second table of dimension 3, number_of_pairs_of_straight_lines, 17 ; whose each line contain the 3 parameters a,b and c of the second linear 18 ; equation of the type ax+by+c=0 17 19 ; 18 ; KEYWORD PARAMETERS: 19 ; /FLOAT: pour retourner l''output sous forme de tableau de 20 ; reel plutot que de vecteur decomplexes (par defaut) 20 ; @keyword FLOAT To return the output as a table of real numbers instead of vectors of complex (by default) 21 21 ; 22 ; OUTPUTS:2 possibilites: 23 ; 1) par defaut: c''est une vecteur de complexe dont chaque 24 ; element est les coordonnees du point d''intersection d''un 25 ; couple de droites. 26 ; 2) si /FLOAT est active, c'est un tableau de reels de 27 ; dimensiones 2, nbre_de_couple_de_droites dont chaque 28 ; ligne est les coordonnees du point d''intersection d''un 29 ; couple de droites 22 ; @returns 2 possibilities: 23 ; 1) by default: it is a vector of complex whose each element is the coordinates 24 ; of the intersection point of a pair of straight lines. 25 ; 2) if FLOAT is activated, it is a table of reals of dimension 2, 26 ; number_of_pairs_of_straight_lines whose each row is the coordinates 27 ; of the intersection point of a pair of straight line. 30 28 ; 31 ; COMMON BLOCKS:29 ; @restrictions If the 2 straight line are parallel, we return coordinates (!values.f_nan,!values.f_nan) 32 30 ; 33 ; SIDE EFFECTS:si les deux droites dont paralleles, on retourne les 34 ; coordonnes (!values.f_nan,!values.f_nan) 31 ; @restrictions Beware of the precision of the machine which make 32 ; that calculated coordinates may not exactly verify 33 ; equations of the pair of straight lines. 35 34 ; 36 ; RESTRICTIONS:attention a la precision de la machine qui fait que 37 ; les coordonnees calcules de verifient peut-etre pas exactement les 38 ; equations du couple de droites. 35 ; @examples IDL> abc1=linearequation(complex(1,2),[3,4]) 36 ; IDL> abc2=linearequation(complex(1,2),[8,15]) 37 ; IDL> print, lineintersection(abc1, abc2) 38 ; ( 1.00000, 2.00000) 39 ; IDL> print, lineintersection(abc1, abc2,/float) 40 ; 1.00000 2.00000 39 41 ; 40 ; EXAMPLE: 41 ; IDL> abc1=linearequation(complex(1,2),[3,4]) 42 ; IDL> abc2=linearequation(complex(1,2),[8,15]) 43 ; IDL> print, lineintersection(abc1, abc2) 44 ; ( 1.00000, 2.00000) 45 ; IDL> print, lineintersection(abc1, abc2,/float) 46 ; 1.00000 2.00000 42 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 43 ; 10 juin 2000 47 44 ; 48 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr)49 ; 10 juin 200045 ; @version $Id$ 46 ; 50 47 ;- 51 48 ;------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.