Plot the 2D footprint triangles and their vertices used in the RFI 2D area calculation, as a visual QA step to detect spurious triangles inside the footprint. The result is an HTML widget (no Quartz/X11 window) with an optional legend, suitable for RStudio Viewer, Quarto/HTML, and browsers.
Check2D(
RFI_Output,
FootColor = "red",
TriPointsColor = "black",
main = "",
cex = 1,
legend = TRUE,
widget_size_px = 768,
scene_zoom = 1.5,
leftOffset = 0,
fieldofview = 0,
title_font_size_px = 30,
legend_magnify = 1,
point_size = 5,
alpha = 0.35
)An htmltools-browsable object containing the title, 3D widget, and legend.
An object that stores the output of RFI()
Character; fill color for the footprint triangles (default "red")
Character; point color for footprint triangle vertices (default "black")
Character; plot title (default "")
Numeric; relative size multiplier for legend text (default 1)
Logical; show a right-hand legend (default TRUE)
Integer; square size of the widget in pixels (default 768)
Numeric; initial zoom of the 3D scene (default 1.5)
Numeric (-1..1); small horizontal camera nudge (default 0)
Numeric; field of view in degrees; 0 = isometric (default 0)
Integer; title font size in pixels (default 30)
Numeric; additional legend scale factor (default 1)
Numeric; size for triangle vertex points (default 5)
Numeric between 0 and 1; transparency for the footprint fill (default 0.35)
This reproduces the same intent as the classic Check2D(): it draws the triangles
from RFI_Output$Footprint_Triangles and the corresponding 2D coordinates in
RFI_Output$Flattened_Pts. The triangles are plotted in the XY plane (z = 0).
If you see points/triangles inside the footprint that shouldn’t be there,
it typically indicates an alpha value that is too small in the RFI step, leading
to an inflated 2D footprint.
The function uses a headless rgl device and returns an rglwidget embedded in an
HTML layout (title atop, legend on the right)—matching the approach used in DNE3d().
# RFI_out <- RFI(Tooth, alpha = 0.5)
# Check2D(RFI_out, FootColor = "tomato", TriPointsColor = "black",
# main = "RFI 2D Footprint QA")
Run the code above in your browser using DataLab