Generating bezier curve through a set of points

In summary: What about the direction and magnitude of the control points at the endpoints?The direction and magnitude of the control points at the endpoints can be determined using the equation for the control point at the endpoint of a curve.
  • #1
kanki
29
0
Hi there,

I am now trying to write program to generate smooth curve by using cubic bezier (4 points, 2 endpoints and 2 control points) through a set of points like the 'insert curve' function in Microsoft Word.

I am wondering how do the curve compute the magnitude of the control points of each point. I noticed that the gradient of the tangent to the curve at that point is the same as the gradient of the straight line formed from prior and next point, so I can compute the gradient of the control point, but what about the magnitude? I also noticed that in the Curve function, at each point, the control point prior to the point and next to the point are of the same magnitude.

At the end points, how do i get the direction and magnitude of the control point?

Please help me out! Thanks in advance!
 
Last edited:
Technology news on Phys.org
  • #3
Thanks for the link.

What if I want to generate the control points automatically like the CURVE function in microsoft word?
 
  • #4
The curve function in Word accepts user input via a window + mouse, the points are not automatic - assuming I understand you correctly.
 
  • #5
What i mean is, I have a set of points, but i need to connect them using bezier curve, and define new control points by something like in this example:
http://www.efg2.com/Lab/Graphics/Jean-YvesQueinecBezierCurves.htm

Although the website above did show how to get the magnitude of the control points, is there a simpler way?

Currently I'm thinking of to make use of the gradient of prior and next point so that the tangent of the curve at that point is the same as the gradient. The only problem is that I need to solve the magnitude of the control point vector.
 

Related to Generating bezier curve through a set of points

1. What is a bezier curve?

A bezier curve is a type of mathematical curve commonly used in computer graphics and animation. It is defined by a set of control points that determine the shape and direction of the curve.

2. How is a bezier curve generated through a set of points?

To generate a bezier curve through a set of points, a mathematical algorithm is used to calculate the position of the curve's control points based on the given points. These control points then determine the shape and direction of the curve.

3. What is the purpose of generating a bezier curve through a set of points?

The purpose of generating a bezier curve through a set of points is to create a smooth and visually appealing curve that passes through the given points. It is commonly used in computer graphics and animation to create curved shapes and paths.

4. How many points are needed to generate a bezier curve?

A minimum of three points is needed to generate a bezier curve. These three points will serve as the endpoints and a control point for the curve.

5. Are there different types of bezier curves?

Yes, there are different types of bezier curves such as quadratic and cubic bezier curves. These differ in the number of control points used and therefore, have different shapes and properties.

Similar threads

  • Calculus and Beyond Homework Help
Replies
8
Views
527
  • Classical Physics
2
Replies
39
Views
3K
Replies
20
Views
1K
Replies
4
Views
2K
  • Programming and Computer Science
Replies
11
Views
2K
Replies
5
Views
1K
  • Differential Geometry
Replies
3
Views
2K
Replies
8
Views
3K
  • Special and General Relativity
Replies
8
Views
1K
  • Special and General Relativity
Replies
5
Views
1K
Back
Top