INTERFACE PZSmooth; (* Porcedures for smoothing curves *) (* Last edited on 1999-08-15 08:56:34 by hcgl *) IMPORT PZLRChain, PZLR3Chain; FROM PZTypes IMPORT LONG; 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 in straight uniform motion between consecutive vertices. The smoothed curve is sampled at "m" equally spaced times (where "m=NUMBER(u)"), 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]". *) *) END PZSmooth. (* Copyright © 2001 Universidade Estadual de Campinas (UNICAMP). Authors: Helena C. G. Leitão and Jorge Stolfi. This file can be freely distributed, used, and modified, provided that this copyright and authorship notice is preserved, and that any modified versions are clearly marked as such. This software has NO WARRANTY of correctness or applicability for any purpose. Neither the authors nor their employers chall be held responsible for any losses or damages that may result from its use. *)