Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Nurbs and control points

  1. #1
    Intern Contributor
    Join Date
    Feb 2000
    Location
    Stafford, UK
    Posts
    62

    Nurbs and control points

    Hello,

    This is my problem: I have a set of vertices which are basically waypoints, similar to waypoints in a flight sim or space game. Instead of drawing a line between each pair I want a nice smooth curve which interpolates each point. (from the start point through each point to the end point)

    Ive tried using the GluNurb code, and unless I dont understand it correctly, I can only get the spline to interpolate each point by duplicating control points, and I also only seem to be able to have a maximum of 8 control points. I dont really understand the knots but what I do with them is to set the first half to 0 and the second half to 1 so that the spline always starts at the start and ends at the end.

    So basically my problem is this... I only seem to be able to use 8 control points (a line is not drawn if more are used) and I dont know how to get the spline to interpolate each point properly.

    Hope someone can help

    David

  2. #2
    Junior Member Regular Contributor
    Join Date
    Oct 2000
    Location
    Donetsk,Ukraine
    Posts
    120

    Re: Nurbs and control points

    You haven't to understand knots to make them work ;-).Their sence is somwhere deep in math(b-spline interpolation). All you need is to create array like this
    (0,0,0,1,2,3,4,5,6,7,8,9,9,9)
    for 9 knots. Note that first 3 and last 3 are same.
    i dont uderstand thier meaning too, but i marked, that if you'll multiply all that knots or increase/decrease them curve will not change.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •