how to calculate the value of “t” for the highest point in a quadratic bezier curve?
up vote
0
down vote
favorite
I need to find a the value of t exactly at the point where the curve stops going up an start going down, But I have no idea how to get this value I have the 3 control points values, the blue dot on the left is the control point 1, the big red dot is the control point 2 and the blue dot on the right is the control point 3...
control points view
the black dot is the control point for t = 0.5
and the difference in t for each colored dot is 0.1
is the first image it's possible to notice that the highest point are exactly or very close to the yellow dot or in other words t = 0.4, in the center image the black dot is on the top (t = 0.5) and the last image the top is very close to the cyan dot (t = 0.6)...
to find the position for each of these colored dots I'm using the formula..
curvePoint = A *(1-t)^2 + B * 2t(1-t) + C * t^2
where A = center of the first blue dot, B = center of the big red dot, C = last blue dot and and t goes from 0 to 1 in increments of 0.1...
my question is, how to find out t mathematically? when I drag the big red dot the curve follows the control point but I have no idea what's the t value for the highest point in the given configuration...
Is there any formula to find this value?
I hope I was able to make myself clear
thank you in advance for the answers!
curves bezier-curve
add a comment |
up vote
0
down vote
favorite
I need to find a the value of t exactly at the point where the curve stops going up an start going down, But I have no idea how to get this value I have the 3 control points values, the blue dot on the left is the control point 1, the big red dot is the control point 2 and the blue dot on the right is the control point 3...
control points view
the black dot is the control point for t = 0.5
and the difference in t for each colored dot is 0.1
is the first image it's possible to notice that the highest point are exactly or very close to the yellow dot or in other words t = 0.4, in the center image the black dot is on the top (t = 0.5) and the last image the top is very close to the cyan dot (t = 0.6)...
to find the position for each of these colored dots I'm using the formula..
curvePoint = A *(1-t)^2 + B * 2t(1-t) + C * t^2
where A = center of the first blue dot, B = center of the big red dot, C = last blue dot and and t goes from 0 to 1 in increments of 0.1...
my question is, how to find out t mathematically? when I drag the big red dot the curve follows the control point but I have no idea what's the t value for the highest point in the given configuration...
Is there any formula to find this value?
I hope I was able to make myself clear
thank you in advance for the answers!
curves bezier-curve
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I need to find a the value of t exactly at the point where the curve stops going up an start going down, But I have no idea how to get this value I have the 3 control points values, the blue dot on the left is the control point 1, the big red dot is the control point 2 and the blue dot on the right is the control point 3...
control points view
the black dot is the control point for t = 0.5
and the difference in t for each colored dot is 0.1
is the first image it's possible to notice that the highest point are exactly or very close to the yellow dot or in other words t = 0.4, in the center image the black dot is on the top (t = 0.5) and the last image the top is very close to the cyan dot (t = 0.6)...
to find the position for each of these colored dots I'm using the formula..
curvePoint = A *(1-t)^2 + B * 2t(1-t) + C * t^2
where A = center of the first blue dot, B = center of the big red dot, C = last blue dot and and t goes from 0 to 1 in increments of 0.1...
my question is, how to find out t mathematically? when I drag the big red dot the curve follows the control point but I have no idea what's the t value for the highest point in the given configuration...
Is there any formula to find this value?
I hope I was able to make myself clear
thank you in advance for the answers!
curves bezier-curve
I need to find a the value of t exactly at the point where the curve stops going up an start going down, But I have no idea how to get this value I have the 3 control points values, the blue dot on the left is the control point 1, the big red dot is the control point 2 and the blue dot on the right is the control point 3...
control points view
the black dot is the control point for t = 0.5
and the difference in t for each colored dot is 0.1
is the first image it's possible to notice that the highest point are exactly or very close to the yellow dot or in other words t = 0.4, in the center image the black dot is on the top (t = 0.5) and the last image the top is very close to the cyan dot (t = 0.6)...
to find the position for each of these colored dots I'm using the formula..
curvePoint = A *(1-t)^2 + B * 2t(1-t) + C * t^2
where A = center of the first blue dot, B = center of the big red dot, C = last blue dot and and t goes from 0 to 1 in increments of 0.1...
my question is, how to find out t mathematically? when I drag the big red dot the curve follows the control point but I have no idea what's the t value for the highest point in the given configuration...
Is there any formula to find this value?
I hope I was able to make myself clear
thank you in advance for the answers!
curves bezier-curve
curves bezier-curve
asked Nov 19 at 16:12
Lucas
1
1
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Sure. Let's call the curve point $P$ rather than "curvePoint"; we then want to know for what value of $t$ the $y$-coordinate of $P$ is largest. The good news is that the $y$-coord of $P$ depends only on the y-coords of $A, B,$ and $C$:
$$
P_y(t) = A_y (1-t)^2 + B_y 2t (1-t) + C_y t^2
$$
The function $P_y$ is defined on the interval $0 le t le 1$, and the max might occur at an endpoint, so we compute, right away,
$$
P_0 = A_y (1-0)^2 + B_y 2cdot 0 (1-0) + C_y 0^2 = A_y\
P_1 = ldots = C_y
$$
Now as for the middle point, it must happen where the derivative with respect to $t$ is zero, i.e. where
$$
P_y'(t) = -2A_y (1-t) + 2B_y(1-t) + 2B_y t (-1) + 2C_y t = 0 \
P_y'(t) = -2(1-t) (A_y - B_y) + 2t(C_y - B_y) \
$$
which is a linear bezier curve with control points that are (proportional to) the difference of $A$ and $B$ and the difference of $B$ and $C$. (I mention this because you may find it useful later).
Setting to zero and simplifying to find the critical value of $t$, we can get rid of all the factors of 2 and combine terms to get
$$
newcommand{tstar}{{t_{*}}}
$$
begin{align}
-2 (A_y - B_y) +2tstar (A_y - B_y) + 2tstar(C_y - B_y) &= 0 \
-2 (A_y - B_y) +2tstar (A_y + C_y - 2B_y) &= 0 \
tstar (A_y + C_y - 2B_y) &= (A_y - B_y) \
tstar &= frac{A_y - B_y}{A_y + C_y - 2B_y }
end{align}
and we can use this value of $tstar$ to compute $P_2$, the height of the curve at the critical time $t$. We compare this to $P_0$ and $P_1$, and pick as our $t$-value either $0, 1,$ or $tstar$ accordingly.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Sure. Let's call the curve point $P$ rather than "curvePoint"; we then want to know for what value of $t$ the $y$-coordinate of $P$ is largest. The good news is that the $y$-coord of $P$ depends only on the y-coords of $A, B,$ and $C$:
$$
P_y(t) = A_y (1-t)^2 + B_y 2t (1-t) + C_y t^2
$$
The function $P_y$ is defined on the interval $0 le t le 1$, and the max might occur at an endpoint, so we compute, right away,
$$
P_0 = A_y (1-0)^2 + B_y 2cdot 0 (1-0) + C_y 0^2 = A_y\
P_1 = ldots = C_y
$$
Now as for the middle point, it must happen where the derivative with respect to $t$ is zero, i.e. where
$$
P_y'(t) = -2A_y (1-t) + 2B_y(1-t) + 2B_y t (-1) + 2C_y t = 0 \
P_y'(t) = -2(1-t) (A_y - B_y) + 2t(C_y - B_y) \
$$
which is a linear bezier curve with control points that are (proportional to) the difference of $A$ and $B$ and the difference of $B$ and $C$. (I mention this because you may find it useful later).
Setting to zero and simplifying to find the critical value of $t$, we can get rid of all the factors of 2 and combine terms to get
$$
newcommand{tstar}{{t_{*}}}
$$
begin{align}
-2 (A_y - B_y) +2tstar (A_y - B_y) + 2tstar(C_y - B_y) &= 0 \
-2 (A_y - B_y) +2tstar (A_y + C_y - 2B_y) &= 0 \
tstar (A_y + C_y - 2B_y) &= (A_y - B_y) \
tstar &= frac{A_y - B_y}{A_y + C_y - 2B_y }
end{align}
and we can use this value of $tstar$ to compute $P_2$, the height of the curve at the critical time $t$. We compare this to $P_0$ and $P_1$, and pick as our $t$-value either $0, 1,$ or $tstar$ accordingly.
add a comment |
up vote
0
down vote
Sure. Let's call the curve point $P$ rather than "curvePoint"; we then want to know for what value of $t$ the $y$-coordinate of $P$ is largest. The good news is that the $y$-coord of $P$ depends only on the y-coords of $A, B,$ and $C$:
$$
P_y(t) = A_y (1-t)^2 + B_y 2t (1-t) + C_y t^2
$$
The function $P_y$ is defined on the interval $0 le t le 1$, and the max might occur at an endpoint, so we compute, right away,
$$
P_0 = A_y (1-0)^2 + B_y 2cdot 0 (1-0) + C_y 0^2 = A_y\
P_1 = ldots = C_y
$$
Now as for the middle point, it must happen where the derivative with respect to $t$ is zero, i.e. where
$$
P_y'(t) = -2A_y (1-t) + 2B_y(1-t) + 2B_y t (-1) + 2C_y t = 0 \
P_y'(t) = -2(1-t) (A_y - B_y) + 2t(C_y - B_y) \
$$
which is a linear bezier curve with control points that are (proportional to) the difference of $A$ and $B$ and the difference of $B$ and $C$. (I mention this because you may find it useful later).
Setting to zero and simplifying to find the critical value of $t$, we can get rid of all the factors of 2 and combine terms to get
$$
newcommand{tstar}{{t_{*}}}
$$
begin{align}
-2 (A_y - B_y) +2tstar (A_y - B_y) + 2tstar(C_y - B_y) &= 0 \
-2 (A_y - B_y) +2tstar (A_y + C_y - 2B_y) &= 0 \
tstar (A_y + C_y - 2B_y) &= (A_y - B_y) \
tstar &= frac{A_y - B_y}{A_y + C_y - 2B_y }
end{align}
and we can use this value of $tstar$ to compute $P_2$, the height of the curve at the critical time $t$. We compare this to $P_0$ and $P_1$, and pick as our $t$-value either $0, 1,$ or $tstar$ accordingly.
add a comment |
up vote
0
down vote
up vote
0
down vote
Sure. Let's call the curve point $P$ rather than "curvePoint"; we then want to know for what value of $t$ the $y$-coordinate of $P$ is largest. The good news is that the $y$-coord of $P$ depends only on the y-coords of $A, B,$ and $C$:
$$
P_y(t) = A_y (1-t)^2 + B_y 2t (1-t) + C_y t^2
$$
The function $P_y$ is defined on the interval $0 le t le 1$, and the max might occur at an endpoint, so we compute, right away,
$$
P_0 = A_y (1-0)^2 + B_y 2cdot 0 (1-0) + C_y 0^2 = A_y\
P_1 = ldots = C_y
$$
Now as for the middle point, it must happen where the derivative with respect to $t$ is zero, i.e. where
$$
P_y'(t) = -2A_y (1-t) + 2B_y(1-t) + 2B_y t (-1) + 2C_y t = 0 \
P_y'(t) = -2(1-t) (A_y - B_y) + 2t(C_y - B_y) \
$$
which is a linear bezier curve with control points that are (proportional to) the difference of $A$ and $B$ and the difference of $B$ and $C$. (I mention this because you may find it useful later).
Setting to zero and simplifying to find the critical value of $t$, we can get rid of all the factors of 2 and combine terms to get
$$
newcommand{tstar}{{t_{*}}}
$$
begin{align}
-2 (A_y - B_y) +2tstar (A_y - B_y) + 2tstar(C_y - B_y) &= 0 \
-2 (A_y - B_y) +2tstar (A_y + C_y - 2B_y) &= 0 \
tstar (A_y + C_y - 2B_y) &= (A_y - B_y) \
tstar &= frac{A_y - B_y}{A_y + C_y - 2B_y }
end{align}
and we can use this value of $tstar$ to compute $P_2$, the height of the curve at the critical time $t$. We compare this to $P_0$ and $P_1$, and pick as our $t$-value either $0, 1,$ or $tstar$ accordingly.
Sure. Let's call the curve point $P$ rather than "curvePoint"; we then want to know for what value of $t$ the $y$-coordinate of $P$ is largest. The good news is that the $y$-coord of $P$ depends only on the y-coords of $A, B,$ and $C$:
$$
P_y(t) = A_y (1-t)^2 + B_y 2t (1-t) + C_y t^2
$$
The function $P_y$ is defined on the interval $0 le t le 1$, and the max might occur at an endpoint, so we compute, right away,
$$
P_0 = A_y (1-0)^2 + B_y 2cdot 0 (1-0) + C_y 0^2 = A_y\
P_1 = ldots = C_y
$$
Now as for the middle point, it must happen where the derivative with respect to $t$ is zero, i.e. where
$$
P_y'(t) = -2A_y (1-t) + 2B_y(1-t) + 2B_y t (-1) + 2C_y t = 0 \
P_y'(t) = -2(1-t) (A_y - B_y) + 2t(C_y - B_y) \
$$
which is a linear bezier curve with control points that are (proportional to) the difference of $A$ and $B$ and the difference of $B$ and $C$. (I mention this because you may find it useful later).
Setting to zero and simplifying to find the critical value of $t$, we can get rid of all the factors of 2 and combine terms to get
$$
newcommand{tstar}{{t_{*}}}
$$
begin{align}
-2 (A_y - B_y) +2tstar (A_y - B_y) + 2tstar(C_y - B_y) &= 0 \
-2 (A_y - B_y) +2tstar (A_y + C_y - 2B_y) &= 0 \
tstar (A_y + C_y - 2B_y) &= (A_y - B_y) \
tstar &= frac{A_y - B_y}{A_y + C_y - 2B_y }
end{align}
and we can use this value of $tstar$ to compute $P_2$, the height of the curve at the critical time $t$. We compare this to $P_0$ and $P_1$, and pick as our $t$-value either $0, 1,$ or $tstar$ accordingly.
edited Nov 20 at 0:31
answered Nov 19 at 16:29
John Hughes
61.7k24090
61.7k24090
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3005127%2fhow-to-calculate-the-value-of-t-for-the-highest-point-in-a-quadratic-bezier-cu%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown