A function that produces a three-dimensional HTML-based rendering of surface slope.
The Slope() function must be performed prior to using Slope3d().
Slope3d(
Slope_File,
colors = c("blue", "cornflowerblue", "green", "yellowgreen", "yellow", "orangered",
"red"),
maskNegatives = TRUE,
legend = TRUE,
main = "",
cex = 1,
widget_size_px = 768,
scene_zoom = 1.5,
leftOffset = 0,
fieldofview = 0,
title_font_size_px = 30,
legend_magnify = 1,
fileName = NA,
binary = FALSE
)An object that stores the output of the Slope function
Character vector of colors to build a continuous color gradient
Logical; if TRUE, negative slopes are masked in black. If FALSE, negatives are reflected into the positive range (original behavior).
Logical; draw a legend (right side of the widget)
Plot title
Base scaling for legend/ticks (relative multiplier)
Square widget size in pixels (default 768)
Initial zoom for the 3d scene (default 1.5)
Horizontal camera nudge (-1..1 recommended)
Field of view in degrees (0 = isometric)
Title font size in pixels (default 30)
Additional scale factor for the legend/tick text
Optional file base name to save a colored *.ply (no legend)
Binary PLY if TRUE (smaller files)
Colors represent face slope magnitudes. With maskNegatives = TRUE, negative
slopes are shown in black. With maskNegatives = FALSE, negative magnitudes
are reflected into the positive range for coloring continuity (original behavior).
The plotting window is an HTML widget (no Quartz/rgl window). The legend is rendered in HTML/CSS and aligned vertically at the right of the scene.
s <- Slope(Tooth)
if(interactive()){Slope3d(s)}
Run the code above in your browser using DataLab