wealthychef opened this issue on Jul 07, 2014 · 3 posts
wealthychef posted Tue, 08 July 2014 at 8:56 PM
Found a solution thanks to http://mcngraphics.com/thelab/blender/connect/
def FindRotation(ep1, ep2):
ep1 = numpy.array(ep1)
ep2 = numpy.array(ep2)
center = ep1 + 0.5 * (ep2 - ep1)
ep2new = ep2 - center
r = numpy.linalg.norm(ep2new) # radius of sphere
theta = math.acos(ep2new[2]/r)
phi = math.atan2( ep2new[1], ep2new[0])
return (0,theta, phi)