intersection_llIntersectionLlIntersectionLlintersection_llintersection_ll
Short description
intersection_llIntersectionLlIntersectionLlintersection_llintersection_ll — Calculate the intersection point of two lines.
Warning
intersection_llIntersectionLl is obsolete and is only provided for
reasons of backward compatibility. New applications should use the
operator intersection_linesIntersectionLines of the chapter Tools / Geometry instead.
Signature
intersection_ll( point.y RowA1, point.x ColumnA1, point.y RowA2, point.x ColumnA2, point.y RowB1, point.x ColumnB1, point.y RowB2, point.x ColumnB2, out point.y Row, out point.x Column, out number 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 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 )def intersection_ll( row_a1: MaybeSequence[Union[float, int]], column_a1: MaybeSequence[Union[float, int]], row_a2: MaybeSequence[Union[float, int]], column_a2: MaybeSequence[Union[float, int]], row_b1: MaybeSequence[Union[float, int]], column_b1: MaybeSequence[Union[float, int]], row_b2: MaybeSequence[Union[float, int]], column_b2: MaybeSequence[Union[float, int]] ) -> Tuple[Sequence[float], Sequence[float], Sequence[int]]
def intersection_ll_s( row_a1: MaybeSequence[Union[float, int]], column_a1: MaybeSequence[Union[float, int]], row_a2: MaybeSequence[Union[float, int]], column_a2: MaybeSequence[Union[float, int]], row_b1: MaybeSequence[Union[float, int]], column_b1: MaybeSequence[Union[float, int]], row_b2: MaybeSequence[Union[float, int]], column_b2: MaybeSequence[Union[float, int]] ) -> Tuple[float, float, int]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 )
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 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_llIntersectionLl calculates the intersection point
of two lines. As input the two points on each line are expected
(RowA1rowA1row_a1,ColumnA1columnA1column_a1,
RowA2rowA2row_a2,ColumnA2columnA2column_a2) and
(RowB1rowB1row_b1,ColumnB1columnB1column_b1,
RowB2rowB2row_b2,ColumnB2columnB2column_b2).
The parameters Rowrowrow and Columncolumncolumn return the
result of the calculation.
If the lines are parallel, the values of Rowrowrow and Columncolumncolumn
are undefined and IsParallelisParallelis_parallel is 1. Otherwise, IsParallelisParallelis_parallel
is 0.
Attention
If the lines are parallel the values of Rowrowrow and
Columncolumncolumn are undefined.
Execution information
-
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
-
Multithreading scope: global (may be called from any thread).
-
Processed without parallelization.
Parameters
RowA1rowA1row_a1 (input_control) point.y(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)
Row coordinate of the first point of the first line.
ColumnA1columnA1column_a1 (input_control) point.x(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)
Column coordinate of the first point of the
first line.
RowA2rowA2row_a2 (input_control) point.y(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)
Row coordinate of the second point of the first line.
ColumnA2columnA2column_a2 (input_control) point.x(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)
Column coordinate of the second point of the
first line.
RowB1rowB1row_b1 (input_control) point.y(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)
Row coordinate of the first point of the second line.
ColumnB1columnB1column_b1 (input_control) point.x(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)
Column coordinate of the first point of the
second line.
RowB2rowB2row_b2 (input_control) point.y(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)
Row coordinate of the second point of the second line.
ColumnB2columnB2column_b2 (input_control) point.x(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)
Column coordinate of the second point of the
second line.
Rowrowrow (output_control) point.y(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)
Row coordinate of the intersection point.
Columncolumncolumn (output_control) point.x(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)
Column coordinate of the intersection point.
IsParallelisParallelis_parallel (output_control) number(-array) → (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (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
(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,¶llel)\;
aa_min = get_d(row_i,0)\;
aa_max = get_d(column_i,0)\;
Result
intersection_llIntersectionLl returns 2 (H_MSG_TRUE).
Module
Foundation