Skip to content

Instantly share code, notes, and snippets.

View nortikin's full-sized avatar
🌍
making 🙈 🙉 🙊

nikitron nortikin

🌍
making 🙈 🙉 🙊
View GitHub Profile
# inspired by https://openmaya.quora.com/How-to-implement-Voronoi-with-Python-for-Maya
import numpy as np
import random
import math
class MBoundingBox:
def __init__(self):
self.xyz = None
# set aliases
. ~/.bash_aliases
new-alias() {
local last_command=$(echo `history |tail -n2 |head -n1` | sed 's/[0-9]* //')
echo alias $1="'""$last_command""'" >> ~/.bash_aliases
. ~/.bash_aliases
}
@subnivean
subnivean / parasurf.py
Last active April 5, 2018 23:42
python: Parametric 2D Surface Class
import numpy as np
from scipy.interpolate import RectBivariateSpline, bisplev
class ParaSurf(object):
def __init__(self, u, v, xyz, bbox=[-0.25, 1.25, -0.5, 1.5], ku=3, kv=3):
"""Parametric (u,v) surface approximation over a rectangular mesh.
Parameters
----------