plotPlane3D: Plot a plane in 3D.

Description Usage Arguments Value Examples

View source: R/plot.R

Description

Plot a plane in 3D.

Usage

1
2
3
4
5
6
7
8
9
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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()
# rgl.pop(id = ids) # remove last plane

gMOIP documentation built on Aug. 23, 2021, 5:09 p.m.