Define / preset direction of NURBS starting and ending point

218 Views Asked by At

I have an implementation of NURBS curves in 3D, the curves have a clamping knot vector by default (starting and ending point of the curve are in the same position as the corresponding control points). What I want to do is, to preset the direction in which the curve has to start (defined by a vector). Is this possible or do I have to define additional control points to get the desired behaviour?

1

There are 1 best solutions below

0
On

For a nurbs curve with clamping knot vector, the starting point of the curve is defined by the first control point and the starting tangent direction of the curve is defined by the vector between the first control point and the 2nd control point. So, all you need to do is to define the first control point P0 as where you want the curve to start and the 2nd control point P1 as P1=P0+c*T (where T is the unit starting tangent vector of the curve and c is any constant value). Similarly, you can do the same for the last and second-to-last control point to meet your position and tangent requirements at the end of the curve.