/**
 * pathSimplification — Reduce points in paths while preserving shape
 *
 * Algorithms:
 * - Douglas-Peucker (visvalingam-whyatt alternative)
 * - Radial distance
 * - Perpendicular distance
 * - Nth point (uniform sampling)
 * - Visvalingam-Whyatt (area-based)
 *
 * Also includes:
 * - Path smoothing (Catmull-Rom, Bezier)
 * - Point optimization
 */
export interface Point {
    x: number;
    y: number;
}
export type SimplificationAlgorithm = 'douglas-peucker' | 'visvalingam' | 'radial-distance' | 'perpendicular-distance' | 'nth-point';
export type SmoothingAlgorithm = 'catmull-rom' | 'bezier' | 'average' | 'none';
export interface SimplificationOptions {
    /** Algorithm to use */
    algorithm: SimplificationAlgorithm;
    /** Tolerance/threshold (meaning varies by algorithm) */
    tolerance: number;
    /** For nth-point: keep every Nth point */
    nthPoint: number;
    /** Whether path is closed (polygon) */
    isClosed: boolean;
    /** Preserve start/end points */
    preserveEndpoints: boolean;
    /** High quality mode (slower but better) */
    highQuality: boolean;
}
export interface SmoothingOptions {
    /** Smoothing algorithm */
    algorithm: SmoothingAlgorithm;
    /** Tension for Catmull-Rom (0-1, lower = smoother) */
    tension: number;
    /** Number of interpolated points between each pair */
    resolution: number;
    /** Corner angle threshold (degrees) to preserve sharp corners */
    cornerThreshold: number;
}
export declare const DEFAULT_SIMPLIFICATION_OPTIONS: SimplificationOptions;
export declare const DEFAULT_SMOOTHING_OPTIONS: SmoothingOptions;
/**
 * Calculate squared distance between two points
 */
export declare function squaredDistance(p1: Point, p2: Point): number;
/**
 * Calculate distance between two points
 */
export declare function distance(p1: Point, p2: Point): number;
/**
 * Calculate perpendicular distance from point to line segment
 */
export declare function perpendicularDistance(point: Point, lineStart: Point, lineEnd: Point): number;
/**
 * Calculate triangle area (for Visvalingam)
 */
export declare function triangleArea(p1: Point, p2: Point, p3: Point): number;
/**
 * Calculate angle at point b (in degrees)
 */
export declare function angleAt(a: Point, b: Point, c: Point): number;
/**
 * Douglas-Peucker algorithm
 * Recursively simplifies path by removing points within tolerance
 */
export declare function douglasPeucker(points: Point[], tolerance: number, start?: number, end?: number): Point[];
/**
 * Visvalingam-Whyatt algorithm
 * Removes points based on area of triangles
 */
export declare function visvalingam(points: Point[], minArea: number): Point[];
/**
 * Radial distance simplification
 * Removes points too close to previous kept point
 */
export declare function radialDistance(points: Point[], tolerance: number): Point[];
/**
 * Perpendicular distance simplification
 * One-pass version of Douglas-Peucker
 */
export declare function perpendicularDistanceSimplify(points: Point[], tolerance: number): Point[];
/**
 * Nth point simplification
 * Keeps every Nth point
 */
export declare function nthPoint(points: Point[], n: number): Point[];
/**
 * Main simplification function
 */
export declare function simplifyPath(points: Point[], options?: Partial<SimplificationOptions>): Point[];
/**
 * Catmull-Rom spline smoothing
 */
export declare function smoothCatmullRom(points: Point[], opts?: Partial<SmoothingOptions>): Point[];
/**
 * Simple average smoothing
 */
export declare function smoothAverage(points: Point[], opts?: Partial<SmoothingOptions>): Point[];
/**
 * Main smoothing function
 */
export declare function smoothPath(points: Point[], options?: Partial<SmoothingOptions>): Point[];
/**
 * Remove duplicate consecutive points
 */
export declare function removeDuplicates(points: Point[], tolerance?: number): Point[];
/**
 * Remove collinear points (points on straight lines)
 */
export declare function removeCollinear(points: Point[], angleThreshold?: number): Point[];
/**
 * Calculate path length
 */
export declare function pathLength(points: Point[]): number;
/**
 * Calculate path bounds
 */
export declare function pathBounds(points: Point[]): {
    minX: number;
    minY: number;
    maxX: number;
    maxY: number;
    width: number;
    height: number;
};
/**
 * Resample path to uniform point spacing
 */
export declare function resamplePath(points: Point[], targetCount: number): Point[];
export default simplifyPath;
