Generating bezier curve through a set of points

Click For Summary

Discussion Overview

The discussion revolves around generating cubic Bezier curves through a set of points, specifically focusing on how to compute the control points necessary for creating smooth curves similar to the 'insert curve' function in Microsoft Word. The scope includes programming, mathematical reasoning, and technical explanations related to curve generation.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant seeks to understand how to compute the magnitude of control points for cubic Bezier curves given a set of points, noting that the gradient of the tangent at each point matches the gradient of the line formed by adjacent points.
  • Another participant provides a link to a resource that explains cubic Bezier curves, suggesting it may contain useful information.
  • A participant inquires about automatically generating control points similar to the CURVE function in Microsoft Word, indicating a desire for a more streamlined approach.
  • There is a clarification that the Word function requires user input and does not generate points automatically, which may affect the approach to generating control points.
  • One participant expresses interest in using the gradients of adjacent points to determine the tangent of the curve, but highlights the challenge of solving for the magnitude of the control point vector.

Areas of Agreement / Disagreement

Participants appear to have differing views on the method of generating control points, with some seeking automated solutions while others clarify the manual input required by existing software. The discussion remains unresolved regarding the best approach to determine the magnitude of control points.

Contextual Notes

Participants have not reached a consensus on the method for calculating control point magnitudes, and there are references to external resources that may or may not provide clarity. The discussion also reflects varying levels of familiarity with Bezier curves and related programming techniques.

kanki
Messages
29
Reaction score
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
Thanks for the link.

What if I want to generate the control points automatically like the CURVE function in microsoft word?
 
The curve function in Word accepts user input via a window + mouse, the points are not automatic - assuming I understand you correctly.
 
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.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 39 ·
2
Replies
39
Views
6K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 18 ·
Replies
18
Views
3K