Instantly share code, notes, and snippets.

View benchcdist.py
import numpy as np
import trimesh
import timeit
import time
from collections import deque
import matplotlib.pyplot as plt
from scipy.spatial import cKDTree as KDTree
View resolve.py
import os
import trimesh
class FileSystemResolver(object):
def __init__(self, source):
"""
Resolve files based on a source path.
"""
View bricks.py
"""
bricks.py
-------------
Fun with meshes of bricks.
"""
import trimesh
import numpy as np
View finite_voronoi.py
import trimesh
import numpy as np
from scipy.spatial import Voronoi
if __name__ == '__main__':
points = np.random.random((20,3))
v = Voronoi(points)
View bump.py
import sys
import numpy as np
file_name = 'trimesh/version.py'
if __name__ == '__main__':
with open(file_name, 'r') as f:
text = f.read()
split = text.split("'")
View headless.py
import pyglet
import pyglet.gl as gl
import numpy as np
import os
import tempfile
import subprocess
import collections
View rtree_stream_check
import numpy as np
import rtree
import time
def random_tree_stream(points_count, include_object):
properties = rtree.index.Property()
properties.dimension = 3
points_random = np.random.random((points_count,3,3))
points_bounds = np.column_stack((points_random.min(axis=1),