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
18
votes
6 answers

How can I get all points in CGPath curve or quad curve

I have made a quad curve path using the method CGPathAddQuadCurveToPoint. I got the path perfectly. But, I want to know all the coordinate points which are participated in the path. Is there a way to retrieve all the coordinate points in a path? If…
Vamshi
18
votes
3 answers

Efficient Line Smoothing and/or Simplification

I am creating a painting application in Actionscript (although my question is not Actionscript related). The basic idea is to start painting when the mouse is pressed and tracking the mouse movements. What I want to achieve is: reduce mouse "noise"…
justin
  • 302
  • 1
  • 3
  • 12
17
votes
2 answers

How to draw Bezier Curve in Android

I have a requirement to create bezier curve in my project. For that purpose I am drawing a view with paint, but the problem is that I am not getting the exact shape for my need as mentioned in the picture below. So kindly help me with your solutions…
Chandru
  • 5,954
  • 11
  • 45
  • 85
17
votes
5 answers

How can I draw a bezier curve using Python's PIL?

I'm using Python's Imaging Library and I would like to draw some bezier curves. I guess I could calculate pixel by pixel but I'm hoping there is something simpler.
carrier
  • 32,209
  • 23
  • 76
  • 99
17
votes
4 answers

How to find control points for a BezierSegment given Start, End, and 2 Intersection Pts in C# - AKA Cubic Bezier 4-point Interpolation

I've been struggling looking for an understandable way to do this. I have four points, a StartPt, EndPoint, and Intersection points to represent the peak and valley in the bezier. The BezierSegment in C# requires start, controlPoint 1, controlPoint…
softwarequestioneer
  • 991
  • 1
  • 8
  • 16
16
votes
5 answers

How can I get a cubic bezier curve closest to given points?

Given n points: p0, p1, p2, ..., pn; How can I get the point c1, c2 so that the cubic bezier curve defined by p0, c1, c2, pn closest to the given points? I tried least square method. I wrote this after I read the pdf document in…
EFanZh
  • 2,357
  • 3
  • 30
  • 63
16
votes
3 answers

Outline of cubic bezier curve stroke

By stroke of the cubic bezier curve I mean rendering a curve 'A' with a specific line width 'w'. How can I derive other cubic bezier curves that describe the outline of the stroke of bezier 'A' ?
Loci
16
votes
4 answers

Find a point, a given distance, along a simple cubic bezier curve. (On an iPhone!)

Imagine you have a completely normal four-point bezier curve (two points and two control points) created using curveToPoint:controlPoint1:controlPoint2: in your cocoa application: How do you find points (and the tangents), along the curve? Later:…
Fattie
  • 27,874
  • 70
  • 431
  • 719
16
votes
1 answer

Wrap text outside bezier curve in android

I want to wrap text in the shape of bezier curve outside the curve in android. What I have tried : Path path = new Path(); path.addCircle(x, y, radius, Path.Direction.CW); myCanvas.drawTextOnPath(myText, path, offset, 0, myPaint); What I am trying…
Shruti
  • 1
  • 13
  • 55
  • 95
16
votes
2 answers

Gradient Stroke Along Curve in Canvas

I'm trying to draw a curve in canvas with a linear gradient stoke style along the curve, as in this image. On that page there is a linked svg file that gives instructions on how to accomplish the effect in svg. Maybe a similar method would be…
user3705053
  • 163
  • 1
  • 4
16
votes
4 answers

Find new control point when endpoint change in cubic bezier curve

I'm implementing cubic bezier curve logic in my one of Android Application. I've implemented cubic bezier curve code on canvas in onDraw of custom view. // Path to draw cubic bezier curve Path cubePath = new Path(); // Move to startPoint(200,200)…
Hitesh Patel
  • 2,868
  • 2
  • 33
  • 62
16
votes
2 answers

Smooth spline representation of an arbitrary contour, f(length) --> x,y

Suppose I have a set of x,y coordinates that mark points along contour. Is there a way that I can build a spline representation of the contour that I can evaluate at a particular position along its length and recover interpolated x,y coordinates? It…
ali_m
  • 71,714
  • 23
  • 223
  • 298
16
votes
4 answers

Bezier clipping

I'm trying to find/make an algorithm to compute the intersection (a new filled object) of two arbitrary filled 2D objects. The objects are defined using either lines or cubic beziers and may have holes or self-intersect. I'm aware of several…
jjrv
  • 4,211
  • 2
  • 40
  • 54
15
votes
3 answers

How to animate a line the same way the wave-like effect that Siri's shows?

I would like to create this sound/sin wave that looks like the dynamic audio wave Siri in iOS 7 has: I know how to create and animate UIBezierCurve sin shape and I googled a lot, but I haven't found and have no idea how to achieve this…
Skiny
  • 405
  • 1
  • 4
  • 16
15
votes
4 answers

Using CAMediaTimingFunction to calculate value at time (t)

In Cocoa/Touch, CAMediaTimingFunction represents four control points that specify a cubic bezier curve of a timing function. For an application I am writing I would like to be able to extract the result of said bezier curve at an arbitrary time t (0…
1 2
3
85 86