|
Thunderbots Project
|
#include <polynomial2d.h>
Public Member Functions | |
| Polynomial2d () | |
| Polynomial2d (Polynomial1d poly_x, Polynomial1d poly_y) | |
| Polynomial2d (const std::vector< Point > &points) | |
| Polynomial2d (std::initializer_list< Point > points) | |
| Point | getValueAt (double val) const |
| const Polynomial1d & | getPolyX () const |
| const Polynomial1d & | getPolyY () const |
A 2D polynomial, represented as two polynomials, x(t) and y(t)
| Polynomial2d | ( | ) |
Construct a 2D polynomial. This will construct the polynomial such that it always returns the point (0,0).
| Polynomial2d | ( | Polynomial1d | poly_x, |
| Polynomial1d | poly_y | ||
| ) |
Construct a 2d polynomial from two underlying 1d polynomials
Note that these polynomials do not necessarily need to be of the same order.
| poly_x | x(t), defines the x-coordinate of this 2D polynomial |
| poly_y | y(t), defines the y-coordinate of this 2D polynomial |
|
explicit |
Construct a 2d polynomial that passes through the given points
The created polynomial will be at the first point at t=0, and at the last point at t=1, with the other points linearly interpolated in-between; ie. if we had three points, the second point would be at t=0.5
| points | A series of points the created polynomial will pass through. There must be at least two points. |
| std::invalid_argument | If there are less then two points |
| Polynomial2d | ( | std::initializer_list< Point > | points | ) |
Construct a 2d polynomial that passes through the given points
The created polynomial will be at the first point at t=0, and at the last point at t=1, with the other points linearly interpolated in-between; ie. if we had three points, the second point would be at t=0.5
| points | A series of points the created polynomial will pass through. There must be at least two points. |
| std::invalid_argument | If there are less then two points |
| const Polynomial1d & getPolyX | ( | ) | const |
Get the polynomial x(t) underlying this 2d Polynomial
| const Polynomial1d & getPolyY | ( | ) | const |
Get the polynomial y(t) underlying this 2d Polynomial
| Point getValueAt | ( | double | val | ) | const |
Calculates the value of polynomial evaluated at value val
| val | value to evaluate polynomial |