Understanding B-spline Intervals: Solving for Control Points and Knots

  • Thread starter Thread starter basty
  • Start date Start date
basty
Messages
94
Reaction score
0
Moved from a technical math section
Hi all,

The control points are five and they are:

b0 = (0,0)
b1 = (1,3)
b2 = (3,0)
b3 = (4,3)
b4 = (6,0)

The degree d is 2.

The number of knots t are 8 and they are:

t0 = 0
t1 = 1
t2 = 2
t3 = 3
t4 = 4
t5 = 5
t6 = 6
t7 = 7

What is the next step to solve this b-spline?

Thank you
 
Physics news on Phys.org
It's not clear what you mean when you say, "What is the next step to solve this b-spline?"
 
You should see the theory to understand what I'm asking about:

B_spline.png
 
Looks to me like that's a lot of algebra to crank thru.
 
Step 1: define your ##N_{i,0}## basis functions.
Step 2: define your ##N_{i,1}## basis functions in terms of your ##N_{i,0}## basis functions.
Step 3: define your ##N_{i,2}## basis functions in terms of your ##N_{i,1}## basis functions.
Step 4: sum them up to make your ##\mathbf{B}## spline.
If you are comfortable with linear algebra, this looks like something a computer would do a lot faster.
 
What I suppose to do with the below equation (the example 8.3)?

##N_{0,1}(t) = \frac{t-t_{0}}{t_{1}-t_{0}}N_{0,0}(t)+\frac{t_{2}-t}{t_{2}-t_{1}}N_{1,0}(t)##
##= \frac{t-2}{4-2}N_{0,0}(t)+\frac{5-t}{5-4}N_{1,0}(t)##
##= \frac{t-2}{2}N_{0,0}(t)+\frac{5-t}{1}N_{1,0}(t)##
##= \frac{t-2}{2}N_{0,0}(t)+(5-t)N_{1,0}(t)##

I can't multiply them because of the ##N_{0,0}(t)## and ##N_{1,0}(t)##.

What is the value of the ##N_{0,0}(t)## and ##N_{1,0}(t)##?

For example, if the value of the ##N_{0,0}(t)## and ##N_{1,0}(t)## is 3 and 4 respectively, then the equation will be:

##\frac{t-2}{2}N_{0,0}(t)+(5-t)N_{1,0}(t)##
##= (\frac{t-2}{2})3+(5-t)4##
##= \frac{3t-6}{2}+(20-4t)##

btw, honestly, this is not a homework.
 
First, define all your ##N_{i,0}## functions. Notice that these are only non-zero over the single unit ##[t_i,t_{i+1}]## and on that unit they are 1.
Then, define your ##N_{i,1}## functions.
For example, ##N_{0,1} =\frac{t-0}{1-0}N_{0,0}+\frac{2-t}{2-1}N_{1,0}=t \text{ on }[0,1), = 2-t \text{ on }[1,2)##.
Notice that these are continuous linear functions interpolating your points.
Also, ##N_{1,1} =\frac{t-1}{2-1}N_{1,0}+\frac{3-t}{3-2}N_{2,0}=t-1 \text{ on }[1,2), = 3-t \text{ on }[2,3)##.
Moving on the the ##N_{i,2} ## quadratic basis functions, you have:
##N_{0,2} =\frac{t-0}{2-0}N_{0,1}+\frac{3-t}{3-1}N_{1,1}=\frac{t^2}{2} \text{ on }[0,1), = \frac{2t-t^2}{2}+\frac{(3-t)^2}{2} \text{ on }[1,2)##.
If you are doing this with a computer, it should be much faster than doing it by hand.
Just pay attention to where the functions are non-zero and sum the pieces appropriately.
 
Why ##\frac{1}{6}(7-t)^2(1,2)+\frac{1}{3}(-t^2+12t-34)(3,5)+\frac{1}{6}(t-5)^2(6,2)## on ##5≤t<7##?

Why not

##5<t≤7##

or

##5≤t≤7##

or

##2≤t≤4##

or

##?≤t≤?##

and so on?

spl.png
 
All the functions should be equal at the nodes, so it is just a matter of only defining each point once. Though for implementation it doesn't impact the method.
 
  • #10
RUber said:
All the functions should be equal at the nodes, so it is just a matter of only defining each point once. Though for implementation it doesn't impact the method.

I am sorry but I still do not understand. Please use a basic english which is easy to understand as english is not my native language.

Why chose 5 <= t < 7 and 7 <= t < 8 (see the image below) for the final step?

proxy.php?image=http%3A%2F%2Fs29.postimg.org%2Fikdekeok7%2Fspl.png
 
  • #11
It does not matter. Both should be equal at t=7.
 
  • #12
RUber said:
It does not matter.

What is does not matter?

RUber said:
Both should be equal at t=7.

Why?
 
  • #13
Does not matter means the result will be te same either way.
A spline is designed to be a continuous function. If they were different at t=7, it would not be continuous.
In any case, if you find it easier to define the point by the right function rather than the left, there should be no problems.
 
  • #14
Why the final answer is 5 <= t < 7 and 7 <= t <= 8?
 
  • #15
Reading definition 8.2 in the material posted above, it says that the final answer will be defined from ##t_d## to ##t_{n-d}##.
Since in this example (8.3), d=2, your interval for the spline will be from ##t_2## to ##t_{6-2}##, which covers the points 5, 7, and 8.
Was this the heart of your misunderstanding?
 

Similar threads

Back
Top