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

abclines

Lines intersecting the bounding box


Description

This adds mathematical lines to a scene. Their intersection with the current bounding box will be drawn.

Usage

abclines3d(x, y = NULL, z = NULL, a, b = NULL, c = NULL, ...)

Arguments

x, y, z

Coordinates of points through which each line passes.

a, b, c

Coordinates of the direction vectors for the lines.

...

Material properties.

Details

Draws the segment of a line that intersects the current bounding box of the scene using the parametrization (x, y, z) + (a, b, c) * s where s is a real number.

Any reasonable way of defining the coordinates x, y, z and a, b, c is acceptable. See the function xyz.coords for details.

Value

A shape ID of the object is returned invisibly.

See Also

planes3d, rgl.planes for mathematical planes.

segments3d draws sections of lines that do not adapt to the bounding box.

Examples

plot3d(rnorm(100), rnorm(100), rnorm(100))
abclines3d(0, 0, 0, a = diag(3), col = "gray")

rgl

3D Visualization Using OpenGL

v0.106.8
GPL
Authors
Duncan Murdoch [aut, cre], Daniel Adler [aut], Oleg Nenadic [ctb], Simon Urbanek [ctb], Ming Chen [ctb], Albrecht Gebhardt [ctb], Ben Bolker [ctb], Gabor Csardi [ctb], Adam Strzelecki [ctb], Alexander Senger [ctb], The R Core Team [ctb, cph], Dirk Eddelbuettel [ctb], The authors of Shiny [cph], The authors of knitr [cph], Jeroen Ooms [ctb], Yohann Demont [ctb], Joshua Ulrich [ctb], Xavier Fernandez i Marin [ctb], George Helffrich [ctb], Ivan Krylov [ctb]
Initial release

We don't support your browser anymore

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