@thi.ng/geom-poly-utils
Version:
2D polygon/polyline analysis & processing utilities
29 lines • 1.02 kB
TypeScript
import type { Maybe } from "@thi.ng/api";
import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
/**
* Computes and returns the center of the circumcircle of the given 2D
* triangle points. Returns `undefined` if the points are colinear or
* coincident.
*
* @param a - triangle vertex 1
* @param b - triangle vertex 2
* @param c - triangle vertex 3
* @param eps - epsilon value for colinear check
*/
export declare const circumCenter2: (a: ReadonlyVec, b: ReadonlyVec, c: ReadonlyVec, eps?: number) => Maybe<Vec>;
/**
* Computes and returns the center of the circumsphere of the given 3D
* triangle points. Returns `undefined` if the points are colinear or
* coincident.
*
* @remarks
* Based on Jonathan R Shewchuk:
* https://www.ics.uci.edu/~eppstein/junkyard/circumcenter.html
*
* @param a -
* @param b -
* @param c -
* @param eps -
*/
export declare const circumCenter3: (a: ReadonlyVec, b: ReadonlyVec, c: ReadonlyVec, eps?: number) => Maybe<Vec>;
//# sourceMappingURL=circumcenter.d.ts.map