# [chuck-users] spline envelopes

Robert Poor rdpoor at gmail.com
Tue Aug 11 18:42:51 EDT 2009

```You can create N-th order polynomial curves (including splines, of

F'rinstance,
while (true) { k +=> a[0]; <<< a[0] >>>; }
... clearly generates a ramp, and:
while (true) { k +=> a[1]; a[1] +=> a[0]; <<< a[0] >>>; }
... generates a parabola and:
while (true) { k +=> a[2]; a[2] +=> a[1]; a[1] +=> a[0]; <<< a[0]
>>>; }
... generates a cubic.  Etc.

And it's equally clear that you can do all this at the UG level.  The
part left as an exercise for the reader is computing the initial
values of a[n].  (This is the kind of stuff that Tom Duff has
hardwired in his neocortex -- I have to re-derive it each time.)

Best,

- Rob

On 11 Aug 2009, at 15:24, Bozelos Dimitris wrote:

> Hello,
>
> has anybody implemented in ChucK or elsewhere else envelopes with
> the use of bezier or other spline curves? Linear is can be boring
> sometimes! Any efficient algorithm? I was thinking of trying De
> Casteljau algorithm but I would like to hear from anybody else that
> has already done something similar.
>
> Cheers,
>
> Dimitris
>
> Χρησιμοποιείτε Yahoo!
> Βαρεθήκατε τα ενοχλητικά μηνύ ματα
> (spam); Το Yahoo! Mail διαθέτει την καλύτερη
> δυνατή προστασία κατά των
> ενοχλητικών μηνυμάτων