ClassesClassesClassesClasses | | | | Operators

projection_plprojection_plProjectionPlprojection_plProjectionPlProjectionPl (Operator)

Name

projection_plprojection_plProjectionPlprojection_plProjectionPlProjectionPl — Calculate the projection of a point onto a line.

Signature

projection_pl( : : Row, Column, Row1, Column1, Row2, Column2 : RowProj, ColProj)

Herror projection_pl(double Row, double Column, double Row1, double Column1, double Row2, double Column2, double* RowProj, double* ColProj)

Herror T_projection_pl(const Htuple Row, const Htuple Column, const Htuple Row1, const Htuple Column1, const Htuple Row2, const Htuple Column2, Htuple* RowProj, Htuple* ColProj)

Herror projection_pl(const HTuple& Row, const HTuple& Column, const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2, double* RowProj, double* ColProj)

Herror projection_pl(const HTuple& Row, const HTuple& Column, const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2, HTuple* RowProj, HTuple* ColProj)

void ProjectionPl(const HTuple& Row, const HTuple& Column, const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2, HTuple* RowProj, HTuple* ColProj)

static void HMisc::ProjectionPl(const HTuple& Row, const HTuple& Column, const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2, HTuple* RowProj, HTuple* ColProj)

static void HMisc::ProjectionPl(double Row, double Column, double Row1, double Column1, double Row2, double Column2, double* RowProj, double* ColProj)

void HOperatorSetX.ProjectionPl(
[in] VARIANT Row, [in] VARIANT Column, [in] VARIANT Row1, [in] VARIANT Column1, [in] VARIANT Row2, [in] VARIANT Column2, [out] VARIANT* RowProj, [out] VARIANT* ColProj)

VARIANT HMiscX.ProjectionPl(
[in] VARIANT Row, [in] VARIANT Column, [in] VARIANT Row1, [in] VARIANT Column1, [in] VARIANT Row2, [in] VARIANT Column2, [out] VARIANT* ColProj)

static void HOperatorSet.ProjectionPl(HTuple row, HTuple column, HTuple row1, HTuple column1, HTuple row2, HTuple column2, out HTuple rowProj, out HTuple colProj)

static void HMisc.ProjectionPl(HTuple row, HTuple column, HTuple row1, HTuple column1, HTuple row2, HTuple column2, out HTuple rowProj, out HTuple colProj)

static void HMisc.ProjectionPl(double row, double column, double row1, double column1, double row2, double column2, out double rowProj, out double colProj)

Description

The operator projection_plprojection_plProjectionPlprojection_plProjectionPlProjectionPl calculates the projection of a point (RowRowRowRowRowrow,ColumnColumnColumnColumnColumncolumn) onto a line which is represented by the two points (Row1Row1Row1Row1Row1row1,Column1Column1Column1Column1Column1column1) and (Row2Row2Row2Row2Row2row2,Column2Column2Column2Column2Column2column2). The coordinates of the projected point are returned in RowProjRowProjRowProjRowProjRowProjrowProj and ColProjColProjColProjColProjColProjcolProj.

Parallelization

Parameters

RowRowRowRowRowrow (input_control)  point.y(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Row coordinate of the point.

ColumnColumnColumnColumnColumncolumn (input_control)  point.x(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Column coordinate of the point.

Row1Row1Row1Row1Row1row1 (input_control)  point.y(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Row coordinate of the first point on the line.

Column1Column1Column1Column1Column1column1 (input_control)  point.x(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Column coordinate of the first point on the line.

Row2Row2Row2Row2Row2row2 (input_control)  point.y(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Row coordinate of the second point on the line.

Column2Column2Column2Column2Column2column2 (input_control)  point.x(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Column coordinate of the second point on the line.

RowProjRowProjRowProjRowProjRowProjrowProj (output_control)  real(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Row coordinate of the projected point.

ColProjColProjColProjColProjColProjcolProj (output_control)  real(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Column coordinate of the projected point

Example (HDevelop)

dev_set_color ('black')
RowLine1 := 400
ColLine1 := 200
RowLine2 := 240
ColLine2 := 400
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_circle (WindowHandle, Rows+n, Columns, 2)
  projection_pl (Rows+n, Columns, RowLine1, ColLine1, RowLine2, ColLine2, \
                 RowProj, ColProj)
  dev_set_color ('blue')
  disp_line (WindowHandle, RowProj-2, ColProj, RowProj+2, ColProj)
  disp_line (WindowHandle, RowProj, ColProj-2, RowProj, ColProj+2)
  n := n+8
endfor

Example (C)

projection_pl(row,column,row1,column1,row2,column2,
              &row_proj,&col_proj);

Example (HDevelop)

dev_set_color ('black')
RowLine1 := 400
ColLine1 := 200
RowLine2 := 240
ColLine2 := 400
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_circle (WindowHandle, Rows+n, Columns, 2)
  projection_pl (Rows+n, Columns, RowLine1, ColLine1, RowLine2, ColLine2, \
                 RowProj, ColProj)
  dev_set_color ('blue')
  disp_line (WindowHandle, RowProj-2, ColProj, RowProj+2, ColProj)
  disp_line (WindowHandle, RowProj, ColProj-2, RowProj, ColProj+2)
  n := n+8
endfor

Example (HDevelop)

dev_set_color ('black')
RowLine1 := 400
ColLine1 := 200
RowLine2 := 240
ColLine2 := 400
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_circle (WindowHandle, Rows+n, Columns, 2)
  projection_pl (Rows+n, Columns, RowLine1, ColLine1, RowLine2, ColLine2, \
                 RowProj, ColProj)
  dev_set_color ('blue')
  disp_line (WindowHandle, RowProj-2, ColProj, RowProj+2, ColProj)
  disp_line (WindowHandle, RowProj, ColProj-2, RowProj, ColProj+2)
  n := n+8
endfor

Example (HDevelop)

dev_set_color ('black')
RowLine1 := 400
ColLine1 := 200
RowLine2 := 240
ColLine2 := 400
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_circle (WindowHandle, Rows+n, Columns, 2)
  projection_pl (Rows+n, Columns, RowLine1, ColLine1, RowLine2, ColLine2, \
                 RowProj, ColProj)
  dev_set_color ('blue')
  disp_line (WindowHandle, RowProj-2, ColProj, RowProj+2, ColProj)
  disp_line (WindowHandle, RowProj, ColProj-2, RowProj, ColProj+2)
  n := n+8
endfor

Example (HDevelop)

dev_set_color ('black')
RowLine1 := 400
ColLine1 := 200
RowLine2 := 240
ColLine2 := 400
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_circle (WindowHandle, Rows+n, Columns, 2)
  projection_pl (Rows+n, Columns, RowLine1, ColLine1, RowLine2, ColLine2, \
                 RowProj, ColProj)
  dev_set_color ('blue')
  disp_line (WindowHandle, RowProj-2, ColProj, RowProj+2, ColProj)
  disp_line (WindowHandle, RowProj, ColProj-2, RowProj, ColProj+2)
  n := n+8
endfor

Result

projection_plprojection_plProjectionPlprojection_plProjectionPlProjectionPl returns 2 (H_MSG_TRUE).

Module

Foundation


ClassesClassesClassesClasses | | | | Operators