dpr
PURPOSE 
Funció per calcula la distanciá entre 2 punts i una recta indicada amb 2
SYNOPSIS 
function dist=dpr( px,py , r1x,r1y , r2x,r2y)
DESCRIPTION 
CROSS-REFERENCE INFORMATION 
This function calls:
This function is called by:
SOURCE CODE 
0001 function dist=dpr( px,py , r1x,r1y , r2x,r2y)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 A = r2y - r1y;
0018 B = -(r2x - r1x);
0019 C = -(r1x*(r2y - r1y))+(r1y*(r2x-r1x)) ;
0020
0021
0022
0023 dist=abs(A*px+B*py+C)/sqrt(A^2+B^2);
0024
0025
0026
0027 end
Generated on Wed 12-Sep-2012 13:03:54 by m2html © 2005