After exploring this discussion, I am attempting to create a 3D curved triangle using a NURBS surface, but I'm struggling with setting up my 3D points for this task.
Here is my current implementation:
var edges = this.getEdges(), // An edge is comprised of a line connecting 4 dots in a bezier curve.
dots = self.getDotsFromEdges(edges), // Collecting all dots in sequential order for surface construction.
...
nurbs = new THREE.NURBSSurface(deg1, deg2, knots1, knots2, ctrlPoints) ;
this.mesh.geometry.dispose() ;
this.mesh.geometry = new THREE.ParametricBufferGeometry(function(u, v, target) {
return nurbs.getPoint(u, v, target) ;
}, 10, 10) ;
And here is the resulting output:
https://i.sstatic.net/LhCul.png
I have experimented with various settings but have not found any that work effectively.
Note: The white points represent the ends of the edges; The red points indicate the middle points of the bezier curve.
Note 2: dots[0]
corresponds to point 0
in the provided image, and so forth.
Here is a working code snippet (also available as a fiddle version here)
...