#ifndef pz_smooth_H #define pz_smooth_H /* Procedures for smoothing curves */ /* Last edited on 2015-01-20 16:50:03 by stolfilocal */ #include #include #include void pz_smooth_polygonal( double sigma, pz_r3_chain_t *p, pz_double_chain_t *t, double tPeriod, double tStart, pz_r3_chain_t *u, /* VAR v: pz_r3_chain_t; */ /* VAR w: pz_r3_chain_t; */ ) /* Compute a smoothed version of a closed polygonal curve "p[0..n]" by convolving it with the unit-area Gaussian with characteristic duration "sigma, i.e. "exp(-t^2/sigma^2)/(sigma*sqrt(Pi))". Assumes the input curve reaches "p[i]" at time "t[i]", gets back to "p[0]" at time "t[0] + tPeriod", and travels in straight uniform motion between consecutive vertices. The smoothed curve will be sampled at "m" equally spaced times (where "m==(u.ne)"), between "tStart" and "tStart + tPeriod", resulting in points "u[0..m-1]". The smoothed curve's velocity and acceleration at those points are stored in "v[0..m-1]" and "w[0..m-1]". */ #endif