project

abstract fun project(query: Vector2d, init: Double): Double

Projects a query position onto the trajectory's path using Newton's method.

Finds the parameter value where the trajectory's path is closest to the query point.

Return

The parameter value at the closest point on the trajectory to the query

Parameters

query

The 2D position to project onto the trajectory

init

Initial guess for the parameter value (default: 0.0)