Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack overflow when computing delaunay_2d on bigger point clouds #6045

Open
CLAMPE2020 opened this issue May 7, 2024 · 0 comments
Open

stack overflow when computing delaunay_2d on bigger point clouds #6045

CLAMPE2020 opened this issue May 7, 2024 · 0 comments
Labels
bug Uh-oh! Something isn't working as expected.

Comments

@CLAMPE2020
Copy link

CLAMPE2020 commented May 7, 2024

Describe the bug, what's wrong, and what you expected.

A fatal stack overflow happens when delaunay_2d is used on bigger point clouds. I expected it to run or throw a normal exception.

Steps to reproduce the bug.

import numpy as np
import pyvista as pv

# Define a simple Gaussian surface
n = 3000
x = np.linspace(-200, 200, num=n) + np.random.uniform(-5, 5, size=n)
y = np.linspace(-200, 200, num=n) + np.random.uniform(-5, 5, size=n)
xx, yy = np.meshgrid(x, y)
A, b = 100, 100
zz = A * np.exp(-0.5 * ((xx / b) ** 2.0 + (yy / b) ** 2.0))

# Get the points as a 2D NumPy array (N by 3)
points = np.c_[xx.reshape(-1), yy.reshape(-1), zz.reshape(-1)]
points[0:5, :]

# simply pass the numpy points to the PolyData constructor
cloud = pv.PolyData(points)
# cloud.plot(point_size=15)


surf = cloud.delaunay_2d(progress_bar=True)

System Information

--------------------------------------------------------------------------------
  Date: Tue May 07 13:12:43 2024 W. Europe Daylight Time

                  OS : Windows (10 10.0.19045 SP0 Multiprocessor Free)
              CPU(s) : 20
             Machine : AMD64
        Architecture : 64bit
                 RAM : 79.7 GiB
         Environment : Python
          GPU Vendor : NVIDIA Corporation
        GPU Renderer : NVIDIA T1000/PCIe/SSE2
         GPU Version : 4.5.0 NVIDIA 551.61
    MathText Support : False

  Python 3.11.6 (tags/v3.11.6:8b6ee5b, Oct  2 2023, 14:57:12) [MSC v.1935 64
  bit (AMD64)]

             pyvista : 0.43.7
                 vtk : 9.3.0
               numpy : 1.26.2
          matplotlib : 3.8.1
              scooby : 0.10.0
               pooch : 1.8.1
              pillow : 10.1.0
             imageio : 2.34.1
               PyQt5 : 5.15.10
             IPython : 8.17.2
            colorcet : 3.1.0
             cmocean : 4.0.3
          ipywidgets : 8.1.2
               scipy : 1.11.3
                tqdm : 4.66.4
              meshio : 5.3.5
               trame : 3.6.0
        trame_client : 3.0.2
        trame_server : 3.0.0
           trame_vtk : 2.8.7
       trame_vuetify : 2.4.3
jupyter_server_proxy : 4.1.2
        nest_asyncio : 1.5.8
--------------------------------------------------------------------------------

Screenshots

No response

@CLAMPE2020 CLAMPE2020 added the bug Uh-oh! Something isn't working as expected. label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Uh-oh! Something isn't working as expected.
Projects
None yet
Development

No branches or pull requests

1 participant