How to form a bezier curve?

  • Thread starter null void
  • Start date
102
1
Sorry if i post this in the wrong spot. I am trying to form the curve of the half quadrant of a circle. And i wonder that how do we know which or where is our control point? For cubic bezier, the 2nd control point should be on the tangent line of the starting point and the 3rd control point should be on the tangent of the end point. But how do i know how far should i take?

And how to combine them together? Do the controls points position change?
 
Last edited:
102
1
I have read some of the tutorials and now i still don't understand how to merge or join 2 curves become 1 without its shape deviate so much? I have tried a simple test with 2 degree-3 bezier curve which if they connected properly, they would form a half circle.

lets say small curve a(t) is the curve from the second quadrant of the circle, b(t) is the first quadrant of a circle, And my c(t) is the combination of the a(t) and b(t), all of them are in degree-3. And how to satisfy all the conditions below

a(0) = c(0),
a(1) = b(0) = c(1/2),
b(1) = c(1),

a'(t = 0..1) = c'(t = 0..1/2),
b'(t = 0..1) = c'(t = 1/2..1),

a''(t = 0..1) = c''(t = 0..1/2),
b''(t = 0..1) = c''(t = 1/2..1)

All i can figure out right now is making 2 new unknown control points for c(t) which is (P1, P2) and the P0 and P3 is the starting and ending point which is same as the a(0) and b(1). Then form 2 equation with the following condition,

a(1) = b(0) = c(1/2)...i usee a(1) = c(1/2), b(t) isn't involve, and i think this shouldn't affect the curve

and

a'(1) = c(1/2)

this 2 condition to find the P1 and P2, and the result is

Cx(t) = (-10)(1-t)3+(-5)(3t)(1-t)2+(5)(3t^2)(1-t)+(10)(t3)
Cy(t) = (-10)(1-t)3+(10/3)(3t)(1-t)2+(10/3)(3t^2)(1-t)+(-10)(t3)

the result isn't very desirable, because the curve is only correct at the center like how it shown in this page, http://www.fooplot.com/#W3sidHlwZSI6MiwiZXF4IjoiKC0xMCkoMS1zKV4zKygtNSkoM3MpKDEtcyleMisoNSkoM3NeMikoMS1zKSsoMTApKHNeMykiLCJlcXkiOiIoLTEwKSgxLXMpXjMrKDEwLzMpKDNzKSgxLXMpXjIrKDEwLzMpKDNzXjIpKDEtcykrKC0xMCkoc14zKSIsImNvbG9yIjoiIzA5MDBGRiIsInNtaW4iOiIwIiwic21heCI6IjEiLCJzc3RlcCI6Ii4wMSJ9LHsidHlwZSI6MiwiZXF4IjoiMTBjb3MocykiLCJlcXkiOiIxMHNpbihzKS0xMCIsImNvbG9yIjoiI2ZmMDAwMCIsInNtaW4iOiIwIiwic21heCI6IjJwaSIsInNzdGVwIjoiLjAxIn0seyJ0eXBlIjoxMDAwLCJ3aW5kb3ciOlsiLTIxLjE5NTM0Njc4NDc5Mjg0MyIsIjE4Ljg2Mzk5NjA1ODQ2MDQzMyIsIi0xOC41NDkzMDY0ODU4OTQyMSIsIjYuMTAyNTk2ODAyMjYxNjU1NSJdfV0-, the blue curve is the c(t), and the red curve is the real circle

for a(t) control point,
A0 = (-10,-10)
A1 = (-10,-5)
A2 = (-7.5,0)
A3 = (0,0)

for b(t) control point,
A0 = (10, 0)
A1 = (7.5, 0)
A2 = (10, -5)
A3 = (10, -10)

they re just approximation, not very "like" a circle yet.

and c(t), control point
P1 = (-10,-10)
P2 = (-5, 10/3)
P3 = ( 5, 10/3)
P4 = (10, -10)

I believe that if my c(t) is expressed in higher degree, with more control point, i would probably get a more accurate curve, but is it possible to get an accurate resultant curve in degree-3
 
Last edited:

Related Threads for: How to form a bezier curve?

Replies
0
Views
3K
Replies
6
Views
3K
Replies
8
Views
2K
Replies
7
Views
640
Replies
8
Views
3K
Replies
29
Views
9K
Replies
1
Views
1K
Replies
26
Views
14K

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top