findSphereClusterCenter: Find a center for points on the unit sphere

View source: R/TrajectoryGeometry.R

findSphereClusterCenterR Documentation

Find a center for points on the unit sphere


This function takes a set of points on the d-1 sphere in d-space and finds a center for these. Depending on choice of statistic, this center is a point on the sphere which minimizes either the median distance, the mean distance or the maximum distance of the center to the given points. "Distance" here is taken to mean angle between the points, i.e., arccos of their dot product.


findSphereClusterCenter(points, statistic, normalize = FALSE)



- A set of n points on the (d-1) sphere given as an n x d matrix.


- The statistic to be minimized. Allowable values are 'median','mean' or 'max'.


- If this is set to TRUE, the function will start by normalizing the input points.


This returns a point in dimension d given as a vector.


projection = projectPathToSphere(straight_path)
center = findSphereClusterCenter(projection,'mean')

AnnaLaddach/TrajectoryGeometry documentation built on Feb. 23, 2024, 2:24 p.m.