PDA

View Full Version : Surface



vivek vyas
07-10-2009, 11:14 PM
Hi
i had done the curve using opengl

and now
i am try to do something on surface

i had worked on the surface and yes surface is maded but weak point is i do the job on already coded c/cpp file (Mesa's demos package)

and
i the code of doubt are here
plate's point don take it as plate


GLfloat platepoint[2][3] = { {-1.0f,-1.0f,-1.0f},
{1.0f,-1.0f,0.0f}
};


Knots ?????


GLfloat Knots[8] = {0.0f,0.0f,0.0f,0.0f,1.0f,1.0f,1.0f,1.0f};


and
the glu's Non uniform rational B-splines



gluBeginSurface(mnurb);
gluNurbsSurface (mnurb, 8, Knots, 8, Knots, 4, 4, &platepoint[0][0], 4, 4, GL_MAP2_VERTEX_3);
gluEndSurface(mnurb);

glPopMatrix();

Q i had readed documention of these gluNurbsSurface

but they cant tell why we take address of platepoint[0][0]

Q how knots/platepoint work togather

Q is u, v direction mean x/y direction

Q difference B/w gluNurbs and glMap functions(not parameters)

please
it is really imp Q for me

Q how to make surface as we made in mind(these curve i can made up to some points as i assumed but damm how surface work)

thanks and its in advanced $$$$