centroid_3d_sq_dist: Calculate sum of squared 3D point distances from centroid

View source: R/centroid_3d_sq_dist.R

centroid_3d_sq_distR Documentation

Calculate sum of squared 3D point distances from centroid

Description

Calculates sum of squared point distances in 3D space betweeen points and their centroid.

\frac{ \sum_{i=1}^n (x_i-x_m)^2 + (y_i-y_m)^2 + (z-z_m)^2 }{ sum_(i=1)^n ((x - x_m)^2 + (y - y_m)^2 + (z - z_m)^2) }

Where X/Y/Z represent one axis each, a_m represents the mean of all points' coordinates on an axis, and n represents the total number of points.

Usage

centroid_3d_sq_dist(point_matrix)

Arguments

point_matrix

An n-by-3 numerical matrix where each row corresponds to a single point in 3D space.


synr documentation built on June 22, 2024, 7:25 p.m.