@thi.ng/geom
Version:
Functional, polymorphic API for 2D geometry types & SVG generation
26 lines • 873 B
TypeScript
import type { Attribs } from "./api.js";
import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
import { Polyline } from "./api/polyline.js";
export declare const polyline: (pts?: Iterable<Vec>, attribs?: Attribs) => Polyline;
/**
* Creates a polyline spiral from given params. The number of twists is defined
* by the angle range. Resolution depends on angle range and number of steps.
*
* @example
* ```ts
* import { spiral } from "@thi.ng/geom";
*
* // 4 full turns over 80 steps
* spiral([0, 0], 5, 100, 0, Math.PI * 2 * 4, 80);
* ```
*
* @param origin
* @param r1
* @param r2
* @param startTheta
* @param endTheta
* @param steps
* @param attribs
*/
export declare const spiral: (origin: ReadonlyVec, r1: number, r2: number, startTheta: number, endTheta: number, steps: number, attribs?: Attribs) => Polyline;
//# sourceMappingURL=polyline.d.ts.map