Programmer Guide/Command Reference/EVAL/pgsplit: Difference between revisions
From STX Wiki
< Programmer Guide | Command Reference | EVAL
Jump to navigationJump to search
(Created page with '{{DISPLAYTITLE:{{SUBPAGENAME}}}} Use a line to split a polygon into two parts. ;Usage: :<code>pgsplit(<var>X</var>, <var>IX</var>, <var>PX1<sub>scalar</sub></var>, <var>PY1<sub>s…') |
No edit summary |
||
Line 8: | Line 8: | ||
;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. | ||
;See also: [[../pginit|pginit]], [[../pgget|pgget]], [[../pgitest|pgitest]], [[../pgiline|pgiline]], [[../pgxgrid|pgxgrid]], [[../pgtrans|pgtrans]], [[../pghull|pghull]] | ;See also: [[../pginit|pginit]], [[../pgget|pgget]], [[../pgitest|pgitest]], [[../pgiline|pgiline]], [[../pgxgrid|pgxgrid]], [[../pgtrans|pgtrans]], [[../pghull|pghull]] | ||
[[../#Functions|<function list>]] | [[../#Functions|<function list>]] |
Revision as of 09:33, 20 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!