Programmer Guide/Command Reference/EVAL/pgsplit: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
Line 4: Line 4:
:<code>pgsplit(<var>X</var>, <var>IX</var>, <var>PX1<sub>scalar</sub></var>, <var>PY1<sub>scalar</sub></var>), <var>PX2<sub>scalar</sub></var>, <var>PY2<sub>scalar</sub></var>)</code>
:<code>pgsplit(<var>X</var>, <var>IX</var>, <var>PX1<sub>scalar</sub></var>, <var>PY1<sub>scalar</sub></var>), <var>PX2<sub>scalar</sub></var>, <var>PY2<sub>scalar</sub></var>)</code>
:;<var>X</var>:a [[../#polygons|closed point-list]] or a [[../#polygons|polygon-stream]] defining one or more polygons.
:;<var>X</var>:a [[../#polygons|closed point-list]] or a [[../#polygons|polygon-stream]] defining one or more polygons.
:;<var>IX</var>:The index of the polygon of ''X'' to be splitted; 0 <= <var>IX</var> < <code>[[../pgget|pgget]](''X'')</code>
:;<var>IX</var>:The index of the polygon of ''X'' to be splitted; 0 &le; <var>IX</var> < <code>[[../pgget|pgget]](''X'')</code>
:;<var>PX1, PY1, PX2, PY2</var>: The points <''PX1'',''PY1''> and <''PX2'',''PY2''> defining the line to split the polygon. There must be exactly two intersections of the line with the polygon!
:;<var>PX1, PY1, PX2, PY2</var>: The points <''PX1'',''PY1''> and <''PX2'',''PY2''> defining the line to split the polygon. There must be exactly two intersections of the line with the polygon!
;Result: The result ''r'' is a [[../#polygons|polygon-stream]] containing the two split parts of the polygon.
;Result: The result ''r'' is a [[../#polygons|polygon-stream]] containing the two split parts of the polygon.

Latest revision as of 19:29, 21 April 2011

Use a line to split a polygon into two parts.

Usage
pgsplit(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 splitted; 0 ≤ IX < pgget(X)
PX1, PY1, PX2, PY2
The points <PX1,PY1> and <PX2,PY2> defining the line to split the polygon. There must be exactly two intersections of the line with the polygon!
Result
The result r is a polygon-stream containing the two split parts of the polygon.
See also
pginit, pgget, pgitest, pgiline, pgxgrid, pgtrans, pghull

<function list>

Navigation menu

Personal tools