简体   繁体   中英

How much object move and rotate

I created a system which can apply forces on object. So object start rotating when applied force isn't line up with center of mass. And also it move when force is given. But i started thinking, when i push something in space (like a rectangle) in its corner, it will rotate and start moving at the same time. So the energy was distributed to linear movement and rotation speed, but in how ratio? Now i have taht energy transfer to both with 100% efficiency. But if you sum up all energy in level it would be double of the energy given by me. So does someone know this ratio or equation for it?

Thanks

Pythagoras to extract force components

The following diagram will help visualize the forces.

在此处输入图片说明

  1. A , B , C , D , E and M are 2D points {x,y}
  2. Red AB is the force as a vector.
  3. Point M is the center of mass.
  4. Blue BD is the force that moves the object
  5. Green BE is the force that rotates.

Find the angle Ɵ by getting the inverse sin of the cross product of the normalized vectors BM and AB

The rotation force is the length of AB * sin(Ɵ) the correct direction (sign) will come from the algorithm (the cross of BM x AB ) and the transnational force is the length of AB * cos(Ɵ) and is along the line BM

Pseudo code

// 2D Points from diagram
A = {x,y};  
B = {x,y};
M = {x,y};

// get length of vectors AB BM (^ is to the power of)
ABlen = ((B.x - A.x) ^ 2 + (B.y - A.y) ^ 2) ^ 0.5;
BMlen = ((B.x - M.x) ^ 2 + (B.y - M.y) ^ 2) ^ 0.5;


// Create normalized vectors AB and BM
ABnorm = {x : (B.x - A.x) / ABlen, y : (B.y - A.y) / ABLen};
BMnorm = {x : (M.x - B.x) / BMlen, y : (M.y - B.y) / BMLen};

// Get the angle Ɵ
Ɵ = asin(BMnorm.x * ABnorm.y - BMnorm.y * ABnorm.x);

// Rotational Force BE
rotateForce = ABlen * sin(Ɵ);

// Translational Force BD
translateForce = ABlen * cos(Ɵ);

// Translational force as a vector
translateForceVec = {x : ABnorm.x * translateForce, y : ABnorm.y * translateForce};

Newton's 2nd law

The force f is applied via the Newton's second law F = ma to get the acceleration a = F / m

And the rotation force becomes a acceleration of rotation but will depend on the mass distribution of the object.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM