I am expecting ParametricGeom to call my paramfunc 10x10 times, stepping 0.1 in both us and v.
Instead, it seems to be calling the paramfunc 363 times and stepping at weird intervals.
Please see below. Am I using this incorrectly? Thanks.
var cnt = 0;
var surfgeom = new THREE.ParametricGeometry(paramfunc, 10, 10, false);
console.log("cnt=" + cnt);
var surfmat = new THREE.MeshPhongMaterial({
side: THREE.DoubleSide,
color: 0xffffff,
vertexColors: THREE.VertexColors,
specular: 0x050505,
shininess: 100.,
emissive: 0x111111,
});
var surfmesh = new THREE.Mesh(surfgeom, surfmat);
scene.add(surfmesh);
function paramfunc(u, v, target) {
cnt++;
uint = parseInt(u * 200.0);
pt = curves[uint].getPoint(v);
console.log("u=" + u + " uint=" + uint + " v=" + v + " x=" + pt.x + " y=" + pt.y + " z=" + pt.z);
target.set(pt.x, pt.y, pt.z);
}