M-File Help: Plucker | View code for Plucker |
Plucker coordinate class
Concrete class to represent a line in Plucker coordinates.
line | Return Plucker line coordinates (1x6) |
side | Side operator |
origin_closest origin_distance distance mindist point pp L intersect
* | Multiply Plucker matrix by a general matrix |
| | Side operator |
Create Plucker object
p = Plucker(p1, p2) create a Plucker object that represents the line joining the 3D points p1 (3x1) and p2 (3x1).
p = Plucker('points', p1, p2) as above.
p = Plucker('planes', PL1, PL2) create a Plucker object that represents the line formed by the intersection of two planes PL1, PL2 (4x1).
p = Plucker('wv', W, V) create a Plucker object from its direction W (3x1) and moment vectors V (3x1).
p = Plucker('Pw', p, W) create a Plucker object from a point p (3x1) and direction vector W (3x1).
Convert to string
s = P.char() is a string showing Plucker parameters in a compact single line format.
Point on line closest to given point
p = PL.closest(x) is the coordinate of a point on the line that is closest to the point x (3x1).
[p,d] = PL.closest(x) as above but also returns the closest distance.
Display parameters
P.display() displays the Plucker parameters in compact single line format.
Convert Plucker coordinates to real vector
PL.double() is a 6x1 vector comprising the moment and direction vectors.
Line intersection
PL1.intersect(pl2) is zero if the lines intersect. It is positive if pl2 passes counterclockwise and negative if pl2 passes clockwise. Defined as looking in direction of PL1
o o
counterclockwise clockwise
Line intersection with plane
x = PL.intersect_plane(p) is the point where the line intersects the plane p. Planes are structures with a normal p.n (3x1) and an offset p.p (1x1) such that p.n x + p.p = 0. x=[] if no intersection.
[x,T] = PL.intersect_plane(p) as above but also returns the line parameters (1xN) at the intersection points.
Line intersects plot volume
p = PL.intersect_volume(bounds, line) returns a matrix (3xN) with columns that indicate where the line intersects the faces of the plot volume specified in terms of [xmin xmax ymin ymax zmin zmax]. The number of columns N is either 0 (the line is outside the plot volume) or 2. LINE is a structure with elements .p (3x1) a point on the line and .v a vector parallel to the line.
[p,T] = PL.intersect_volume(bounds, line) as above but also returns the line parameters (1xN) at the intersection points.
Skew matrix form of the line
L = PL.L() is the Plucker matrix, a 4x4 skew-symmetric matrix representation of the line.
Plucker line coordinates
P.line() is a 6-vector representation of the Plucker coordinates of the line.
Minimum distance between two lines
d = PL1.mindist(pl2) is the minimum distance between two Plucker lines PL1 and pl2.
Plucker composition
PL * M is the product of the Plucker matrix and M (4xN).
M * PL is the product of M (Nx4) and the Plucker matrix.
Operator form of side operator
P1 | P2 is the side operator which is zero whenever the lines P1 and P2 intersect or are parallel.
Point on line closest to the origin
p = PL.origin_closest() is the coordinate of a point on the line that is closest to the origin.
Smallest distance from line to the origin
p = PL.origin_distance() is the smallest distance of a point on the line to the origin.
Plot a line
PL.plot(options) plots the Plucker line within the current plot volume.
PL.plot(b, options) as above but plots within the plot bounds b = [XMIN XMAX YMIN YMAX ZMIN ZMAX].
Point on line
p = PL.point(L) is a point on the line, where L is the parametric distance along the line from the principal point of the line.
Principal point of the line
p = PL.pp() is a point on the line.
Plucker side operator
x = SIDE(p1, p2) is the side operator which is zero whenever the lines p1 and p2 intersect or are parallel.
© 1990-2014 Peter Corke.