Skip to contents

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 for rgl::planes3d() used when useShade = TRUE.

  • argsLines: A list of arguments for rgl::persp3d() when useLines = TRUE. Moreover, the list may contain lines: number of lines.

Value

NULL (invisible)

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()



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()


# pop3d(id = ids) # remove last plane
# }