Skip to content

Instantly share code, notes, and snippets.

@gsimone
Created April 17, 2021 09:14
Show Gist options
  • Select an option

  • Save gsimone/804ee012adc357681b30c0447d2f5110 to your computer and use it in GitHub Desktop.

Select an option

Save gsimone/804ee012adc357681b30c0447d2f5110 to your computer and use it in GitHub Desktop.
// https://en.m.wikipedia.org/wiki/Rodrigues%27_rotation_formula
vec3 erot(vec3 p, vec3 ax, float ro) {
return mix(dot(p,ax)*ax,p,cos(ro))+sin(ro)*cross(ax,p);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment