An instance of data type Point_d<Kernel> is a point of Euclidean space in dimension d. A point p = (p0, ,p d - 1 ) in d-dimensional space can be represented by homogeneous coordinates (h0,h1, ,hd) of number type RT such that pi = hi/hd, which is of type FT. The homogenizing coordinate hd is positive.
We call pi, 0 ≤ i < d the i-th Cartesian coordinate and hi, 0 ≤ i ≤ d, the i-th homogeneous coordinate. We call d the dimension of the point.
| |||||
introduces a variable p of
type Point_d<Kernel>.
| |||||
| |||||
introduces a variable
p of type Point_d<Kernel> in d-dimensional space,
initialized to the origin.
| |||||
| |||||
| |||||
introduces a variable
p of type Point_d<Kernel> in dimension d. If size [first,last) == d this creates a point with Cartesian coordinates
set [first,last). If size [first,last) == d+1 the range
specifies the homogeneous coordinates H = set [first,last) =
( ± h0, ± h1,
, ± hd) where the sign chosen is the
sign of hd.
| |||||
| |||||
| |||||
introduces a
variable p of type Point_d<Kernel> in dimension d
initialized to the point with homogeneous coordinates as defined by
H = set [first,last) and D: ( ± H[0],
± H[1],
, ± H[d-1], ± D). The sign
chosen is the sign of D.
| |||||
| |||||
introduces a variable
p of type Point_d<Kernel> in 2-dimensional space.
| |||||
| |||||
introduces a
variable p of type Point_d<Kernel> in 3-dimensional
space.
|
|
| returns the dimension of p. | ||
|
|
returns the i-th Cartesian
coordinate of p.
| ||
|
|
returns the i-th Cartesian
coordinate of p.
| ||
|
|
returns the i-th homogeneous
coordinate of p.
| ||
|
| returns an iterator pointing to the zeroth Cartesian coordinate p0 of p. | ||
|
| returns an iterator pointing beyond the last Cartesian coordinate of p. | ||
|
| returns an iterator pointing to the zeroth homogeneous coordinate h0 of p. | ||
|
| returns an iterator pointing beyond the last homogeneous coordinate of p. | ||
|
| |||
returns t(p). |
|
| returns the vector p-O. | ||
|
|
returns p -
q.
| ||
|
|
returns p +
v.
| ||
|
|
returns p -
v.
| ||
|
|
adds v
to p.
| ||
|
|
subtracts
v from p.
| ||
|
| returns true if p is the origin. |
Points are implemented by arrays of RT items. All operations like creation, initialization, tests, point - vector arithmetic, input and output on a point p take time O(p.dimension()). dimension(), coordinate access and conversions take constant time. The space requirement for points is O(p.dimension()).