I want to rotate one end of the mesh object (the vertex a with the object's smallest x-coordinate value) 0 degrees around the x-axis, and the other end of the object (the vertex b with the largest x-coordinate) r degrees.
Any other vertex v of this object inbetween the aforementioned two should automatically be rotated around the x-axis by an angle of:
r * (x_v - x_a) / (x_b - x_a)
In other words, the extent of the rotation should be proportional to the position of the vertex on the axis of rotation. What's the most straightforward way to accomplish this?