wire3d: Wire frame plots

View source: R/wire3d.R

wire3dR Documentation

Wire frame plots

Description

This function directs the wireframe plot based on the plotengine backend selected.

Usage

wire3d(
  x,
  ...,
  add = TRUE,
  gridlines = FALSE,
  plotengine = getOption("nat.plotengine")
)

## S3 method for class 'hxsurf'
wire3d(x, Regions = NULL, ...)

## S3 method for class 'mesh3d'
wire3d(x, ..., front = "lines", back = "lines")

## S3 method for class 'shapelist3d'
wire3d(x, override = TRUE, ...)

Arguments

x

object of type 'mesh3d' (triangular mesh or quad mesh), 'hxsurf' or 'shapelist3d'

...

Additional arguments passed to wire3d or

add

whether to add objects to an existing plot

gridlines

Whether to display gridlines when using plotly as the backend plotting engine (default: FALSE) add_trace depending on the @param plotengine option choosen

plotengine

Whether to use plotting backend of 'rgl' or 'plotly'

Regions

When x is a multi region hxsurf object. Default plots all. Seed as.mesh3d for details of how the argument is handled.

front, back

Material properties for rendering.

override

should the parameters specified here override those stored in the object?

See Also

wire3d

Examples


library(alphashape3d)
kcs20.a=ashape3d(xyzmatrix(kcs20), alpha = 10)
plot(kcs20.a)

# convert to mesh3d
kcs20.mesh=as.mesh3d(kcs20.a, meshColor = "edges")

# For plotly..
options(nat.plotengine = 'plotly')
wire3d(kcs20.mesh,alpha = 0.1, add = FALSE, col = 'blue')

# For rgl..
options(nat.plotengine = 'rgl')
wire3d(kcs20.mesh,alpha = 0.1, add = FALSE, col = 'blue')


natverse/nat documentation built on Feb. 19, 2024, 7:19 a.m.