This is what I want, someone has written somewhere on the net, but I have never used Quarter before , So how can it not be implemented? I'm sure this would be just a matter of simple equation, but how to implement in the C / C ++ code?
Here: "You can use a bone stored as a vector made of 2 points (head, tail). Since you are rotating it, the head will be fuller and the tail is a The arbitrary will rotate around the axis, this is the work of a quaternion. "
I have the complete position of all the corners of the cylindrical trap, now if I have two vectors / digits V1 (x , Y, z) and v2 (x, y, z) and ending with the bottom, so I just want V2 (top end) Dare to change will be able to change by the corner of the mesh, but at the end of V1 (below) should not change its position.
I have a solid solid cylinder in OpenGL, it is very simple but here I want to implement with the net corner, so updating every head in the top or bottom vectors / points after any change needed.
Thank you.
-
I use 1 conversion instead of matrix + bone
Which axis do you know to rotate with only 2 digits? Representing the bone root is an axis of the axis (red) of the bone, the rotation of the second one is green (axis) and the last is perpendicular to each (blue). Also the size of the bone is required (orange)
-
Mesh is now a tree of bones
The root sub-trap is the starting point and top-level bones are connected through it. Add The bones of the second layer are attached to the bones of the first layer, and so on ... then you have to add an indicator of the last bone / sub-net which is attached to the current bone and the lower level connected to speed up the processing The list of bones can also be added.
-
Drawing / computing
This task is actually just the next tetamatics so that the root object rotates in the desired object state . Take this matrix and store it in a temporary way. Draw / handle root sub-mesh / bone.
Now for the loop, take all its directly related sub-mash / bones and take its matrix and calculate the temporary multiplication and it The order depends on the matrix style (according to the row / column) it gives you the actual matrix for the sub-net / bone.
Therefore, before moving on to the next bone, handle it in the form of root sub-mesh / bone, translate this matrix with blue color to rectangle the axis and all the next bones by the length of the bone.
-
Rotation of joints
Now you have two angles of one or every bone per rotation I have 1 degree independence I use rotation, so I will rotate around the green axis around. Rotation matrix requires a quantitatively simplified quantatorium.
Remember either the new matrix (rotated) or the angle and make the rotated matrix before any use of the bone, but always remember the original matrix to avoid cumulative round errors
[Notes]For more information, Google Direct or further in the NetX problem OpenGL Examples of robot arm can also be found ... you can make any kinetics single-line, linear and angular Activator can change to set
No comments:
Post a Comment