How to form a bezier curve?

  • Thread starter null void
  • Start date
  • Tags
    Curve Form
In summary, the conversation discusses how to form the curve of half quadrant of a circle using cubic Bezier curves and how to merge or join two curves without deviating from the desired shape. There is also mention of using rational Bezier curves to define a circle arc. It is noted that it is not possible to get an exact result with degree-3 curves, but it can be approximated closely. The conversation also includes a link to a practical guide on Bezier curves for further information.
  • #1
null void
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:
Physics news on Phys.org
  • #3
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:
  • #5


I can explain the concept of forming a Bezier curve and provide some guidance on how to determine the control points.

A Bezier curve is a mathematical curve that is commonly used in computer graphics and design. It is defined by a set of control points, which are used to determine the shape of the curve. These control points act as anchors that the curve passes through or near, and the curve is calculated based on the position of these points.

To form a Bezier curve, you will need at least two control points. For a half quadrant of a circle, you can use three control points to create a smooth curve. The first control point should be at the starting point of the curve, and the third control point should be at the end point. The second control point, as you mentioned, should be on the tangent line of the starting and ending points.

To determine the position of the second control point, you can use the tangent line method you mentioned. This means that the control point should be placed on the tangent line at a distance from the starting point equal to the distance from the starting point to the end point. This will ensure that the curve is smooth and passes through the end point at the correct angle.

The position of the control points is crucial in determining the shape of the curve. If the control points are too far apart, the curve will be more angular, and if they are too close, the curve will be more curved. You can experiment with different positions of the control points to achieve the desired curve shape.

To combine the control points together, you can use a formula called the Bernstein polynomial, which calculates the position of points along the curve based on the position of the control points. This allows for the smooth and precise calculation of the curve.

In summary, forming a Bezier curve requires understanding the concept of control points and their positions. By using the tangent line method and the Bernstein polynomial formula, you can create a smooth and accurate curve. I hope this helps in your understanding of Bezier curves.
 

1. What is a Bezier curve?

A Bezier curve is a mathematical curve that is commonly used to create smooth and flowing shapes in computer graphics. It is defined by a set of control points and tangent vectors that determine its shape and direction.

2. How do I create a Bezier curve?

To create a Bezier curve, you will need to specify at least two control points and two tangent vectors. These points and vectors can be manipulated using mathematical equations or through visual tools in programs like Adobe Illustrator or Inkscape.

3. What are the advantages of using Bezier curves?

Bezier curves offer a high level of control and precision when creating curves and shapes. They also allow for smooth transitions between points and can be easily scaled and manipulated without distorting the overall shape.

4. Can I create complex shapes with Bezier curves?

Yes, Bezier curves can be used to create a wide range of shapes and curves, from simple circles and squares to more complex shapes like hearts or stars. With enough control points and tangent vectors, almost any shape can be created.

5. Are Bezier curves used in other fields besides computer graphics?

Yes, Bezier curves are used in various fields such as engineering, mathematics, and animation. They are also commonly used in font design and typography to create smooth and precise letterforms.

Similar threads

Replies
1
Views
3K
  • Differential Geometry
Replies
10
Views
720
  • Linear and Abstract Algebra
Replies
1
Views
1K
  • Classical Physics
2
Replies
39
Views
3K
  • Precalculus Mathematics Homework Help
Replies
18
Views
1K
  • Differential Geometry
Replies
2
Views
1K
  • Differential Geometry
Replies
3
Views
2K
  • Differential Geometry
Replies
3
Views
2K
Replies
8
Views
3K
  • Differential Geometry
Replies
6
Views
3K
Back
Top