Skip to content

Instantly share code, notes, and snippets.

@banesullivan
Last active September 13, 2019 04:51
Show Gist options
  • Save banesullivan/5160872500915714e10d7ec3a7e2b37d to your computer and use it in GitHub Desktop.
Save banesullivan/5160872500915714e10d7ec3a7e2b37d to your computer and use it in GitHub Desktop.
[First Gist] This is my first gist!
"""
This is my first gist! Why? Because I have ton's of snippets
that are useful on their own but not worth putting into a
repository. I'm hoping to use Lepton (link below) to manage
my GitHub Gists and start keeping track of all the useful
snippets that I have.
https://github.com/hackjutsu/Lepton
This gist is pretty boring... really boring actually. I
simply make 100 random points in 3D then run a 3D Delaunay
algorithm to create a grid of those points using PyVista.
This is giving me a chance to familiarize myself with the
Lepton platform and to learn how GitHub Gists work!
"""
import numpy as np
import pyvista as pv
points = np.random.rand(100,3)
mesh = pv.PolyData(points)
grid = mesh.delaunay_3d()
grid.plot(notebook=0, show_edges=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment