Repository: pyvista/pyvista

Issue:
Confusing behaviour of ParametricEllipsoid
### Describe the bug, what's wrong, and what you expected.

When creating a ParametricEllispoid using a direction of [0, 1, 0], the ellipsoid is rotated along the y axis.  
For example if setting the direction to [1e-5, 1, 0], which corresponds to approximately similar direction, the ellipsoid displays then the correct behaviour.

### Steps to reproduce the bug.

```python
import pyvista as pv

ellipsoid = pv.ParametricEllipsoid(300, 100, 10, direction=[0, 1, 0])
```

### System Information

```shell
Date: Wed Sep 06 14:07:38 2023 CEST

                OS : Linux
            CPU(s) : 8
           Machine : x86_64
      Architecture : 64bit
               RAM : 31.2 GiB
       Environment : Jupyter
       File system : ext4
        GPU Vendor : Intel
      GPU Renderer : Mesa Intel(R) UHD Graphics (CML GT2)
       GPU Version : 4.6 (Core Profile) Mesa 22.0.1
  MathText Support : False

  Python 3.8.13 (default, Apr 19 2022, 02:32:06)  [GCC 11.2.0]

           pyvista : 0.41.1
               vtk : 9.2.6
             numpy : 1.24.4
        matplotlib : 3.3.4
            scooby : 0.7.2
             pooch : v1.7.0
           imageio : 2.31.1
           IPython : 8.12.2
        ipywidgets : 8.0.7
             scipy : 1.10.1
              tqdm : 4.65.0
        jupyterlab : 3.6.5
             trame : 2.5.2
      trame_client : 2.10.0
      trame_server : 2.11.7
         trame_vtk : 2.5.8
      nest_asyncio : 1.5.6
```


### Screenshots

Here is the given ellipsoid
![confusing_ellipsoid](https://github.com/pyvista/pyvista/assets/57682091/f0e1b5f7-eca1-4224-a020-df44385ed68b)
Here is what is expected
![expected_ellipsoid](https://github.com/pyvista/pyvista/assets/57682091/d4f67ead-9928-4af3-9c3a-b6121180b780)



Discussion:

Patch:
diff --git a/pyvista/core/utilities/geometric_objects.py b/pyvista/core/utilities/geometric_objects.py
--- a/pyvista/core/utilities/geometric_objects.py
+++ b/pyvista/core/utilities/geometric_objects.py
@@ -62,7 +62,7 @@ def translate(surf, center=(0.0, 0.0, 0.0), direction=(1.0, 0.0, 0.0)):
     if np.array_equal(normz, (0.0, 0.0, 0.0)):
         # the assumed normy axis is parallel to normx, so shift its
         # axis and recalculate normz
-        norm_y_temp = np.roll(norm_y_temp, 1)
+        norm_y_temp = [-1.0, 0.0, 0.0]
         normz = np.cross(normx, norm_y_temp)
     normz /= np.linalg.norm(normz)
     normy = np.cross(normz, normx)


Test patch:
diff --git a/tests/core/test_parametric_geometry.py b/tests/core/test_parametric_geometry.py
--- a/tests/core/test_parametric_geometry.py
+++ b/tests/core/test_parametric_geometry.py
@@ -148,3 +148,15 @@ def test_ParametricSuperToroid():
 def test_ParametricTorus():
     geom = pv.ParametricTorus()
     assert geom.n_points
+
+
+def test_direction():
+    geom1 = pv.ParametricEllipsoid(300, 100, 10, direction=[1, 0, 0])
+    geom2 = pv.ParametricEllipsoid(300, 100, 10, direction=[0, 1, 0])
+    assert geom1.n_points
+    assert geom2.n_points
+    points1 = geom1.points
+    points2 = geom2.points
+    assert np.allclose(points1[:, 0], points2[:, 1])
+    assert np.allclose(points1[:, 1], -points2[:, 0])
+    assert np.allclose(points1[:, 2], points2[:, 2])