linkend="functions-geometry-rotation-fn"/> path,
circle.
-
+
path '((0,0),(1,0),(1,1))' / point '(2.0,0)'
((0,0),(0.5,0),(0.5,0.5))
-
+
path '((0,0),(1,0),(1,1))' / point(cosd(45), sind(45))
((0,0),&zwsp;(0.7071067811865476,-0.7071067811865476),&zwsp;(1.4142135623730951,0))
-
+ para>entry>
|
- tableentry">
@-@ geometric_type
double precision
-
+
Computes the total length.
Available for lseg, path.
-
+
@-@ path '[(0,0),(1,0),(1,1)]'
2
-
+ para>entry>
|
- tableentry">
@@ geometric_type
point
-
+
Computes the center point.
Available for box, lseg, path,
polygon, circle.
-
+
@@ box '(2,2),(0,0)'
(1,1)
-
+ para>entry>
|
- tableentry">
# geometric_type
integer
-
+
Returns the number of points.
Available for path, polygon.
-
+
# path '((1,0),(0,1),(-1,0))'
3
-
+ para>entry>
|
- tableentry">
geometric_type # geometric_type
point
-
+
Computes the point of intersection, or NULL if there is none.
Available for lseg, line.
-
+
lseg '[(0,0),(1,1)]' # lseg '[(1,0),(0,1)]'
(0.5,0.5)
-
+ para>entry>
|
- tableentry">
box # box
box
-
+
Computes the intersection of two boxes, or NULL if there is none.
-
+
box '(2,2),(-1,-1)' # box '(1,1),(-2,-2)'
(1,1),(-1,-1)
-
+ para>entry>
|
- tableentry">
geometric_type ## geometric_type
point
-
+
Computes the closest point to the first object on the second object.
Available for these pairs of types:
(point, box),
(lseg, line),
(line, box),
(line, lseg).
-
+
point '(0,0)' ## lseg '[(2,0),(0,2)]'
(1,1)
-
+ para>entry>
|
- tableentry">
geometric_type <-> geometric_type
double precision
-
+
Computes the distance between the objects.
Available for all seven geometric types, for all combinations
of point with another geometric type, and for
(lseg, line),
(polygon, circle)
(and the commutator cases).
-
+
circle '<(0,0),1>' <-> circle '<(5,0),1>'
3
-
+ para>entry>
|
- tableentry">
geometric_type @> geometric_type
boolean
-
+
Does first object contain second?
Available for these pairs of types:
(box, point),
(polygon, polygon),
(circle, point),
(circle, circle).
-
+
circle '<(0,0),2>' @> point '(1,1)'
t
-
+ para>entry>
|
- tableentry">
geometric_type <@ geometric_type
boolean
-
+
Is first object contained in or on second?
Available for these pairs of types:
(point, box),
(lseg, line),
(polygon, polygon),
(circle, circle).
-
+
point '(1,1)' <@ circle '<(0,0),2>'
t
-
+ para>entry>
|
- tableentry">
geometric_type && geometric_type
boolean
-
+
Do these objects overlap? (One point in common makes this true.)
Available for box, polygon,
circle.
-
+
box '(1,1),(0,0)' && box '(2,2),(0,0)'
t
-
+ para>entry>
|
- tableentry">
geometric_type << geometric_type
boolean
-
+
Is first object strictly left of second?
Available for point, box,
polygon, circle.
-
+
circle '<(0,0),1>' << circle '<(5,0),1>'
t
-
+ para>entry>
|
- tableentry">
geometric_type >> geometric_type
boolean
-
+
Is first object strictly right of second?
Available for point, box,
polygon, circle.
-
+
circle '<(5,0),1>' >> circle '<(0,0),1>'
t
-
+ para>entry>
|
- tableentry">
geometric_type &< geometric_type
boolean
-
+
Does first object not extend to the right of second?
Available for box, polygon,
circle.
-
+
box '(1,1),(0,0)' &< box '(2,2),(0,0)'
t
-
+ para>entry>
|
- tableentry">
geometric_type &> geometric_type
boolean
-
+
Does first object not extend to the left of second?
Available for box, polygon,
circle.
-
+
box '(3,3),(0,0)' &> box '(2,2),(0,0)'
t
-
+ para>entry>
|
- tableentry">
geometric_type <<| geometric_type
boolean
-
+
Is first object strictly below second?
Available for box, polygon,
circle.
-
+
box '(3,3),(0,0)' <<| box '(5,5),(3,4)'
t
-
+ para>entry>
|
- tableentry">
geometric_type |>> geometric_type
boolean
-
+
Is first object strictly above second?
Available for box, polygon,
circle.
-
+
box '(5,5),(3,4)' |>> box '(3,3),(0,0)'
t
-
+ para>entry>
|
- tableentry">
geometric_type &<| geometric_type
boolean
-
+
Does first object not extend above second?
Available for box, polygon,
circle.
-
+
box '(1,1),(0,0)' &<| box '(2,2),(0,0)'
t
-
+ para>entry>
|
- tableentry">
geometric_type |&> geometric_type
boolean
-
+
Does first object not extend below second?
Available for box, polygon,
circle.
-
+
box '(3,3),(0,0)' |&> box '(2,2),(0,0)'
t
-
+ para>entry>
|
- tableentry">
box <^ box
boolean
-
+
Is first object below second (allows edges to touch)?
-
+
box '((1,1),(0,0))' <^ box '((2,2),(1,1))'
t
-
+ para>entry>
|
- tableentry">
point <^ point
boolean
-
+
Is first object strictly below second?
(This operator is misnamed; it should be <<|.)
-
+
point '(1,0)' <^ point '(1,1)'
t
-
+ para>entry>
|
- tableentry">
box >^ box
boolean
-
+
Is first object above second (allows edges to touch)?
-
+
box '((2,2),(1,1))' >^ box '((1,1),(0,0))'
t
-
+ para>entry>
|
- tableentry">
point >^ point
boolean
-
+
Is first object strictly above second?
(This operator is misnamed; it should be |>>.)
-
+
point '(1,1)' >^ point '(1,0)'
t
-
+ para>entry>
|
- tableentry">
geometric_type ?# geometric_type
boolean
-
+
Do these objects intersect?
Available for these pairs of types:
(box, box),
(line, box),
(line, line),
(path, path).
-
+
lseg '[(-1,0),(1,0)]' ?# box '(2,2),(-2,-2)'
t
-
+ para>entry>
|
-
- ?- geometric_type
+ ?- line
+ boolean
+
+ ?- lseg
boolean
-
+
Is line horizontal?
- Available for lseg, line.
- <?br?>
+
+ <para>
?- lseg '[(-1,0),(1,0)]'
t
-
+ para>entry>
|
- tableentry">
point ?- point
boolean
-
+
Are points horizontally aligned (that is, have same y coordinate)?
-
+
point '(1,0)' ?- point '(0,0)'
t
-
+ para>entry>
|
-
- ?| geometric_type
+ ?| line
+ boolean
+
+ ?| lseg
boolean
-
+
Is line vertical?
- Available for lseg, line.
- <?br?>
+
+ <para>
?| lseg '[(-1,0),(1,0)]'
f
-
+ para>entry>
|
- tableentry">
point ?| point
boolean
-
+
Are points vertically aligned (that is, have same x coordinate)?
-
+
point '(0,1)' ?| point '(0,0)'
t
-
+ para>entry>
|
- tableentry">
- <replaceable>geometric_type ?-| geometric_typee>
+ <type>line ?-| linee>
boolean
-
+
+ lseg ?-| lseg
+ boolean
+
Are lines perpendicular?
- Available for lseg, line.
- <?br?>
+
+ <para>
lseg '[(0,0),(0,1)]' ?-| lseg '[(0,0),(1,0)]'
t
-
+ para>entry>
|
-
- geometric_type ?|| geometric_type
+ line ?|| line
+ boolean
+
+ lseg ?|| lseg
boolean
-
+
Are lines parallel?
- Available for lseg, line.
- <?br?>
+
+ <para>
lseg '[(-1,0),(1,0)]' ?|| lseg '[(-1,2),(1,2)]'
t
-
+ para>entry>
|
- tableentry">
geometric_type ~= geometric_type
boolean
-
+
Are these objects the same?
Available for point, box,
polygon, circle.
-
+
polygon '((0,0),(1,1))' ~= polygon '((1,1),(0,0))'
t
-
+ para>entry>