intersection_llintersection_llIntersectionLlIntersectionLl (Operator)

Name

intersection_llintersection_llIntersectionLlIntersectionLl — Calculate the intersection point of two lines.

Warning

intersection_llintersection_llIntersectionLlIntersectionLlIntersectionLl is obsolete and is only provided for reasons of backward compatibility. New applications should use the operator intersection_linesintersection_linesIntersectionLinesIntersectionLinesIntersectionLines of the chapter Tools / Geometry instead.

Signature

intersection_ll( : : RowA1, ColumnA1, RowA2, ColumnA2, RowB1, ColumnB1, RowB2, ColumnB2 : Row, Column, IsParallel)

Herror intersection_ll(double RowA1, double ColumnA1, double RowA2, double ColumnA2, double RowB1, double ColumnB1, double RowB2, double ColumnB2, double* Row, double* Column, Hlong* IsParallel)

Herror T_intersection_ll(const Htuple RowA1, const Htuple ColumnA1, const Htuple RowA2, const Htuple ColumnA2, const Htuple RowB1, const Htuple ColumnB1, const Htuple RowB2, const Htuple ColumnB2, Htuple* Row, Htuple* Column, Htuple* IsParallel)

void IntersectionLl(const HTuple& RowA1, const HTuple& ColumnA1, const HTuple& RowA2, const HTuple& ColumnA2, const HTuple& RowB1, const HTuple& ColumnB1, const HTuple& RowB2, const HTuple& ColumnB2, HTuple* Row, HTuple* Column, HTuple* IsParallel)

static void HMisc::IntersectionLl(const HTuple& RowA1, const HTuple& ColumnA1, const HTuple& RowA2, const HTuple& ColumnA2, const HTuple& RowB1, const HTuple& ColumnB1, const HTuple& RowB2, const HTuple& ColumnB2, HTuple* Row, HTuple* Column, HTuple* IsParallel)

static void HMisc::IntersectionLl(double RowA1, double ColumnA1, double RowA2, double ColumnA2, double RowB1, double ColumnB1, double RowB2, double ColumnB2, double* Row, double* Column, Hlong* IsParallel)

static void HOperatorSet.IntersectionLl(HTuple rowA1, HTuple columnA1, HTuple rowA2, HTuple columnA2, HTuple rowB1, HTuple columnB1, HTuple rowB2, HTuple columnB2, out HTuple row, out HTuple column, out HTuple isParallel)

static void HMisc.IntersectionLl(HTuple rowA1, HTuple columnA1, HTuple rowA2, HTuple columnA2, HTuple rowB1, HTuple columnB1, HTuple rowB2, HTuple columnB2, out HTuple row, out HTuple column, out HTuple isParallel)

static void HMisc.IntersectionLl(double rowA1, double columnA1, double rowA2, double columnA2, double rowB1, double columnB1, double rowB2, double columnB2, out double row, out double column, out int isParallel)

Description

The operator intersection_llintersection_llIntersectionLlIntersectionLlIntersectionLl calculates the intersection point of two lines. As input the two points on each line are expected (RowA1RowA1RowA1RowA1rowA1,ColumnA1ColumnA1ColumnA1ColumnA1columnA1, RowA2RowA2RowA2RowA2rowA2,ColumnA2ColumnA2ColumnA2ColumnA2columnA2) and (RowB1RowB1RowB1RowB1rowB1,ColumnB1ColumnB1ColumnB1ColumnB1columnB1, RowB2RowB2RowB2RowB2rowB2,ColumnB2ColumnB2ColumnB2ColumnB2columnB2). The parameters RowRowRowRowrow and ColumnColumnColumnColumncolumn return the result of the calculation. If the lines are parallel, the values of RowRowRowRowrow and ColumnColumnColumnColumncolumn are undefined and IsParallelIsParallelIsParallelIsParallelisParallel is 1. Otherwise, IsParallelIsParallelIsParallelIsParallelisParallel is 0.

Attention

If the lines are parallel the values of RowRowRowRowrow and ColumnColumnColumnColumncolumn are undefined.

Execution Information

Parameters

