<< CL_gm_pixelSize Geometry and events CL_gm_raan2beta >>

celestlab >> Geometry and events > CL_gm_projLine

CL_gm_projLine

Orthogonal projection onto a straight line

Calling Sequence

[posp, alpha] = CL_gm_projLine(pos1, pos2, pos)

Description

Parameters

pos1, pos2:

Points defining the straight line. (3xN or 3x1)

pos:

Point to be projected. (3xN or 3x1)

posp:

Image of pos by the projection. (3xN)

alpha:

Coefficient defining the projeted point (see above for details). (1xN)

Authors

See also

Examples

// Projection of [0;0;0] on the line defined by pos1 and pos2
pos1 = [1; 1; 0];
pos2 = [1; -2; 0];
// Result is [1; 0; 0] and alpha is 1/3
[posp, alpha] = CL_gm_projLine(pos1, pos2, [0;0;0])

Report an issue
<< CL_gm_pixelSize Geometry and events CL_gm_raan2beta >>