bezier

Equidistant points across Bezier curves

Currently, I'm attempting to make multiple beziers have equidistant points. I'm currently using cubic interpolation to find the points, but because the way beziers work some areas are more dense than others and proving gross for texture mapping because of the variable distance. Is there a way to find points on a bezier by distance rath...

Point Sequence Interpolation

Given an arbitrary sequence of points in space, how would you produce a smooth continuous interpolation between them? 2D and 3D solutions are welcome. Solutions that produce a list of points at arbitrary granularity and solutions that produce control points for bezier curves are also appreciated. Also, it would be cool to see an itera...

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 existing algorithms doing the same with polygons, listed here. However, I'd like to support bezie...

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. ...

Drawing a Topographical Map

I've been working on a visualization project for 2-dimensional continuous data. It's the kind of thing you could use to study elevation data or temperature patterns on a 2D map. At its core, it's really a way of flattening 3-dimensions into two-dimensions-plus-color. In my particular field of study, I'm not actually working with geograph...

Calculation of cubic Bézier with known halfway point

I know: The control points a and d (start and end point of a 2D cubic bezier curve) The slopes a->b, c->d, and b->c (b,c the other control points) Where the halfway point of the Bézier curve is. Now, given this information, what is the formula for the positions of control points b and c ? ...

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' ? ...

Approximating nonparametric cubic Bezier

What is the best way to approximate a cubic Bezier curve? Ideally I would want a function y(x) which would give the exact y value for any given x, but this would involve solving a cubic equation for every x value, which is too slow for my needs, and there may be numerical stability issues as well with this approach. Would this be a goo...

Fast Method to Intersect two Integer Quadratic Beziers?

Given two Quadratic Beziers in 2D with integer coordinates, what is the best way to find their intersection point(s)? Also interesting is an early rejection if they do not intersect. If it makes it easier, they can both be assumed to be monotone in both x and y. Only intersections that are representable by subdivision to integers of the ...

Calculate the horizon of a curved face?

I need to find the 2 points of the visual horizon, of a curved face. I have: XYZ of the 4 corner points XYZ of the 2 curved edge bezier points And I need to calculate either: XY of the horizon points XYZ of the horizon points See the image below. ...

Convert a quadratic curve points to polynomial representation?

I have the X,Y of 2 end points and 1 bezier point, of a Quadratic Bezier curve. Using this data, how can I derive the polynomial representation of the curve? ...

Calculate the horizon of a curved face? - Not extrema

I need to find the 2 points of the visual horizon, of a curved face. I have: XYZ of the 4 corner points XYZ of the 2 curved edge bezier points And I need to calculate either: XY of the 2 horizon points XYZ of the 2 horizon points Note: I got a solution the last time I asked this question, but it only found the extrema of the c...

How to convert a 3D point into 2D perspective projection?

I am currently working with using Bezier curves and surfaces to draw the famous Utah teapot. Using Bezier patches of 16 control points, I have been able to draw the teapot and display it using a 'world to camera' function which gives the ability to rotate the resulting teapot, and am currently using an orthographic projection. The resul...

Approximating Bezier Curves of Degree N

I know there are methods to approximate cubic Bezier curves (this page was also a good reference), but is there a quicker method to approximate a bezier curve of degree N? Or can you only use the generalization below? From wikipedia: The Bézier curve of degree n can be generalized as follows. Given points P0, P1,..., Pn, the Bézier cur...

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 realized that my initial problem could be solved without using relative position. When ...

How many points for a spline

H community, I wanted to ask if there is an algorithm for choosing the optimal amount of support points for creating a bezier spline in order to make it look smooth and reduce the error. If there is such an algorithm how fast is the algorithm? Thanks in advance Sebastian ...

Finding min/max of quadratic bezier with CoreGraphics

I am using CoreGraphics to draw a quadratic bezier but want to computer the min/max value of the curve. I am not from a mathematical background so this has become a bit troublesome. Does anyone have any articles or ideas about how to solve this? ...

Converting Pixels to Bezier Curves in Actionscript 3

Ok, so I'll try to be as descriptive as possible. I'm working on a project for a client that requires a jibjab-style masking feature of an uploaded image. I would like to be able to generate a database-storable object that contains anchor/control positions of a bezier shape, so I can pull it out later and re-mask the object. This all i...

position spheres along a bezier curve

I am trying a couple of tutorials from http://nehe.gamedev.net, in order to learn openGL programming, I would like to position spheres along a Bezier curve such that they appear as a string of pearls. how can I position such spheres along the curve. I am drawing the curve using de Casteljau's algorithm and hence can get the XYZ points on...

How can I find the angle between two points on a bezier curve?

In my current OpenGL project I am trying to make the links of a chain hug the contours of a Bezier curve. How can I find the angle between two points on the curve so that I can position the links of the chain so that they follow the curve. Here is a picture of the curve and chain, I need some way of rotating the links so that they follo...