vc_plot_region: Display a stored planar region in 2D or as a horizontal plate

View source: R/region.R

vc_plot_regionR Documentation

Display a stored planar region in 2D or as a horizontal plate

Description

Display a stored planar region in 2D or as a horizontal plate

Usage

vc_plot_region(
  result,
  view = c("2d", "3d"),
  plane_z = 0,
  show_grid = TRUE,
  title = NULL
)

Arguments

result

Result of vc_region().

view

Filled 2D region or sampled 3D plate.

plane_z

Finite display height for the 3D plate, not an integration value.

show_grid

Logical; show stored vertical sections in the 3D view.

title

Optional character title.

Details

In 2D reuses vc_plot_double_integral's sampled-domain renderer. In 3D the grid has u rows/x columns and every height equals plane_z. The plate has zero thickness; display height is not scalar-field height. Interpolation may miss crossings/oscillations between samples. Degenerate sections may collapse surface triangles. Human rendering review is separate.

Value

Plotly widget based only on stored region samples; no boundary reevaluation, integration or area calculation is performed.

Examples

if(requireNamespace("plotly",quietly=TRUE)) {
  r <- vc_region(function(x)x^2,sqrt,c(0,1),n=8,n_u=4)
  vc_plot_region(r,view="3d",plane_z=2)
}

vectorialcalculus documentation built on Nov. 17, 2026, 1:09 a.m.