EasyGeometry::D2::Point
A point in a 2-dimensional Euclidean space.
.project(point1, point2)
Project the point1
onto the line between the origin and point2
along the normal direction.
.is_collinear?(*points)
Returns True
if there exists a line that contains self
and points
. Returns False
otherwise. A trivially True
value is returned if no points are given.
.affine_rank(*points)
The affine rank of a set of points is the dimension of the smallest affine space containing all the points.
For example, if the points lie on a line (and are not all the same) their affine rank is 1. If the points lie on a plane but not a line, their affine rank is 2.
By convention, the empty set has affine rank -1.
#dot(point)
Dot product, also known as inner product or scalar product.
#zero?
True
if every coordinate is zero, False
if any coordinate is not zero.
#==(point)
Compare self and other Point. Return False
unless point is a EasyGeometry::D2::Point
#-(point)
Subtraction of two points
.
#+(point)
Addition of two points
.
#*(scalar)
Multiplication of point
and number
.
#/(scalar)
Dividing of point
and number
.
#abs
Returns the distance between this point
and the origin
.
#distance(entity)
Distance between self
and another geometry entity
.
#intersection(entity)
Intersection between point
and another geometry entity
.
#midpoint(point)
The midpoint between self
and another point
.
Last updated
Was this helpful?