Matthew Arcus (@matthewarcus) 's Twitter Profile
Matthew Arcus

@matthewarcus

ID: 494235505

calendar_today16-02-2012 17:35:35

2,2K Tweet

493 Takipçi

97 Takip Edilen

Matthew Arcus (@matthewarcus) 's Twitter Profile Photo

vec4 sphereFromFourPoints(vec3 a, vec3 b, vec3 c, vec3 d) { a -= d; b -= d; c -= d; a /= dot(a,a); b /= dot(b,b); c /= dot(c,c); vec3 n = cross(c-a,c-b); vec3 p = dot(a,n)/dot(n,n)*n; p /= dot(p,p); vec3 centre = 0.5*p; return vec4(centre+d,length(centre)); }