Jump to content
  • Advertisement
Sign in to follow this  
dawidjoubert

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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
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 this post


Link to post
Share on other sites
Guest Anonymous Poster
try
http://www.gamedev.net/reference/articles/article1584.asp

Share this post


Link to post
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 this post


Link to post
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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!