Skip to content

Instantly share code, notes, and snippets.

@mattjj
mattjj / cholupdate.py
Last active December 13, 2023 04:00
cholesky updates and downdates
from __future__ import division
import numpy as np
from numpy.random import randn
from scipy.linalg.blas import drot, drotg
# references for updates:
# - Golub and van Loan (4th ed.) Section 6.5.4
# - http://mathoverflow.net/questions/30162/is-there-a-way-to-simplify-block-cholesky-decomposition-if-you-already-have-deco
#
# references for downdates:
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active May 8, 2024 18:44
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);