|
 |
Actually, you are right, I made a slight modification:
#local test = p0*pow(m,3) + p1*c*3*pow(m,2) + p2*3*pow(c,2)*m + p3*pow(c,3);
will give the correct vectors. I pulled mine out of a calculus textbook and
I didn't think to try to compress it. It was written in only two dimensions,
but it was easily adaptable. You are right about the slopes, the line from
c0 to c1 is tangential to the final drawn curve.
Thanks for pointing this out. Makes my life a bit easier since I'm abusing
this trick a lot recently
Daniel Pirch wrote:
> Josh English <eng### [at] spiritone com> wrote in message
> news:381### [at] spiritone com...
> > #local cx = c0.x*pow(m,3) + c1.x*c*pow(m,2) + c2.x*pow(c,2)*m +
> > c3.x*pow(c,3);
> > #local cy = c0.y*pow(m,3) + c1.y*c*pow(m,2) + c2.y*pow(c,2)*m +
> > c3.y*pow(c,3);
> > #local cz = c0.z*pow(m,3) + c1.z*c*pow(m,2) + c2.z*pow(c,2)*m +
> > c3.z*pow(c,3);
>
> I didn't try it, but wouldn't it also be possible to use the vectors
> directly, like:
>
> #local c = c0*pow(m,3) + c1*3*c*pow(m,2) + c2*3*pow(c,2)*m + c3*pow(c,3)
> camera {location c ...}
>
> AFAIK the slope at the beginning of the spline (at c0) is the same as the
> slope of a line between the first two vectors (c0 and c1).
>
> --
> Daniel Pirch
> dpi### [at] gmx net
--
Josh English
eng### [at] spiritone com
icq 1946299
"Stress is when you wake up screaming and realize you haven't fallen asleep
yet."
Post a reply to this message
|
 |