orientation.create {espadon} | R Documentation |
Creation of orientation
Description
The orientation.create
function creates the orientation
vectors of a plane:
from 3 points A, B and C (see details),
or from 2 vectors B and C, resp. defining x and y-axis (see details),
or from 2 points A, B defining x-axis, and the normal vector to the plane (see details),
or from a vector B defining x-axis, and the normal vector to the plane (see details).
Usage
orientation.create(A = c(0, 0, 0), B = NULL, C = NULL, normal = NULL)
Arguments
A |
Vector of the x, y and z coordinates of point |
B |
Vector of x, y and z coordinates of point or vector |
C |
Vector of x, y and z coordinates of point or vector |
normal |
Vector of x, y and z coordinates of normal vector. |
Details
When using B
and C
, B-A
define the x-axis
unit vector. The unit vector of the y-axis is orthonormal to the x-axis, coplanar
with A
, B
and C
, and in the direction of A
to C
.
When using B
and normal
, the unit vector of the x-axis is
orthonormal to the normal
vector, in the direction of A
to B
.
The unit vector of the y-axis is defined so as to constitute a direct orthonormal
basis with the unit vector of the x-axis and the normal vector of the plane.
Value
Returns the orientation of the plane. That means the concatenation of 2 vectors, defining an orthonormal basis of the plane.
Examples
A <- c (-29.93, 18.85, 4.34)
B <- c (28.73, 15.36, 4.46)
C <- c (1.53, 75.21, 13.51)
orientation.create (A, B, C)