Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

extprod3d

Compute external- or ‘cross’- product of 3D vectors.


Description

Computes the external product

(x2 * y3 - x3 * y2, x3 * y1 - x1 * y3, x1 * y2 - x2 * y1)

(x2 * y3 - x3 * y2, x3 * y1 - x1 * y3, x1 * y2 - x2 * y1)

(x2 * y3 - x3 * y2, x3 * y1 - x1 * y3, x1 * y2 - x2 * y1)

of the 3D vectors in x and y.

Usage

extprod3d(x, y, drop = TRUE)

Arguments

x

n-by-3 matrix. Each row is one x-vector

y

n-by-3 matrix. Each row is one y-vector

drop

logical. If TRUE and if the inputs are one row matrices or vectors, then delete the dimensions of the array returned.

Value

If n is greater than 1 or drop is FALSE, n-by-3 matrix; if n is 1 and drop is TRUE, a vector of length 3.

Author(s)

Raoul Grasman

See Also


geometry

Mesh Generation and Surface Tessellation

v0.4.5
GPL (>= 3)
Authors
Jean-Romain Roussel [cph, ctb] (wrote tsearch function with QuadTrees), C. B. Barber [cph], Kai Habel [cph, aut], Raoul Grasman [cph, aut], Robert B. Gramacy [cph, aut], Pavlo Mozharovskyi [cph, aut], David C. Sterratt [cph, aut, cre] (<https://orcid.org/0000-0001-9092-9099>)
Initial release
2019-12-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.