def rotate(self, l, u):
        """rotate l radians around axis u"""
        cl = math.cos(l)
        sl = math.sin(l)
        x = (cl + u.x * u.x * (1 - cl)) * self.x + (u.x * u.y * (1 - cl) - u.z * sl) * self.y + (
        u.x * u.z * (1 - cl) + u.y * sl) * self.z
        y = (u.y * u.x * (1 - cl) + u.z * sl) * self.x + (cl + u.y * u.y * (1 - cl)) * self.y + (
        u.y * u.z * (1 - cl) - u.x * sl) * self.z
        z = (u.z * u.x * (1 - cl) - u.y * sl) * self.x + (u.z * u.y * (1 - cl) + u.x * sl) * self.y + (
        cl + u.z * u.z * (1 - cl)) * self.z
        self.x, self.y, self.z = x, y, z
        return self
def rotate ( self , l , u ) : cl = math . cos ( l ) sl = math . sin ( l ) x = ( cl + u . x * u . x * ( 1 - cl ) ) * self . x + ( u . x * u . y * ( 1 - cl ) - u . z * sl ) * self . y + ( u . x * u . z * ( 1 - cl ) + u . y * sl ) * self . z y = ( u . y * u . x * ( 1 - cl ) + u . z * sl ) * self . x + ( cl + u . y * u . y * ( 1 - cl ) ) * self . y + ( u . y * u . z * ( 1 - cl ) - u . x * sl ) * self . z z = ( u . z * u . x * ( 1 - cl ) - u . y * sl ) * self . x + ( u . z * u . y * ( 1 - cl ) + u . x * sl ) * self . y + ( cl + u . z * u . z * ( 1 - cl ) ) * self . z self . x , self . y , self . z = x , y , z return self
rotate l radians around axis u