# bezier splines

This topic is 4872 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I've been reading up on bezier splines, and I'm assuming that's what photoshop uses for it's "pen tool". I can't, however, figure out how they get their little control bars to work. Is it actually a different kind of spline? Any information on the math behind that nifty little tool would be appreciated.

##### Share on other sites
I don't know for sure that they're using Bezier splines, but they probably are. The way it would work is every curve is a piecewise 3rd order Bezier curve. That is, each set of 4 points is a convex hull for the Bezier curve. The two interior points are the control bar points, one attached to each endpoint. The two endpoints are, well, the endpoints. When you have, say, 3 points that the piecewise curve passes through...what you actually have internally is two 3rd order Bezier curves. One that joins the first 2 of the piecewise curve points----which adds two control bar points between the first 2 points, and a second Bezier curve that joins the middle and last piecewise curve points, adding an additional two control bar points beween the last 2 piecewise curve points. Now, with the 2 Bezier curves, notice that the middle piecewise curve point is attached to 2 control points. You can do cool constraints with those 2 control points to get the different controls in Photoshop. For example, if you require that the 2 control points be colinear with the middle piecewise curve point, then your overall curve will be smooth/continuous at that middle point and it'll look like you have just one big smooth curve. Or, you can free up the control points and let them move freely, in which case the overall curve will have a discontinuous point---a corner---in the middle of it at that middle point.

Hope this helps!

##### Share on other sites
Bezier curves can be easyly computed with the recursive DE CASTELJAU 's algorithm.

1. 1
Rutin
37
2. 2
3. 3
4. 4
5. 5

• 11
• 10
• 13
• 103
• 11
• ### Forum Statistics

• Total Topics
632977
• Total Posts
3009673
• ### Who's Online (See full list)

There are no registered users currently online

×