OpenGL Discussion and Help Forums - Math and Algorithms
https://www.opengl.org/discussion_boards/
Discussion about 3D math and linear algebra that is essential as a background to OpenGL codingenThu, 17 Aug 2017 14:06:18 GMTvBulletin60https://www.opengl.org/discussion_boards/images/misc/rss.pngOpenGL Discussion and Help Forums - Math and Algorithms
https://www.opengl.org/discussion_boards/
<![CDATA[How do I do "soft" bends with a mesh]]>
https://www.opengl.org/discussion_boards/showthread.php/199865-How-do-I-do-soft-bends-with-a-mesh?goto=newpost
Thu, 03 Aug 2017 17:15:16 GMTSo the simple way of animating a mesh is to have one segment rotate into the other. So if it were a tube, you'd see a sharp bend, but how do I do a soft bend such that I'd see a round corner without having to manipulate each point outside of the shader? In my case I'm storing the mesh as a list of points, and a list sets of 3 indexes for each of the faces. Can it be done such that I have two matrix, one being the position of the original position and the other either being next transformation or the product of that transformation?
]]>Math and AlgorithmsMrUNOwenhttps://www.opengl.org/discussion_boards/showthread.php/199865-How-do-I-do-soft-bends-with-a-meshRotate a vector to align with another vector(but keep the same up direction)
https://www.opengl.org/discussion_boards/showthread.php/199822-Rotate-a-vector-to-align-with-another-vector%28but-keep-the-same-up-direction%29?goto=newpost
Thu, 20 Jul 2017 15:06:28 GMTI've been trying to find the best way to calculate the rotation that would align vector A with vector B. I have found solutions but in my case I need the relative up direction to be preserved. Therefore I have been trying to accomplish this with just 2 rotations. First on the Y axis to align the vectors relative to Y, then I calculate the angle between them at this point which would give me the X rotation. However, handling these components of rotation separately doesn't produce the desired effect when I apply both rotations. Applying the Y rotation to the vector turns it perfectly to line up with vector B. But when I apply X rotation, it doesn't rotate properly. I know this is most likely because the X rotation is being applied along the regular X axis and not the vector's current x axis. Any suggestions would be awesome. It's really frustrating me
]]>Math and AlgorithmsLeroy1981https://www.opengl.org/discussion_boards/showthread.php/199822-Rotate-a-vector-to-align-with-another-vector%28but-keep-the-same-up-direction%29