Skip to content

Instantly share code, notes, and snippets.

View jearmstrong21's full-sized avatar

Jack Armstrong jearmstrong21

View GitHub Profile
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active May 5, 2024 09:04
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);
@atduskgreg
atduskgreg / rotation_around_a_point.pde
Created December 24, 2011 05:22
Controlling the center of rotation in Processing
// Rotation Around a Point
// ***********************
// To acheive rotation around a given point
// - translate to that point
// - rotate
// - then translate back
// (note: in Processing this last step is implicit
// since draw() resets all transformations
// each time it runs.)