REVERSELINE Return same line but with opposite orientation. INVLINE = reverseLine(LINE); Returns the opposite line of LINE. LINE has the format [x0 y0 dx dy], then INVLINE will have following parameters: [x0 y0 -dx -dy]. See also lines2d, createLine
0001 function line = reverseLine(line) 0002 %REVERSELINE Return same line but with opposite orientation. 0003 % 0004 % INVLINE = reverseLine(LINE); 0005 % Returns the opposite line of LINE. 0006 % LINE has the format [x0 y0 dx dy], then INVLINE will have following 0007 % parameters: [x0 y0 -dx -dy]. 0008 % 0009 % See also 0010 % lines2d, createLine 0011 0012 % ------ 0013 % Author: David Legland 0014 % E-mail: david.legland@inrae.fr 0015 % Created: 2004-01-20 0016 % Copyright 2004-2024 INRA - TPV URPOI - BIA IMASTE 0017 0018 line(:, 3:4) = -line(:, 3:4); 0019 0020