Skip to contents

Plots the great-circle segment between two vectors

Usage

stereo_segment(
  x,
  y,
  upper.hem = NULL,
  earea = NULL,
  n = 100L,
  radius = NULL,
  ...
)

Arguments

x, y

objects of class "Vec3", "Line", "Ray", or "Plane"

upper.hem

logical. Whether the projection is shown for upper hemisphere (TRUE) or lower hemisphere (FALSE). Defaults to getOption("structr.upper.hem").

earea

logical. Projection, either TRUE for Lambert equal-area projection, or FALSE for meridional stereographic projection. Defaults to getOption("structr.earea").

n

integer. number of points along great-circle (100 by default)

radius

numeric. Radius of circle. Defaults to getOption("structr.radius").

...

optional graphical parameters passed to graphics::lines()

Examples

x <- Line(120, 7)
y <- Line(10, 13)
plot(rbind(x, y))
stereo_segment(x, y, col = "red")


# For multiple segments use lapply():
set.seed(20250411)
mu <- Line(45, 10)
x <- rvmf(100, mu = mu) |> Line()
plot(x)
invisible(lapply(seq_len(nrow(x)), FUN = function(i) {
  stereo_segment(x[i, ], mu, col = i)
}))
points(mu, pch = 16, col = "white")