/** @packageDocumentation * @module CartesianGeometry */ import { Point2d, Vector2d } from "../../../geometry3d/Point2dVector2d"; import { XAndY } from "../../../geometry3d/XYZProps"; import { ImplicitCurve2d } from "./ImplicitCurve2d"; /** * Class for an ellipse in the xy plane.The ellipse equation in angular parameterization is * * X = A + U * cos(theta) + V * sin(theta) * which means that in the (skewed and scaled) coordinate system with origin at A and local u and v as * multiples of U and V the implicit equation is u^2 + v^2 = 1 * * Note that the U and V vectors DO NOT need to be perpendicular or have any particular length relationship. * * If U and V ARE perpendicular, their lengths are commonly called the major and minor axis lengths, * and the major and minor axis points are in the U and V directions. * * If U and V are NOT perpendicular, the major and minor axis points are at other directions. * @internal */ export declare class UnboundedEllipse2d extends ImplicitCurve2d { /** The Cartesian coordinates of any center on the line. */ center: Point2d; /** The local u axis direction. */ vectorU: Vector2d; /** The local v axis direction. */ vectorV: Vector2d; private constructor(); /** Return a clone of this circle. */ clone(): UnboundedEllipse2d; /** * Create an axis-aligned UnboundedEllipse2d with axis lengths. * * The implicit equation is (x/scaleU)^2 + (y/scaleV)^2 = 1 * @param centerX x coordinate of center * @param centerY y coordinate of center * @param scaleX x axis radius * @param scaleY y axis radius */ static createFromCenterAndScales(centerX: number, centerY: number, scaleX: number, scaleY: number): UnboundedEllipse2d; /** * Create an UnboundedEllipse2d from xy coordinates and axis vectors. * @param center xy coordinates of center * @param vectorU vector from center to to theta=0 point * @param vectorV vector from center to the theta=90 point */ static createCenterAndAxisVectors(center: XAndY, vectorU: XAndY, vectorV: XAndY): UnboundedEllipse2d; /** * Convert the coordinates of spacePoint to local coordinates relative to the ellipse vectors. * @param spacePoint point for coordinate conversion */ globalToLocal(spacePoint: XAndY): Vector2d | undefined; /** * Return the implicit function value at xy. * @param xy space point * @returns squared local (uv) coordinates minus 1 */ functionValue(xy: XAndY): number; /** * Returns gradient of the implicit function. * @param xy space point */ gradient(xy: XAndY): Vector2d; /** * Find points that are on the ellipse at foot of perpendiculars to the space point. * Pass each point to the handler. * * 0 to 4 handler calls are possible. * @param spacePoint the space point. * @handler the handler to receive all the points on the curve and radians where perpendicular happens. */ emitPerpendiculars(spacePoint: Point2d, handler: (curvePoint: Point2d, radians: number | undefined) => void): void; /** * Evaluate the curve point at parametric angle given in radians. * * Note that the radians is as it appears in sin(radians) and cos( radians), * and this is NOT a geometric angle in the xy plane. * * The radians value is only geometric if the U and V are perpendicular and of equal length, * i.e., the ellipse is a circle. * @param radians angular coordinate in the ellipse. */ radiansToPoint2d(radians: number): Point2d | undefined; /** * Returns the tangent at given radians value. * @param radians parametric angle on the ellipse */ radiansToTangentVector2d(radians: number): Vector2d | undefined; /** Returns true if the ellipse is collapsed to a point or line.*/ isDegenerate(): boolean; /** * Test if the centers and axes of the vectors are close * @param other second hyperbola * @param negatedAndExchangedAxesAreEqual * * if false, a strong equality test requiring both U and V vectors to match. * * This strong test is a test for identical parameterization. * * if true, a weak equality test that allows U and V to be negated and or exchanged. * * The weak test is a test for the same implicit set. * @returns true if identical to tolerance. */ isSameEllipse(other: UnboundedEllipse2d, negatedAndExchangedAxesAreEqual?: boolean): boolean; } //# sourceMappingURL=UnboundedEllipse2d.d.ts.map