# Beizer Curves(3 Points)

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

## Recommended Posts

Okay Implementing biezers are easy. But now after looking a q3 maps i realized that the beizers in quake3 consist of 3 vectors and not four. Start-->Mid-->End if i double mid and i go Start--->First Handle--->Last Handle--->End i get almost correct results , is there any1 who has used q3 patches succesfully that can just give me the equation for drawing a biezer with 1 handle? Regards Dawid Joubert

##### Share on other sites
Bezier curves follow a specific formular in

Try
2 0 1 1 0 2
(1 * (1-t) * t)cp1 + (2 * (1-t) * t)cp2 + (1 * (1-t) * t)cp2

this simplifies to

2 2
((1-t))cp1 + (2 * (1-t) * t)cp2 + (t)cp2

where in the expresion

2 0
(A * (B) * C) cpN

A = The binomial co-eficent and follow the pattern of pascals triangle e.g. 1
1 1
1 2 1
1 3 3 1
1 4 6 4 1

B = (1-t) to the power of the order of the curve minus one, then decreasing one evry position from the left. e.g.

in a curve with 5 points
4 3 2 1 0
(1-t) (1-t) (1-t) (1-t) (1-t)

C = (t) to the power of the order of the curve minus one,then decreasing one evry position from the right. e.g.

in a curve with 5 points
0 1 2 3 4
(t) (t) (t) (t) (t)

cpN = the control point in the Nth position

so basically the formular you need is

2 2
((1-t))cp1 + (2 * (1-t) * t)cp2 + (t)cp2

##### Share on other sites
try
http://www.gamedev.net/reference/articles/article1584.asp

##### Share on other sites
Thanks alot.

I Would love to release a tutorial on doing the curves specificaly for the q3 bezier curves.

When im done ill send it to you so u can check the correctivity of the equations.

Regards Dawid Joubert

##### Share on other sites
Thanks for the help but you forgot to mention what Pascals Triangle is.

I found it anyway so no prob.

And can i simple Replace ControlPoint[N] With TexturePoint[N] or how do i go about light and texture maps?

• 21
• 13
• 9
• 17
• 13