intersection_llintersection_llIntersectionLlIntersectionLlintersection_ll (Operator)
intersection_llintersection_llIntersectionLlIntersectionLlintersection_ll
— Calculate the intersection point of two lines.
Warning
intersection_llintersection_llIntersectionLlIntersectionLlintersection_ll
is obsolete and is only provided for
reasons of backward compatibility. New applications should use the
operator intersection_linesintersection_linesIntersectionLinesIntersectionLinesintersection_lines
of the chapter Tools / Geometry instead.
Signature
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)
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]
Description
The operator intersection_llintersection_llIntersectionLlIntersectionLlintersection_ll
calculates the intersection point
of two lines. As input the two points on each line are expected
(RowA1RowA1RowA1rowA1row_a1
,ColumnA1ColumnA1ColumnA1columnA1column_a1
,
RowA2RowA2RowA2rowA2row_a2
,ColumnA2ColumnA2ColumnA2columnA2column_a2
) and
(RowB1RowB1RowB1rowB1row_b1
,ColumnB1ColumnB1ColumnB1columnB1column_b1
,
RowB2RowB2RowB2rowB2row_b2
,ColumnB2ColumnB2ColumnB2columnB2column_b2
).
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 IsParallelIsParallelIsParallelisParallelis_parallel
is 1. Otherwise, IsParallelIsParallelIsParallelisParallelis_parallel
is 0.
Attention
If the lines are parallel the values of RowRowRowrowrow
and
ColumnColumnColumncolumncolumn
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
RowA1RowA1RowA1rowA1row_a1
(input_control) point.y(-array) →
HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinate of the first point of the first line.
ColumnA1ColumnA1ColumnA1columnA1column_a1
(input_control) point.x(-array) →
HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinate of the first point of the
first line.
RowA2RowA2RowA2rowA2row_a2
(input_control) point.y(-array) →
HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinate of the second point of the first line.
ColumnA2ColumnA2ColumnA2columnA2column_a2
(input_control) point.x(-array) →
HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinate of the second point of the
first line.
RowB1RowB1RowB1rowB1row_b1
(input_control) point.y(-array) →
HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinate of the first point of the second line.
ColumnB1ColumnB1ColumnB1columnB1column_b1
(input_control) point.x(-array) →
HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinate of the first point of the
second line.
RowB2RowB2RowB2rowB2row_b2
(input_control) point.y(-array) →
HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinate of the second point of the second line.
ColumnB2ColumnB2ColumnB2columnB2column_b2
(input_control) point.x(-array) →
HTupleMaybeSequence[Union[float, int]]HTupleHtuple (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) →
HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Row coordinate of the intersection point.
ColumnColumnColumncolumncolumn
(output_control) point.x(-array) →
HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Column coordinate of the intersection point.
IsParallelIsParallelIsParallelisParallelis_parallel
(output_control) number(-array) →
HTupleSequence[int]HTupleHtuple (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,¶llel);
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
Result
intersection_llintersection_llIntersectionLlIntersectionLlintersection_ll
returns 2 (
H_MSG_TRUE)
.
Module
Foundation