Skip to content

Instantly share code, notes, and snippets.

@rygorous
Created February 23, 2015 05:52
Embed
What would you like to do?
vec3 e0 = vec3(1.0);
float mu = 0.0;
ATA[1][0] = ATA[0][1];
ATA[2][0] = ATA[0][2];
ATA[2][1] = ATA[1][2];
// once to get close to smallest EV, second pass to polish
inverse_iter(ATA, mu, e0);
inverse_iter(ATA, mu, e0);
vec3 e1 = orthogonal(e0);
vec3 e2 = cross(e0,e1);
sigma = vec3(1.0,1.0,max(0.01,sqrt(mu)*0.5));
return mat3(e2,e1,e0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment