Formula to calculate rotation

In summary, the conversation discusses finding a formula to calculate the rotation of a set of red points based on the rotation of a set of green points. The middle red point should be at 50% between the top and bottom green points, while the other red points should be biased towards their closest green point. The conversation also mentions the limitations of using Autodesk Maya's math nodes and suggests using basic math functions to compute a weighted average.
  • #1
simchris111
2
0
I'm working with 3D applications, and I'm trying to figure out how to calculate the rotation of x number of points between two points.

I've made a video to illustrate what I mean:
https://www.youtube.com/watch?v=CmIk8I8itrQ

So the thing is, I need to find some kind of formula that calculates the rotation of the red points based on the rotation of the green ones. The middle red point should always be 50% between the top and the low point, but the red points below and above the middle should bias the rotation towards their closest green point. In this case I have 5 red points, it would be awesome if the formula also worked on more points.


So the formula has to work only from knowing the number of red points, and the rotation of the upper and lower green point.


I'm sorry if this is stupidly simple, but I can't seem to wrap my head around it.
 
Mathematics news on Phys.org
  • #2
The middle red point seems to be just the average of the two green points, so that's easy. As for the other red points, unless there's some complexity I'm missing, you could probably just take them to be the weighted average of the rotation of the middle red point and the nearest green point; the weight will determine how biased it is towards the green point.
 
  • #3
Number Nine said:
The middle red point seems to be just the average of the two green points, so that's easy. As for the other red points, unless there's some complexity I'm missing, you could probably just take them to be the weighted average of the rotation of the middle red point and the nearest green point; the weight will determine how biased it is towards the green point.
Thanks for your reply :)

That could work, however I'm limited to my 3D-application's native math-nodes (Autodesk Maya), and it doesn't seem to have a node that can do a weighted average operation. It has an average node, but not a weighted average node.

I'm sorry I forgot to say that in the first post, the math-functionality I can use is limited to these:
Plus, Minus, Avarage, Multiply, Divide, Power, Compose Matrix, Decompose Matrix, Transpose Matrix, Inverse Matrix, Vector Product
 
  • #4
If you can add, multiply and divide, you can compute a weighted average.
 
  • #5


I understand your frustration in trying to figure out the rotation of multiple points in 3D space. This type of problem is commonly encountered in computer graphics and animation, and there are several mathematical approaches that can be used to solve it. One possible solution is to use quaternions, which are a mathematical tool used to represent rotations in 3D space.

To calculate the rotation of multiple points between two given points, we can first define a quaternion for each of the green points using their respective rotations. Then, we can interpolate between these quaternions to find the rotation for each of the red points. This can be done using a technique called spherical linear interpolation, or slerp for short.

Slerp works by finding the shortest path between two quaternions and interpolating along this path. In your case, the middle red point should always be halfway between the top and bottom green points, so the slerp interpolation would be straightforward. For the red points above and below the middle point, the slerp interpolation would be biased towards the closest green point, as you mentioned.

In summary, the formula to calculate the rotation of x number of points between two points would involve using quaternions and slerp interpolation. If you are not familiar with quaternions or slerp, I suggest doing some research or consulting with a mathematician or computer graphics expert for further assistance. I hope this helps in your quest to solve this problem.
 

Related to Formula to calculate rotation

1. What is the formula for calculating rotation?

The formula for calculating rotation is θ = s/r, where θ is the angle of rotation, s is the arc length, and r is the radius.

2. How is rotation measured?

Rotation is measured in degrees (°) or radians (rad). Degrees are more commonly used in everyday life, while radians are used more in advanced mathematics and physics.

3. Can the formula for calculating rotation be used for any shape or object?

Yes, the formula for calculating rotation can be used for any shape or object as long as it follows a circular or curved path. It is commonly used in physics, engineering, and geometry to calculate the rotation of objects such as wheels, gears, and planets.

4. Is there a difference between clockwise and counterclockwise rotation?

Yes, there is a difference between clockwise and counterclockwise rotation. Clockwise rotation is when an object turns in the same direction as the hands of a clock, while counterclockwise rotation is when an object turns in the opposite direction.

5. How do I use the formula to calculate rotation in a real-life situation?

To use the formula for calculating rotation in a real-life situation, you first need to identify the arc length and radius of the object's path of rotation. Then, plug those values into the formula θ = s/r and solve for θ to determine the angle of rotation.

Similar threads

Replies
2
Views
2K
Replies
6
Views
1K
  • General Math
2
Replies
45
Views
3K
Replies
7
Views
1K
Replies
4
Views
2K
  • General Math
Replies
3
Views
2K
Replies
5
Views
1K
  • Mechanical Engineering
Replies
3
Views
1K
Back
Top