meta-log-db
Version:
Native database package for Meta-Log (ProLog, DataLog, R5RS)
41 lines • 1.35 kB
TypeScript
/**
* Projective/Affine Geometry Converter
*
* Converts between projective (homogeneous, normalized) and affine (Cartesian, open) coordinates
*/
import { AffineData, ProjectiveData, CoordinateTransform } from './types.js';
/**
* Projective/Affine Converter
*
* Handles coordinate transformations between projective and affine spaces
*/
export declare class ProjectiveAffineConverter {
/**
* Convert affine coordinates to projective
*
* Affine (x, y) → Projective (x, y, z, w) where w = 1.0
*
* @param affine - Affine coordinates
* @returns Projective coordinates
*/
affineToProjective(affine: AffineData): ProjectiveData;
/**
* Convert projective coordinates to affine
*
* Projective (x, y, z, w) → Affine (x/w, y/w, z/w)
*
* @param projective - Projective coordinates
* @returns Affine coordinates
*/
projectiveToAffine(projective: ProjectiveData): AffineData;
/**
* Transform coordinates
*
* @param data - Input coordinates
* @param from - Source coordinate system
* @param to - Target coordinate system
* @returns Transformation result
*/
transform(data: AffineData | ProjectiveData, from: 'affine' | 'projective', to: 'affine' | 'projective'): CoordinateTransform;
}
//# sourceMappingURL=converter.d.ts.map