I thought in your initial joint orientation phase, you have already orient the joints in such a way it will rotate in a particular axis. since it is defined, you should know which axis is pointint perpendicular to your rotating axis? At laest, thats how i understand it. :)
Cheers, JS Neo On 4 March 2013 14:12, Bradon Webb <[email protected]> wrote: > opp Jiet Shern Neo, actually I re-read your post this. I think I > misunderstood your step 3. I think your assuming that I know what the Z > axis is. even though I have it at one point to initially orient the joint, > I allow the user to flip the joint before the angles are calculated. I > would like it if this could work on any joint chains so maybe it is created > from another method where I don't have the z axis. > > I guess I need a method to recalculate the Z axis on the joint? I tried > the matrix but I think I have some problems with that. > > On Sunday, March 3, 2013 7:51:15 PM UTC-6, Jiet Shern Neo wrote: > > Actually the way you resolve the joint orientation can be used to as a > test. Example from your picture, we can see the z-axis always point in a > certain direction defined by your joint orientation code. > > > > 1) Find a mid point, M between joint 1 and joint 3. > > 2) Then get a vector from joint2 to M, maybe called OM > > 3) do a dot product of OM and the z-axis (or any other axis u define) . > > 4) If the dot product is more than 0, the it is the short angle, else > take the long angle. > > > > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
