function klein( v, u, target ) {

	u *= Math.PI;
	v *= 2 * Math.PI;

	u = u * 2;
	let x, z;
	if ( u < Math.PI ) {

		x = 3 * Math.cos( u ) * ( 1 + Math.sin( u ) ) + ( 2 * ( 1 - Math.cos( u ) / 2 ) ) * Math.cos( u ) * Math.cos( v );
		z = - 8 * Math.sin( u ) - 2 * ( 1 - Math.cos( u ) / 2 ) * Math.sin( u ) * Math.cos( v );

	} else {

		x = 3 * Math.cos( u ) * ( 1 + Math.sin( u ) ) + ( 2 * ( 1 - Math.cos( u ) / 2 ) ) * Math.cos( v + Math.PI );
		z = - 8 * Math.sin( u );

	}

	const y = - 2 * ( 1 - Math.cos( u ) / 2 ) * Math.sin( v );

	target.set( x, y, z );

}
A parametric function representing the Klein bottle.

@param {number} v - The `v` coordinate on the surface in the range `[0,1]`.
@param {number} u - The `u` coordinate on the surface in the range `[0,1]`.
@param {Vector3} target - The target vector that is used to store the method's result.