pgiline

From STX Wiki
Jump to navigationJump to search

Find all intersections of a line, defined by the starting and the ending point, with the polygon x.

Usage
pgiline(X, IX, PX1scalar, PY1scalar), PX2scalar, PY2scalar)
X
a closed point-list or a polygon-stream defining one or more polygons.
IX
The index of the polygon of X to be tested; 0 <= IX < pgget(X))
PX1, PY1, PX2, PY2
The start point <PX1,PY1> and the end point <PX2,PY2> of the line to be tested.
Result 3
The result r is a Nx3 matrix. Each row of the matrix contains the coordinates of a point of the line and its state.
{class="einrahmen"

! i !! r[i,0], r[i,1] !! r[i,2] |- |0 |start point of the line |0 if the start point is outside XIX
1 if the start point is inside XIX |- |1 .. N-2 |intersection point |0 if the line leaves XIX
1 if the line enters XIX |- |N-1 |end point of the line |0 if the end point is outside XIX
1 if the end point is inside XIX |}

See also
pginit, pgget, pgiline, pgxgrid, pgsplit, pgtrans, pghull


<function list>

Navigation menu

Personal tools