I am planning to build in a bending technique into the GPU. Like bending a stick. It doesn’t have to do real physics, but I do want the bending function (to displace the vertices) to have an equal length.
My function will be built out of 2 components:
- The y-position of the stick
- The force against the stick (general, not on a specific place, like wind)
I am bending into the x-direction. I could create some x = y * force formula, but the problem is that this will deform the object in its length.
How can I deform the object, but keep its actual length? How can I constraint my function?
Or in another way:
How can I adjust the power of a polynomial function, while keeping the length over a y-interval? eg. [0,1]
If you want a circular deformation and you should keep the central length unchanged, here you may see the associated formulas: