Programmer Guide/Command Reference/EVAL/pgitest: Difference between revisions
(initial import) |
m (1 revision: Initial import) |
(No difference)
|
Revision as of 17:31, 18 November 2010
Contents
- 1 pgitest - detect point in polygon
- 2 Usage:
- 3 Description:
- 4 Parameters:
- 5 Result:
- 6 Usage:
- 7 Description:
- 8 Parameters:
- 9 Result:
- 10 Usage:
- 11 Description:
- 12 Parameters:
- 13 Result:
- 14 Usage:
- 15 Description:
- 16 Parameters:
- 17 Result:
- 18 pgsplit - split polygon through line
- 19 Usage:
- 20 Description:
- 21 Result:
- 22 pgtrans - shift, scale or rotate polygon
- 23 Usage:
- 24 Description:
- 25 Parameters:
- 26 Result:
pgitest - detect point in polygon
Usage:
I := pgITest( {pg_stream|pg_cplist}XS, {number}IX, {number}XP, {number}YP )
Description:
Detect if a point is inside a simple polygon.
Parameters:
- XS
- The polygon stream containing the simple polygon, or point list describing the simple polygon.
- IX
- The index of the polygon describing the simple polygon.
- XP
- The x point to test.
- YP
- The y point to test.
Result:
0
if the point <XP,YP> is outside the polygon XS[IX]
1
if the point <XP,YP> is inside the polygon XS[IX]
Usage:
I := pgITest( {pg_stream|pg_cplist}XS, {number}IX, {vector}XP, {vector}YP )
I := pgITest( {pg_stream|pg_cplist}XS, {number}IX, {number}XP, {vector}YP )
I := pgITest( {pg_stream|pg_cplist}XS, {number}IX, {vector}XP, {number}YP )
Description:
Detect if a line is inside a simple polygon.
Parameters:
Result:
A vector I with I[j]=0 if <XP[j],YP[j]> is outside the polygon XS[IX] and
I[j]=1 if <XP[j],YP[j]> is inside the polygon XS[IX]
Usage:
I := pgITest( {pg_stream|pg_cplist}XS, {number}IX, {number}X1, {number}Y1, {number}X2, number{Y2} )
Description:
Detect if a line is inside a simple polygon.
Parameters:
Result:
0 if all points of the line <X1,Y1>..<X2,Y2> are outside the polygon XS[IX]
1 if all points of the line <X1,Y1>..<X2,Y2> are inside the polygon XS[IX]
2 if the line <X1,Y1>..<X2,Y2> is intersects the polygon XS[IX]
Usage:
I := pgITest( {pg_stream|pg_cplist}XS, {number}IX, {pg_stream|pg_cplist}YS, {number}IY )
Description:
Detect if a simple polygon is inside a simple polygon.
Parameters:
Result:
0 if polygon YS[IX] is outside of polygon XS[IX]
1 if polygon YS[IX] is included in polygon XS[IX]
2 if polygon YS[IX] and XS[IX] are partly overlapping
3 if polygon XS[IX] is included in polygon YS[IX]
pgsplit - split polygon through line
Usage:
YS := pgSplit( {pg_stream}XS, {number}IX, {number}X1, {number}Y1, {number}X2, {number}Y2 )
Description:
Use a line to split a polygon into two polygons.
Result:
The pg_stream YS containing the two polygon parts of the polygon XS[IX]
pgtrans - shift, scale or rotate polygon
Usage:
YS := pgTrans( {pg_stream}XS, {number}IX, {number}DX=0, {number}DY=0, {number}KX=1, {number}KY=1, {number}A=0)
Description:
Shift (dx/dy) / scale (kx/ky) / rotate polygon (a).
Parameters:
- XS
- The polygon stream containing the simple polygon, or point list describing the simple polygon.
- IX
- The index of the polygon describing the simple polygon.
- DX
- DY
- KX
- KY
- A
Result:
The resulting polygon.