Hi,
I created a parametric function
function paramFunc(u, v, target) {
u = 2 * (u - 0.5);
v = 2 * (v - 0.5);
let x = u * 60;
let z = v * 60;
let y = Math.sin(0.5 * x) * Math.sin(0.5 * z) * 3;
target.set(x, y, z);
}
const geo = new ParametricGeometry(paramFunc, 100, 100);
let meshMaterial = new THREE.MeshPhongMaterial({ color: 0xff0000});
let mesh = new THREE.Mesh(geo, meshMaterial);
scene.add(mesh);
const wireframe = new THREE.WireframeGeometry(geo);
const line = new THREE.LineSegments(wireframe);
line.material.opacity = 0.25;
scene.add(line);
it works, although in some places the mesh looks transparent
Any suggestion?
thanks in advance