RowA1RowA1RowA1RowA1rowA1 (input_control)  point.y(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Row coordinate of the first point of the first line.

ColumnA1ColumnA1ColumnA1ColumnA1columnA1 (input_control)  point.x(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Column coordinate of the first point of the first line.

RowA2RowA2RowA2RowA2rowA2 (input_control)  point.y(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Row coordinate of the second point of the first line.

ColumnA2ColumnA2ColumnA2ColumnA2columnA2 (input_control)  point.x(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Column coordinate of the second point of the first line.

RowB1RowB1RowB1RowB1rowB1 (input_control)  point.y(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Row coordinate of the first point of the second line.

ColumnB1ColumnB1ColumnB1ColumnB1columnB1 (input_control)  point.x(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Column coordinate of the first point of the second line.

RowB2RowB2RowB2RowB2rowB2 (input_control)  point.y(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Row coordinate of the second point of the second line.

ColumnB2ColumnB2ColumnB2ColumnB2columnB2 (input_control)  point.x(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Column coordinate of the second point of the second line.

RowRowRowRowrow (output_control)  point.y(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Row coordinate of the intersection point.

ColumnColumnColumnColumncolumn (output_control)  point.x(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Column coordinate of the intersection point.

IsParallelIsParallelIsParallelIsParallelisParallel (output_control)  number(-array) HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Are the two lines parallel?

Example (HDevelop)

dev_set_color ('black')
RowLine1 := 350
ColLine1 := 250
RowLine2 := 300
ColLine2 := 300
Rows := 300
Columns := 50
disp_line (WindowHandle, RowLine1, ColLine1, RowLine2, ColLine2)
n := 0
for Rows := 40 to 200 by 4
  dev_set_color ('red')
  disp_line (WindowHandle, Rows, Columns, Rows+n, Columns+n)
  intersection_ll (Rows, Columns, Rows+n, Columns+n, RowLine1, ColLine1, \
                   RowLine2, ColLine2, Row, Column, IsParallel)
  dev_set_color ('blue')
  disp_line (WindowHandle, Row, Column-2, Row, Column+2)
  disp_line (WindowHandle, Row-2, Column, Row+2, Column)
  n := n+8
endfor

Example (C)

create_tuple(&rowA1, 1);
set_i(rowA1, 8, 0);
create_tuple(&columnA1, 1);
set_i(columnA1, 7, 0);
create_tuple(&rowA2, 1);
set_i(rowA2, 15, 0);
create_tuple(&columnA2, 1);
set_i(columnA2, 11, 0);
create_tuple(&RowB1, 1);
set_i(RowB1, 2, 0);
create_tuple(&ColumnB1, 1);
set_i(ColumnB1, 4, 0);
create_tuple(&RowB2, 1);
set_i(RowB2, 6, 0);
create_tuple(&ColumnB2, 1);
set_i(ColumnB2, 10, 0);
T_intersection_ll(rowA1,columnA1,rowA2,columnA2,RowB1,ColumnB1,RowB2,
                  ColumnB2,&row_i,&column_i,&parallel);
aa_min = get_d(row_i,0);
aa_max = get_d(column_i,0);

Example (HDevelop)

dev_set_color ('black')
RowLine1 := 350
ColLine1 := 250
RowLine2 := 300
ColLine2 := 300
Rows := 300
Columns := 50
disp_line (WindowHandle, RowLine1, ColLine1, RowLine2, ColLine2)
n := 0
for Rows := 40 to 200 by 4
  dev_set_color ('red')
  disp_line (WindowHandle, Rows, Columns, Rows+n, Columns+n)
  intersection_ll (Rows, Columns, Rows+n, Columns+n, RowLine1, ColLine1, \
                   RowLine2, ColLine2, Row, Column, IsParallel)
  dev_set_color ('blue')
  disp_line (WindowHandle, Row, Column-2, Row, Column+2)
  disp_line (WindowHandle, Row-2, Column, Row+2, Column)
  n := n+8
endfor

Example (HDevelop)

dev_set_color ('black')
RowLine1 := 350
ColLine1 := 250
RowLine2 := 300
ColLine2 := 300
Rows := 300
Columns := 50
disp_line (WindowHandle, RowLine1, ColLine1, RowLine2, ColLine2)
n := 0
for Rows := 40 to 200 by 4
  dev_set_color ('red')
  disp_line (WindowHandle, Rows, Columns, Rows+n, Columns+n)
  intersection_ll (Rows, Columns, Rows+n, Columns+n, RowLine1, ColLine1, \
                   RowLine2, ColLine2, Row, Column, IsParallel)
  dev_set_color ('blue')
  disp_line (WindowHandle, Row, Column-2, Row, Column+2)
  disp_line (WindowHandle, Row-2, Column, Row+2, Column)
  n := n+8
endfor

Example (HDevelop)

dev_set_color ('black')
RowLine1 := 350
ColLine1 := 250
RowLine2 := 300
ColLine2 := 300
Rows := 300
Columns := 50
disp_line (WindowHandle, RowLine1, ColLine1, RowLine2, ColLine2)
n := 0
for Rows := 40 to 200 by 4
  dev_set_color ('red')
  disp_line (WindowHandle, Rows, Columns, Rows+n, Columns+n)
  intersection_ll (Rows, Columns, Rows+n, Columns+n, RowLine1, ColLine1, \
                   RowLine2, ColLine2, Row, Column, IsParallel)
  dev_set_color ('blue')
  disp_line (WindowHandle, Row, Column-2, Row, Column+2)
  disp_line (WindowHandle, Row-2, Column, Row+2, Column)
  n := n+8
endfor

Result

intersection_llintersection_llIntersectionLlIntersectionLlIntersectionLl returns 2 (H_MSG_TRUE).

Module

Foundation