I did this way: - calculate the angle between vector1 and vector2 - rotate around the axis defined by vector1.cross(vector2)
v_cross = vect1.cross(vect2) v_dot = vect1.dot(vect2) if v_dot == 0: v_angle = pi/2. else: v_angle =acos( v_dot / ( vect2.magnitude()*vect_base.magnitude() ) ) R = N.orient_new_axis('R', v_angle,v_cross) Il giorno sabato 29 settembre 2018 10:58:22 UTC+2, Andrea Danzi ha scritto: > > I need to instantiate a BodyOrienter that rotates the axis of my "Body" > parallel to a given arbitrary vector. > How can I calculate the three successive angles required to rotate the > coordinate system parallel to the given vector? > --- > Andrea > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/082f4048-691d-4b29-83cb-97c3e03300b1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.