Calculate the point (x, y) on an ellipse given x or y and the center and major/minor radii of the ellipse.
ellipticPoint(
majorRadius: number,
minorRadius: number,
x?: number(Length),
y?: number(Length),
): Point2d
Arguments
Name | Type | Description | Required |
---|---|---|---|
majorRadius | number | The major radius, a, of the elliptic equation x^2 / a ^ 2 + y^2 / b^2 = 1. | Yes |
minorRadius | number | The minor radius, b, of the hyperbolic equation x^2 / a ^ 2 + y^2 / b^2 = 1. | Yes |
x | number(Length) | The x value. Calculates y and returns (x, y). Incompatible with y . | No |
y | number(Length) | The y value. Calculates x and returns (x, y). Incompatible with x . | No |
Returns
Point2d
- A point in two dimensional space.
Examples
point001 = ellipticPoint(x = 2, majorRadius = 2, minorRadius = 1)
point002 = ellipticPoint(y = 0, majorRadius = 2, minorRadius = 1)
assert(point001[0], isEqualTo = point002[0])
assert(point001[1], isEqualTo = point002[1])