abclines: Lines intersecting the bounding box

Description Usage Arguments Details Value See Also Examples

Description

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

Usage

1
2
rgl.abclines(x, y = NULL, z = NULL, a, b = NULL, c = NULL, ...)
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

These functions draw 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

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

Example output

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl.init' failed, running with 'rgl.useNULL = TRUE'. 

rgl documentation built on Feb. 1, 2021, 3:01 a.m.