Generate 3D shape as quadratic mesh for ThreeJS