Plot a plane in 3D.
Usage
plotPlane3D(
normal,
point = NULL,
offset = 0,
useShade = TRUE,
useLines = FALSE,
usePoints = FALSE,
...
)
Arguments
- normal
Normal to the plane.
- point
A point on the plane.
- offset
The offset of the plane (only used if
point = NULL
).- useShade
Plot shade of the plane.
- useLines
Plot lines inside the plane.
- usePoints
Plot point shapes inside the plane.
- ...
Further arguments passed on the the RGL plotting functions. This must be done as lists (see examples). Currently the following arguments are supported:
argsPlanes3d
: A list of arguments forrgl::planes3d()
used whenuseShade = TRUE
.argsLines
: A list of arguments forrgl::persp3d()
whenuseLines = TRUE
. Moreover, the list may containlines
: number of lines.
Examples
# \donttest{
ini3D(argsPlot3d = list(xlim = c(-1,10), ylim = c(-1,10), zlim = c(-1,10)) )
plotPlane3D(c(1,1,1), point = c(1,1,1))
plotPoints3D(c(1,1,1))
plotPlane3D(c(1,2,1), point = c(2,2,2), argsPlanes3d = list(color="red"))
plotPoints3D(c(2,2,2))
plotPlane3D(c(2,1,1), offset = -6, argsPlanes3d = list(color="blue"))
plotPlane3D(c(2,1,1), argsPlanes3d = list(color="green"))
finalize3D()
3D plot
ini3D(argsPlot3d = list(xlim = c(-1,10), ylim = c(-1,10), zlim = c(-1,10)) )
plotPlane3D(c(1,1,1), point = c(1,1,1), useLines = TRUE, useShade = TRUE)
ids <- plotPlane3D(c(1,2,1), point = c(2,2,2), argsLines = list(col="blue", lines = 100),
useLines = TRUE)
finalize3D()
3D plot
# pop3d(id = ids) # remove last plane
# }