My tangent generating method was horribly broken.