[PyOpenGL-Users] gluNurbsCurve ?
Brought to you by:
mcfletch
From: Prashant S. <ani...@ya...> - 2008-12-08 05:48:24
|
http://img372.imageshack.us/my.php?image=image1lp7.jpg I am creating a "gluNurbsCurve" and ripped code is here: x1 = y1 = 25 x2 = y2 = 450 scale = abs(x2-x1)/3.0 midx, midy = (abs(x2+x1)/2.0), abs(y2+y1)/2.0 degree = 3 ctrlpoints=[[x1, y1, 0], [x1+scale, y1, 0], [midx, midy, 0], [x2-scale, y2, 0], [x2, y2, 0]] Using above I am getting a curve which is missing both start and end points.. (Image1.jpg>Curve 1) Instead If I use: ctrlpoints=[[x1, y1, 0], [x1, y1, 0], [x1+scale, y1, 0], [midx, midy, 0], [x2-scale, y2, 0], [x2, y2, 0], [x2, y2, 0]] by repeating first and last points I am getting a curve from points to points but I am loosing the smoothness which I am getting from first "ctrlpoints". (Image1.jpg>Curve 2) Any solution? Prashant Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/ |