POV-Ray : Newsgroups : povray.general : Nurbs ? : Re: Nurbs (Some math) Server Time
8 Aug 2024 04:06:38 EDT (-0400)
  Re: Nurbs (Some math)  
From: James Tonkin
Date: 2 Jul 2001 18:15:39
Message: <3b40f28b$1@news.povray.org>
Remco Poelstra  <rjp### [at] homenl> 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


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.