ParametricFunctionPlot

A ParametricFunctionPlot represents a plot of a parametric function (x(t), y(t)).

Constructor

new ParametricFunctionPlot(expression_x, expression_y, domain, x_range, y_range, discontinuities, min_depthopt, max_depthopt, thresholdopt)

Creates a new ParametricFunctionPlot from an expression, domain, x-range, y-range, and other optional parameters.

Parameters:
NameTypeAttributesDescription
expression_xstring

The x expression of the parametric function.

expression_ystring

The y expression of the parametric function.

domainClosedInterval

The domain of the parametric function.

x_rangeClosedInterval

The x-range of the plot.

y_rangeClosedInterval

The y-range of the plot.

discontinuitiesArray.<number>

The discontinuities of the plot.

min_depthnumber | null<optional>

The minimum depth of the plot.

max_depthnumber | null<optional>

The maximum depth of the plot.

thresholdnumber | null<optional>

The threshold of the plot.

Classes

ParametricFunctionPlot

Members

discontinuities

Returns the discontinuities of the plot.

domain

Returns the domain of the parametric function.

expression

Returns the expression of the parametric function.

expression_x

Returns the x expression of the parametric function.

expression_y

Returns the y expression of the parametric function.

max_depth

Returns the maximum depth of the plot.

min_depth

Returns the minimum depth of the plot.

threshold

Returns the threshold of the plot.

vector_object_builder

Gets a VectorObjectBuilder with the plot's points.

x_range

Returns the x-range of the plot.

y_range

Returns the y-range of the plot.

Methods

contains(point) → {boolean}

Checks if point is within the plot.

Parameters:
NameTypeDescription
pointPoint2D

The point to check.

Returns:

A boolean indicating if the point is within the plot.

Type: 
boolean

error(point1, point2) → {number}

Returns the error of both Point2Ds.

Parameters:
NameTypeDescription
point1Point2D

The first Point2D.

point2Point2D

The second Point2D.

Returns:

The error of both Point2Ds.

Type: 
number

evaluate(t) → {Point2D|undefined}

Evaluates the parametric function at a given value.

Parameters:
NameTypeDescription
tnumber

The value to evaluate the parametric function at.

Returns:

The evaluated point.

Type: 
Point2D | undefined

hash(min, max) → {number}

Cheap hash function for the plot. Reference: https://github.com/stevenpetryk/mafs/blob/85c954ee649bebe65963bc8e7ad5708797c394d6/src/display/Plot/PlotUtils.tsx#L26

Parameters:
NameTypeDescription
minnumber

The minimum value of the object to hash.

maxnumber

The maximum value of the object to hash.

Returns:

The hash of the plot.

Type: 
number

is_discontinuity(number) → {boolean}

Checks if a number is a discontinuity of the plot.

Parameters:
NameTypeDescription
numbernumber

The number to check.

Returns:

A boolean indicating if the number is a discontinuity of the plot.

Type: 
boolean