INTERFACE PZSmooth; IMPORT PZLRChain, PZLR3Chain; TYPE LONG = LONGREAL; PROCEDURE Polygonal( sigma: LONG; READONLY p: PZLR3Chain.T; READONLY t: PZLRChain.T; tPeriod: LONG; tStart: LONG; VAR u: PZLR3Chain.T; VAR v: PZLR3Chain.T; VAR w: PZLR3Chain.T; ); (* Compute a smoothed version closed polygonal curve "p[0..n]" by convolving it with the unit-area Gaussian 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 with constant velocity between consecutive vertices. The smoothed curve is sampled at "m" times, equally spaced between "tStart" and "tStart + tPeriod", resulting in points "u[0..m-1]" (where "m=NUMBER(u)"). The smoothed curve's velocity and acceleration at those points is stored in "v[0..m-1]" and "w[0..m-1]". *) END PZSmooth.