private void createNurbMesh(int nbSubSegments) {
        if (spline.getControlPoints() != null && spline.getControlPoints().size() > 0) {
            if (nbSubSegments == 0) {
                nbSubSegments = spline.getControlPoints().size() + 1;
            } else {
                nbSubSegments = spline.getControlPoints().size() * nbSubSegments + 1;
            }
            float minKnot = spline.getMinNurbKnot();
            float maxKnot = spline.getMaxNurbKnot();
            float deltaU = (maxKnot - minKnot) / nbSubSegments;

            float[] array = new float[(nbSubSegments + 1) * 3];

            float u = minKnot;
            Vector3f interpolationResult = new Vector3f();
            for (int i = 0; i < array.length; i += 3) {
                spline.interpolate(u, 0, interpolationResult);
                array[i] = interpolationResult.x;
                array[i + 1] = interpolationResult.y;
                array[i + 2] = interpolationResult.z;
                u += deltaU;
            }

            //calculating indexes
            int i = 0;
            short[] indices = new short[nbSubSegments << 1];
            for (int j = 0; j < nbSubSegments; ++j) {
                indices[i++] = (short) j;
                indices[i++] = (short) (j + 1);
            }

            this.setMode(Mesh.Mode.Lines);
            this.setBuffer(VertexBuffer.Type.Position, 3, array);
            this.setBuffer(VertexBuffer.Type.Index, 2, indices);
            this.updateBound();
            this.updateCounts();
        }
    }
This method creates the Nurb path for this curve.

@param nbSubSegments amount of subsegments between position control
points
jme3-core/src/main/java/com/jme3/scene/shape/Curve.java