Learn R Programming

mapycusmaximus (version 1.0.0)

classify_zones: Classify Coordinates into Focus, Glue, or Context Zones

Description

Assigns each point to one of three zones based on its radial distance from a specified center:

  • focus: inside the inner radius r_in

  • glue: between r_in and r_out

  • context: outside r_out

This is a helper for visualizing and analyzing fisheye transformations using the Focus–Glue–Context (FGC) model.

Usage

classify_zones(coords, cx = 0, cy = 0, r_in = 0.34, r_out = 0.5)

Value

A character vector of the same length as nrow(coords), with values "focus", "glue", or "context".

Arguments

coords

A numeric matrix or data frame with at least two columns representing (x, y) coordinates.

cx, cy

Numeric. The x and y coordinates of the fisheye center (default = 0, 0).

r_in

Numeric. Inner radius of the focus zone (default = 0.34).

r_out

Numeric. Outer radius of the glue zone (default = 0.5).

See Also

fisheye_fgc(), plot_fisheye_fgc()

Examples

Run this code
# 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