Giving a point on a uniform bspline curve, how to get the tangent vector of this point
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
A bspline curve of order $k$ is given by
$$C(t) = sum_i=0^n P_i N_i,k(t).$$
where $P_i$ are the control points and $N_i,k(t)$ a basis function defined on a knot vector
$$T = (t_0,t_1,...t_n+k).$$
with
$$N_i,1(t) = begincases1 & t_i le t lt t_i+1 \ 0 & textotherwise endcases$$
$$N_i,k(t) = fract-t_it_i+k-1-t_iN_i,k-1(t)+fract_i+k-tt_i+k-t_i+1N_i+1,k-1(t).$$
And it's derivative is
$$N_i,k' = frackt_i+k-t_iN_i,k-1(t) + frackt_i+k-1-t_i+1N_i+1,k-1(t) $$
Now with a given t, I can calculate the tangent vector of this given t, but what I want here is that giving a point on the bspline curve, how can I get the tangent vector of this point, or get the t value of this point?
Update:
I have found a way to find the t value of the target point with the Newton iteration method from The Nurbs Book.
The iteration function is:
$$ f(t) = C'(t)(C(t) - P)$$
$$ t_i+1 = t_i - fracf(t_i)f'(t_i) = t_i - fracC'(t)(C(t)-P)C''(t)(C(t)-P) + $$
The convergence criterion are:
$$ |(t_i+1 - t_i)C'(t_i)| <= varepsilon_1 $$
$$ |C(t_i) - P| <= varepsilon_1 $$
$$ |cos<C'(t), (C(t)-P)>| <= varepsilon_2 $$
I have implemented this method, but sometimes it works well but sometimes it will never converge, because I use the fixed initial $t_0$.
So the problem here is how to find a good initial $t_0$. Anyone can help me about this? Thanks.
derivatives differential-geometry spline
add a comment |Â
up vote
2
down vote
favorite
A bspline curve of order $k$ is given by
$$C(t) = sum_i=0^n P_i N_i,k(t).$$
where $P_i$ are the control points and $N_i,k(t)$ a basis function defined on a knot vector
$$T = (t_0,t_1,...t_n+k).$$
with
$$N_i,1(t) = begincases1 & t_i le t lt t_i+1 \ 0 & textotherwise endcases$$
$$N_i,k(t) = fract-t_it_i+k-1-t_iN_i,k-1(t)+fract_i+k-tt_i+k-t_i+1N_i+1,k-1(t).$$
And it's derivative is
$$N_i,k' = frackt_i+k-t_iN_i,k-1(t) + frackt_i+k-1-t_i+1N_i+1,k-1(t) $$
Now with a given t, I can calculate the tangent vector of this given t, but what I want here is that giving a point on the bspline curve, how can I get the tangent vector of this point, or get the t value of this point?
Update:
I have found a way to find the t value of the target point with the Newton iteration method from The Nurbs Book.
The iteration function is:
$$ f(t) = C'(t)(C(t) - P)$$
$$ t_i+1 = t_i - fracf(t_i)f'(t_i) = t_i - fracC'(t)(C(t)-P)C''(t)(C(t)-P) + $$
The convergence criterion are:
$$ |(t_i+1 - t_i)C'(t_i)| <= varepsilon_1 $$
$$ |C(t_i) - P| <= varepsilon_1 $$
$$ |cos<C'(t), (C(t)-P)>| <= varepsilon_2 $$
I have implemented this method, but sometimes it works well but sometimes it will never converge, because I use the fixed initial $t_0$.
So the problem here is how to find a good initial $t_0$. Anyone can help me about this? Thanks.
derivatives differential-geometry spline
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
A bspline curve of order $k$ is given by
$$C(t) = sum_i=0^n P_i N_i,k(t).$$
where $P_i$ are the control points and $N_i,k(t)$ a basis function defined on a knot vector
$$T = (t_0,t_1,...t_n+k).$$
with
$$N_i,1(t) = begincases1 & t_i le t lt t_i+1 \ 0 & textotherwise endcases$$
$$N_i,k(t) = fract-t_it_i+k-1-t_iN_i,k-1(t)+fract_i+k-tt_i+k-t_i+1N_i+1,k-1(t).$$
And it's derivative is
$$N_i,k' = frackt_i+k-t_iN_i,k-1(t) + frackt_i+k-1-t_i+1N_i+1,k-1(t) $$
Now with a given t, I can calculate the tangent vector of this given t, but what I want here is that giving a point on the bspline curve, how can I get the tangent vector of this point, or get the t value of this point?
Update:
I have found a way to find the t value of the target point with the Newton iteration method from The Nurbs Book.
The iteration function is:
$$ f(t) = C'(t)(C(t) - P)$$
$$ t_i+1 = t_i - fracf(t_i)f'(t_i) = t_i - fracC'(t)(C(t)-P)C''(t)(C(t)-P) + $$
The convergence criterion are:
$$ |(t_i+1 - t_i)C'(t_i)| <= varepsilon_1 $$
$$ |C(t_i) - P| <= varepsilon_1 $$
$$ |cos<C'(t), (C(t)-P)>| <= varepsilon_2 $$
I have implemented this method, but sometimes it works well but sometimes it will never converge, because I use the fixed initial $t_0$.
So the problem here is how to find a good initial $t_0$. Anyone can help me about this? Thanks.
derivatives differential-geometry spline
A bspline curve of order $k$ is given by
$$C(t) = sum_i=0^n P_i N_i,k(t).$$
where $P_i$ are the control points and $N_i,k(t)$ a basis function defined on a knot vector
$$T = (t_0,t_1,...t_n+k).$$
with
$$N_i,1(t) = begincases1 & t_i le t lt t_i+1 \ 0 & textotherwise endcases$$
$$N_i,k(t) = fract-t_it_i+k-1-t_iN_i,k-1(t)+fract_i+k-tt_i+k-t_i+1N_i+1,k-1(t).$$
And it's derivative is
$$N_i,k' = frackt_i+k-t_iN_i,k-1(t) + frackt_i+k-1-t_i+1N_i+1,k-1(t) $$
Now with a given t, I can calculate the tangent vector of this given t, but what I want here is that giving a point on the bspline curve, how can I get the tangent vector of this point, or get the t value of this point?
Update:
I have found a way to find the t value of the target point with the Newton iteration method from The Nurbs Book.
The iteration function is:
$$ f(t) = C'(t)(C(t) - P)$$
$$ t_i+1 = t_i - fracf(t_i)f'(t_i) = t_i - fracC'(t)(C(t)-P)C''(t)(C(t)-P) + $$
The convergence criterion are:
$$ |(t_i+1 - t_i)C'(t_i)| <= varepsilon_1 $$
$$ |C(t_i) - P| <= varepsilon_1 $$
$$ |cos<C'(t), (C(t)-P)>| <= varepsilon_2 $$
I have implemented this method, but sometimes it works well but sometimes it will never converge, because I use the fixed initial $t_0$.
So the problem here is how to find a good initial $t_0$. Anyone can help me about this? Thanks.
derivatives differential-geometry spline
edited Aug 30 at 3:20
asked Aug 26 at 13:05
Phymin
358
358
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2895020%2fgiving-a-point-on-a-uniform-bspline-curve-how-to-get-the-tangent-vector-of-this%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password