|
![](/i/fill.gif) |
In article <3b40f28b$1@news.povray.org>, James Tonkin says...
> Remco Poelstra <rjp### [at] home nl> wrote:
> >James Tonkin wrote:
>
> [a bunch of stuff about the math behind bicubic patches]
>
> >Could you please tell me what separation of a formule is? i.e., how do
> >you get the blending functions from ( t*(1-t))^3?
>
> Well, it would help if I had of put the correct formula down in the first
> place... sorry bout that. Here's the full derivation
>
> (t + (1-t) ) ^3
>
> = (t + (1-t)) * (t + (1-t)) * (t + (1-t))
>
> = [ t*t + t*(1-t) + (1-t)*t + (1-t)*(1-t)] * [ t + (1-t)]
>
> = [ t^2 + 2 * t * (1-t) + (1-t)^2] * [t + (1-t)]
>
> = ( t^2 * t) + (2 * t * (1-t) * t) + ( (1-t)^2 * t) + (t^2 * (1-t))
> + (2 * t * (1-t) * (1-t) ) + ( (1-t)^2 * (1-t))
>
> = t^3 + ( 2 * t^2 * (1-t) ) + (t * (1-t)^2) + (t^2 * (1-t))
> + ( 2 * t * (1-t)^2) + (1-t)^3
>
> = t^3 + (3 * t^2 * (1-t)) + (3 * t * (1-t)^2) + (1-t)^3
>
> So the 4 terms in the last line correspond to the 4 blending functions.
>
> Hope that helps,
> Jamie
>
Not to criticize the way you calculate the result, starting from
(t + (1-t) ) ^3, but in school we went from (a+b)^3 straight to
a^3 + 3*a^2*b + 3*a*b^2 + b^3.... :)
--
Regards, Sander
Post a reply to this message
|
![](/i/fill.gif) |