# Bezier curves (Permutation problem?)

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

## Recommended Posts

Hi, I've recently tried to impliment bezier curves into an application. I'm ok with fixed length curves, but I want to write a general function that takes a variable number of points. Generating the coordinates on the curve when you know the number of points was straightforward enough, but I've ran into problems with unknown length curves. Applying the general function has been the problem. the value of the point P is multiplied by some value that depends on the number of points, but I'm not sure what the relation between the length of the curve and this value is. eg on the link here: http://en.wikipedia.org/wiki/B%C3%A9zier_curve for N = 5 the points P0 -> P5 are multiplied by 1,5,10,10,5,1 respectivley. How is this calculated? I think someone mentioned permutations to me, but I'm not sure how to apply this.

##### Share on other sites
Quote:
 Original post by WinegumsHi, I've recently tried to impliment bezier curves into an application. I'm ok with fixed length curves, but I want to write a general function that takes a variable number of points. Generating the coordinates on the curve when you know the number of points was straightforward enough, but I've ran into problems with unknown length curves.Applying the general function has been the problem. the value of the point P is multiplied by some value that depends on the number of points, but I'm not sure what the relation between the length of the curve and this value is.eg on the link here:http://en.wikipedia.org/wiki/B%C3%A9zier_curvefor N = 5 the points P0 -> P5 are multiplied by 1,5,10,10,5,1 respectivley. How is this calculated? I think someone mentioned permutations to me, but I'm not sure how to apply this.
IIRC, the pattern of coefficients is the same as that of Pascal's triangle.

If you run into any other problems, I have some code lying around for n-degree Bezier curves that might be a useful reference (and which I'd be happy to post).

##### Share on other sites
It's a row of pascal's triangle. I believe it would be N choose whichever number it is. N!/(r!(N-r)!) 5!/0!5! = 1, 5!/(1!4!) = 5, 5!/(2!3!) = 10 etc.

edit: beaten again!

1. 1
2. 2
3. 3
Rutin
15
4. 4
5. 5

• 9
• 9
• 9
• 11
• 11
• ### Forum Statistics

• Total Topics
633679
• Total Posts
3013300
×