Questions tagged [bezier]

A Bézier curve is a parametric curve frequently used in computer graphics and related fields. Generalizations of Bézier curves to higher dimensions are called Bézier surfaces, of which the Bézier triangle is a special case.

A Bézier curve is a parametric curve frequently used in computer graphics and related fields. Generalizations of Bézier curves to higher dimensions are called Bézier surfaces, of which the Bézier triangle is a special case.

In vector graphics, Bézier curves are used to model smooth curves that can be scaled indefinitely. "Paths," as they are commonly referred to in image manipulation programs, are combinations of linked Bézier curves. Paths are not bound by the limits of rasterized images and are intuitive to modify. Bézier curves are also used in animation as a tool to control motion.

Bézier curves are widely used in computer graphics to model smooth curves. As the curve is completely contained within the convex hull of its control points, the points can be graphically displayed and used to manipulate the curve intuitively. Affine transformations such as translation, and rotation can be applied on the curve by applying the respective transform on the control points of the curve. Furthermore, the convex hull of the control points acts as a bounding region for quick visibility tests; if the convex hull is not visible, then the Bézier curve is also not.

Quadratic and cubic Bézier curves are most common; higher degree curves are more expensive to evaluate. When more complex shapes are needed, low order Bézier curves are connected together. This is commonly referred to as a "path" in vector graphics standards (like SVG) and vector graphics programs (like Adobe Illustrator and Inkscape). To guarantee smoothness, the control point at which two curves meet must be on the line between the two control points on either side.

Bézier curves can be Linear (order 1), Quadratic (order 2), Cubic (order 3, the most common form in drawing and graphics software), and of higher order (more than 3).

Important Links:

1289 questions
11
votes
3 answers

How to smooth the blocks of a 3D voxel world?

In my (Minecraft-like) 3D voxel world, I want to smooth the shapes for more natural visuals. Let's look at this example in 2D first. Left is how the world looks without any smoothing. The terrain data is binary and each voxel is rendered as a unit…
danijar
  • 32,406
  • 45
  • 166
  • 297
11
votes
1 answer

Bézier curves, Loop and Blinn style

A couple of days ago I started looking into efficiently drawing bezier curves, and I came across a this method developed by Charles Loop and Jim Blinn that seemed very interesting. How ever, after a lot of experimenting with their algorithm, I just…
Roliga
  • 113
  • 1
  • 6
10
votes
5 answers

Position of a point relative to a Bezier curve

I have a Bezier curve specified by 4 points. I need to know if a point is on the left side or right side of the Bezier curve. Can you suggest me an algorithm? Edit: I'm sure that the way I generate the Bezier curve would not form loops. Later edit I…
Ionel Bratianu
  • 836
  • 2
  • 13
  • 26
10
votes
1 answer

Cocos2D Bezier curve around object as if by gravity

I'm trying to manipulate an object. When it gets near another object, let's say a globe, I want the globe to have a gravitational pull on the original object. I know I'm supposed to use CCBezierTo, so this isn't so much a programming question as it…
switz
  • 24,384
  • 25
  • 76
  • 101
10
votes
3 answers

What algorithm determines the nearness of a point to a Bezier curve?

I wish to determine when a point (mouse position) in on, or near a curve defined by a series of B-Spline control points. The information I will have for the B-Spline is the list of n control points (in x,y coordinates). The list of control points…
Chris Walton
  • 2,513
  • 3
  • 25
  • 39
10
votes
1 answer

bezier path widening

I have a bezier curve B with points S, C1, C2, E, and a positive number w representing width. Is there a way of quickly computing the control points of two bezier curves B1, B2 such that the stuff between B1 and B2 is the widened path represented by…
CromTheDestroyer
  • 3,616
  • 3
  • 20
  • 26
10
votes
5 answers

SVG: Convert Arcs to Cubic Bezier

I'm trying to do something that i though would be pretty simple: Replacing all Arcs in an SVG path with Cubic Bezier Curves. This: http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes doesn't really help me as it doesn't really say…
Vogel Vogel
  • 311
  • 1
  • 4
  • 12
10
votes
2 answers

Get points from a UIBezierPath

I drew the above BezierPath by doing: // location is where the user touches screen. // location will be the maximum of the graph CGPoint origin = CGPointMake(xStart, 620.0); CGPoint endpt = CGPointMake(xEnd, 620.0); CGPoint…
Maximus S
  • 10,759
  • 19
  • 75
  • 154
10
votes
3 answers

Calculating the bounding box of cubic bezier curve

I am trying to find an algorithm to calculate the bounding box of a given cubic bezier curve. The curve is in 3D space. Is there a mathematic way to do this except of sampling points on the curve and calculating the bounding box of these points?
Erik Sapir
  • 23,209
  • 28
  • 81
  • 141
10
votes
2 answers

how SVG curveTo ( C ) works?

I need your help , I am confused a little. My question is how SVG curveTo works, really I can't understand. look for this example
Mo Haidar
  • 3,748
  • 6
  • 37
  • 76
10
votes
5 answers

Detecting self crossing in closed Bezier curves

I've created a "blob" shape by patching cubic Bezier curves together (screenshot below). I'd like to be able to detect the situation where a curve has crossed over either itself or another curve and was wondering if there's a recommended approach…
Adamski
  • 54,009
  • 15
  • 113
  • 152
10
votes
3 answers

Calculate a bezier spline to get from point to point

I have 2 points in X,Y + Rotation and I need to calculate a bezier spline (a collection of quadratic beziers) that connects these 2 points smoothly. (see pic) The point represents a unit in a game which can only rotate slowly. So to get from point…
Robin Rodricks
  • 110,798
  • 141
  • 398
  • 607
10
votes
3 answers

Divide bezier curve into two equal halves

I have the bezier curves between 2 points. I'd like to cut all curves into two equal half. One of my idea is if I can control 't' value I'll draw 2 curves by t = [0,0.5] and t = [0.5,1] but I don't know how. Below is my code. I won't mind any other…
Orio
  • 103
  • 1
  • 9
10
votes
1 answer

Adjusting the line to fit our head in imageview

I am developing one application same as HairTryOn all things are done. but problem is display in following image. i want to set hair style as per customer face using blue line as per display in image. i used the following code testVw = [[UIView…
SAMIR RATHOD
  • 3,512
  • 1
  • 20
  • 45
10
votes
2 answers

How to animate an image along a path with Bezier curves

My goal: Move/animate an image along a path like the drawing below (Could be connecting bezier curves). Must work in IE7+, don't what to build multiple solutions. I can pause/resume the moving image. The image will keep moving along the path…
Bruno
  • 352
  • 1
  • 4
  • 9