|
DYNAMICS C API
C-compatible interface to the DYNAMICS library
|
Functions | |
| void | c_plane_normal (const c_plane *pln, double nrm[3]) |
| Extract a plane normal. | |
| void | c_plane_from_3_points (const double pt1[3], const double pt2[3], const double pt3[3], c_plane *pln) |
| Construct a plane through three points. | |
| void | c_plane_from_point_and_normal (const double pt[3], const double nrm[3], c_plane *pln) |
| Construct a plane from a point and normal. | |
| void | c_plane_from_points (int n, const double *pts, int ldp, c_plane *pln) |
| Fit a plane to point data. | |
| void | c_flip_plane_normal (c_plane *pln) |
| Reverse a plane normal and its equation. | |
| void | c_line_from_2_points (const double pt1[3], const double pt2[3], c_line *ln) |
| Construct a line through two points. | |
| void | c_line_from_2_planes (const c_plane *p1, const c_plane *p2, c_line *ln) |
| Construct the intersection line of two planes. | |
| void | c_line_from_points (int n, const double *pts, int ldp, c_line *ln) |
| Fit a line to point data. | |
| void | c_evaluate_line_position (const c_line *ln, double t, double x[3]) |
| Evaluate a point on a line. | |
| bool | c_is_parallel_vectors (int n, const double *x, const double *y, double tol) |
| Test whether two vectors are parallel within a tolerance. | |
| bool | c_is_parallel_lines (const c_line *x, const c_line *y, double tol) |
| Test whether two lines are parallel. | |
| bool | c_is_parallel_planes (const c_plane *x, const c_plane *y, double tol) |
| Test whether two planes are parallel. | |
| bool | c_is_point_on_plane (const double pt[3], const c_plane *pln, double tol) |
| Test whether a point lies on a plane. | |
| bool | c_is_point_on_line (const double pt[3], const c_line *ln, double tol) |
| Test whether a point lies on a line. | |
| double | c_nearest_point_on_line (const double pt[3], const c_line *ln) |
| Find the parameter of the nearest point on a line. | |
| double | c_point_to_line_distance (const double pt[3], const c_line *ln) |
| Compute the distance from a point to a line. | |
| double | c_point_to_plane_distance (const double pt[3], const c_plane *pln) |
| Compute the distance from a point to a plane. | |
| void | c_vector_plane_projection (const double x[3], const c_plane *pln, double px[3]) |
| Project a vector onto a plane. | |
| void | c_point_plane_projection (const double pt[3], const c_plane *pln, double ppt[3]) |
| Project a point onto a plane. | |
| void | c_plucker_line_from_2_points (const double pt1[3], const double pt2[3], c_plucker_line *ln) |
| Construct a Pluecker line through two points. | |
| void | c_plucker_line_from_line (const c_line *src, c_plucker_line *ln) |
| Convert a line to Pluecker coordinates. | |
| void | c_plucker_line_from_2_planes (const c_plane *p1, const c_plane *p2, c_plucker_line *ln) |
| Construct a Pluecker line from two planes. | |
| void | c_plucker_line_from_array (const double x[6], c_plucker_line *ln) |
| Construct a Pluecker line from six coordinates. | |
| void | c_plucker_line_mtx_mult (int n, const double *x, int ldx, const c_plucker_line *ln, double *y) |
| Apply a matrix to a Pluecker line. | |
| void | c_plucker_line_to_array (const c_plucker_line *ln, double x[6]) |
| Convert a Pluecker line to six coordinates. | |
| void | c_line_common_normal (const c_line *ln1, const c_line *ln2, c_line *ln) |
| Compute the common normal of two lines. | |
| void | c_do_lines_intersect (const c_line *ln1, const c_line *ln2, bool *intersect, double *t1, double *t2, double tol) |
| Determine whether two lines intersect and return their parameters. | |
| void | c_line_from_point_and_vector (const double pt[3], const double v[3], c_line *ln) |
| Construct a line from a point and direction. | |
| void | c_poincare_map (int n, const double *x, const double *y, const double *z, const c_plane *pln, int side, int nbuffer, double *xbuffer, double *ybuffer, double *zbuffer, int *nactual) |
| Compute a Poincare section map from sampled trajectories. | |
| void | c_poincare_map_ode (c_ode_equations fcn, const double tspan[2], int n, const double *iv, int sample_count, const c_plane *pln, int side, int solver, c_poincare_coordinates coordinates, int nbuffer, double *xbuffer, double *ybuffer, double *zbuffer, int *nactual, void *user_data) |
| Compute a Poincare section map by integrating an ODE and intersecting uniformly spaced solution samples with a plane. | |
| void c_plane_normal | ( | const c_plane * | pln, |
| double | nrm[3] | ||
| ) |
Extract a plane normal.
| pln | Plane. |
| nrm | Output normal vector. |
| void c_plane_from_3_points | ( | const double | pt1[3], |
| const double | pt2[3], | ||
| const double | pt3[3], | ||
| c_plane * | pln | ||
| ) |
Construct a plane through three points.
| pt1 | First point. |
| pt2 | Second point. |
| pt3 | Third point. |
| pln | Output plane. |
| void c_plane_from_point_and_normal | ( | const double | pt[3], |
| const double | nrm[3], | ||
| c_plane * | pln | ||
| ) |
Construct a plane from a point and normal.
| pt | Point on plane. |
| nrm | Plane normal. |
| pln | Output plane. |
| void c_plane_from_points | ( | int | n, |
| const double * | pts, | ||
| int | ldp, | ||
| c_plane * | pln | ||
| ) |
Fit a plane to point data.
| n | Point count. |
| pts | Point matrix. |
| ldp | Leading dimension of pts. |
| pln | Output plane. |
| void c_flip_plane_normal | ( | c_plane * | pln | ) |
Reverse a plane normal and its equation.
| pln | Plane updated in place. |
| void c_line_from_2_points | ( | const double | pt1[3], |
| const double | pt2[3], | ||
| c_line * | ln | ||
| ) |
Construct a line through two points.
| pt1 | First point. |
| pt2 | Second point. |
| ln | Output line. |
Construct the intersection line of two planes.
| p1 | First plane. |
| p2 | Second plane. |
| ln | Output line. |
| void c_line_from_points | ( | int | n, |
| const double * | pts, | ||
| int | ldp, | ||
| c_line * | ln | ||
| ) |
Fit a line to point data.
| n | Point count. |
| pts | Point matrix. |
| ldp | Leading dimension of pts. |
| ln | Output line. |
| void c_evaluate_line_position | ( | const c_line * | ln, |
| double | t, | ||
| double | x[3] | ||
| ) |
Evaluate a point on a line.
| ln | Line. |
| t | Line parameter. |
| x | Output position. |
| bool c_is_parallel_vectors | ( | int | n, |
| const double * | x, | ||
| const double * | y, | ||
| double | tol | ||
| ) |
Test whether two vectors are parallel within a tolerance.
| n | Vector length. |
| x | First vector. |
| y | Second vector. |
| tol | Angular or residual tolerance. |
Test whether two lines are parallel.
| x | First line. |
| y | Second line. |
| tol | Tolerance. |
Test whether two planes are parallel.
| x | First plane. |
| y | Second plane. |
| tol | Tolerance. |
| bool c_is_point_on_plane | ( | const double | pt[3], |
| const c_plane * | pln, | ||
| double | tol | ||
| ) |
Test whether a point lies on a plane.
| pt | Point. |
| pln | Plane. |
| tol | Tolerance. |
| bool c_is_point_on_line | ( | const double | pt[3], |
| const c_line * | ln, | ||
| double | tol | ||
| ) |
Test whether a point lies on a line.
| pt | Point. |
| ln | Line. |
| tol | Tolerance. |
| double c_nearest_point_on_line | ( | const double | pt[3], |
| const c_line * | ln | ||
| ) |
Find the parameter of the nearest point on a line.
| pt | Point. |
| ln | Line. |
| double c_point_to_line_distance | ( | const double | pt[3], |
| const c_line * | ln | ||
| ) |
Compute the distance from a point to a line.
| pt | Point. |
| ln | Line. |
| double c_point_to_plane_distance | ( | const double | pt[3], |
| const c_plane * | pln | ||
| ) |
Compute the distance from a point to a plane.
| pt | Point. |
| pln | Plane. |
| void c_vector_plane_projection | ( | const double | x[3], |
| const c_plane * | pln, | ||
| double | px[3] | ||
| ) |
Project a vector onto a plane.
| x | Input vector. |
| pln | Plane. |
| px | Output projection. |
| void c_point_plane_projection | ( | const double | pt[3], |
| const c_plane * | pln, | ||
| double | ppt[3] | ||
| ) |
Project a point onto a plane.
| pt | Input point. |
| pln | Plane. |
| ppt | Output projected point. |
| void c_plucker_line_from_2_points | ( | const double | pt1[3], |
| const double | pt2[3], | ||
| c_plucker_line * | ln | ||
| ) |
Construct a Pluecker line through two points.
| pt1 | First point. |
| pt2 | Second point. |
| ln | Output Pluecker line. |
| void c_plucker_line_from_line | ( | const c_line * | src, |
| c_plucker_line * | ln | ||
| ) |
Convert a line to Pluecker coordinates.
| src | Input line. |
| ln | Output Pluecker line. |
| void c_plucker_line_from_2_planes | ( | const c_plane * | p1, |
| const c_plane * | p2, | ||
| c_plucker_line * | ln | ||
| ) |
Construct a Pluecker line from two planes.
| p1 | First plane. |
| p2 | Second plane. |
| ln | Output line. |
| void c_plucker_line_from_array | ( | const double | x[6], |
| c_plucker_line * | ln | ||
| ) |
Construct a Pluecker line from six coordinates.
| x | Six coordinates. |
| ln | Output line. |
| void c_plucker_line_mtx_mult | ( | int | n, |
| const double * | x, | ||
| int | ldx, | ||
| const c_plucker_line * | ln, | ||
| double * | y | ||
| ) |
Apply a matrix to a Pluecker line.
| n | Matrix row count. |
| x | Matrix. |
| ldx | Leading dimension of x. |
| ln | Pluecker line. |
| y | Output vector. |
| void c_plucker_line_to_array | ( | const c_plucker_line * | ln, |
| double | x[6] | ||
| ) |
Convert a Pluecker line to six coordinates.
| ln | Input line. |
| x | Output coordinates. |
Compute the common normal of two lines.
| ln1 | First line. |
| ln2 | Second line. |
| ln | Output common normal. |
| void c_do_lines_intersect | ( | const c_line * | ln1, |
| const c_line * | ln2, | ||
| bool * | intersect, | ||
| double * | t1, | ||
| double * | t2, | ||
| double | tol | ||
| ) |
Determine whether two lines intersect and return their parameters.
| ln1 | First line. |
| ln2 | Second line. |
| intersect | Output intersection flag. |
| t1 | Output parameter on ln1. |
| t2 | Output parameter on ln2. |
| tol | Tolerance. |
| void c_line_from_point_and_vector | ( | const double | pt[3], |
| const double | v[3], | ||
| c_line * | ln | ||
| ) |
Construct a line from a point and direction.
| pt | Point. |
| v | Direction vector. |
| ln | Output line. |
| void c_poincare_map | ( | int | n, |
| const double * | x, | ||
| const double * | y, | ||
| const double * | z, | ||
| const c_plane * | pln, | ||
| int | side, | ||
| int | nbuffer, | ||
| double * | xbuffer, | ||
| double * | ybuffer, | ||
| double * | zbuffer, | ||
| int * | nactual | ||
| ) |
Compute a Poincare section map from sampled trajectories.
| n | Sample count. |
| x | X samples. |
| y | Y samples. |
| z | Z samples. |
| pln | Section plane. |
| side | Section orientation selector. |
| nbuffer | Buffer capacity. |
| xbuffer | Output section x values. |
| ybuffer | Output section y values. |
| zbuffer | Output section z values. |
| nactual | Output number of intersections. |
| void c_poincare_map_ode | ( | c_ode_equations | fcn, |
| const double | tspan[2], | ||
| int | n, | ||
| const double * | iv, | ||
| int | sample_count, | ||
| const c_plane * | pln, | ||
| int | side, | ||
| int | solver, | ||
| c_poincare_coordinates | coordinates, | ||
| int | nbuffer, | ||
| double * | xbuffer, | ||
| double * | ybuffer, | ||
| double * | zbuffer, | ||
| int * | nactual, | ||
| void * | user_data | ||
| ) |
Compute a Poincare section map by integrating an ODE and intersecting uniformly spaced solution samples with a plane.
The coordinate callback is held per thread for the duration of the call, so this routine must not be re-entered from within its own callbacks.
| fcn | ODE callback. |
| tspan | Increasing start and end times. |
| n | State dimension. At least 3 if coordinates is NULL. |
| iv | n-element initial state at tspan[0]. |
| sample_count | Number of uniformly spaced samples across tspan, including both endpoints; at least 2. |
| pln | Section plane. |
| side | Section orientation selector. |
| solver | ODE integration method (e.g. DYN_RUNGE_KUTTA_45). |
| coordinates | Optional callback mapping each sample onto section coordinates; pass NULL to use the first three state components. |
| nbuffer | Buffer capacity. |
| xbuffer | Output section x values. |
| ybuffer | Output section y values. |
| zbuffer | Output section z values. |
| nactual | Output number of intersections stored, at most nbuffer. |
| user_data | Opaque caller data forwarded to fcn and coordinates. |