points_on_line: Determine coordinates of points on a line
Description
Determine coordinates of points on a line with center and direction,
based on the distances from the center given in dist_center.
This works by using the vector formulation of the line equation assuming
direction is a n-dimensional unit vector. In other words,
considering d=d = as.matrix(direction) (n
1n x 1 vector), c=c = as.matrix(center) (n
1n x 1 vector), and w=w =
as.matrix(dist_center) (p 1p x 1 vector), the coordinates
of points on the line are given by:
P=1\,c^T + wd^T
P = 1c' + wd'
where PP is the p np x n matrix of point
coordinates on the line, and 11 is a p 1p
x 1 vector with all entries equal to 1.
Usage
points_on_line(center, direction, dist_center)
Value
Coordinates of points on the specified line
(p np x n matrix).
Arguments
center
Center of the line (n-component vector).
direction
Line direction (n-component unit vector).
dist_center
Distance of each point to the center of the line
(n-component vector, where n is the number of points).