powered by
Assigns each point to one of three zones based on its radial distance from a specified center:
focus: inside the inner radius r_in
r_in
glue: between r_in and r_out
r_out
context: outside r_out
This is a helper for visualizing and analyzing fisheye transformations using the Focus–Glue–Context (FGC) model.
classify_zones(coords, cx = 0, cy = 0, r_in = 0.34, r_out = 0.5)
A character vector of the same length as nrow(coords), with values "focus", "glue", or "context".
nrow(coords)
"focus"
"glue"
"context"
A numeric matrix or data frame with at least two columns representing (x, y) coordinates.
(x, y)
Numeric. The x and y coordinates of the fisheye center (default = 0, 0).
Numeric. Inner radius of the focus zone (default = 0.34).
Numeric. Outer radius of the glue zone (default = 0.5).
fisheye_fgc(), plot_fisheye_fgc()
fisheye_fgc()
plot_fisheye_fgc()
# Simple example pts <- matrix(c(0, 0, 0.2, 0.2, 0.6, 0.6), ncol = 2, byrow = TRUE) classify_zones(pts, r_in = 0.3, r_out = 0.5) #> "focus" "glue" "context"
Run the code above in your browser using DataLab