@thi.ng/geom
Version:
Functional, polymorphic API for 2D geometry types & SVG generation
32 lines • 857 B
TypeScript
import type { Maybe } from "@thi.ng/api";
import type { MultiFn2 } from "@thi.ng/defmulti";
import type { IShape } from "./api.js";
import type { Vec } from "@thi.ng/vectors";
/**
* Samples and returns point on the boundary of given 2D shape at normalized
* parametric distance `t`. If the shape is closed, t=0 and t=1 yield the same
* result.
*
* @remarks
* Currently implemented for:
*
* - {@link Arc}
* - {@link Circle}
* - {@link Cubic}
* - {@link Ellipse}
* - {@link Line}
* - {@link Polygon}
* - {@link Polyline}
* - {@link Quad}
* - {@link Quadratic}
* - {@link Ray}
* - {@link Rect}
* - {@link Triangle}
*
* Note: For {@link Ray}, the `t` is interpreted as distance from the ray origin.
*
* @param shape
* @param t
*/
export declare const pointAt: MultiFn2<IShape, number, Maybe<Vec>>;
//# sourceMappingURL=point-at.d.ts.map