Problem 54054. Determine Center of Mass for a Set of Floating Spheres
Each sphere has a position determined by theta (x,y plane angle) and tau (elevation angle) as well as L, the distance of the center of the sphere from the origin. Each sphere also has a radius, r, and a density of rho.
These values are defined in a single input matrix: sceneAttributes
The output should be a 1x3 matrix defining the CoM in cartesian 3D space (x, y, z)
All angles are in degrees, all distances are in meters, and density is in kg/m^3
Assume density and lengths are always positive
Solution Stats
Problem Comments
-
3 Comments
William
on 4 Mar 2022
My calculation does not agree with test #4. Also, it is odd (but unimportant) that the values for theta go from -360 to +360 rather than -180 to +180
Michael Sisco
on 7 Mar 2022
Your result for test #4 is clearly wrong. Simply add up the masses with positive elevation and the masses with negative elevation, and you'll see that the CoM must be below the xy plane.
Jakeb Chouinard
on 7 Sep 2022
**Found error in solution and corrected; rescored submitted solutions. Cheers!
Solution Comments
Show commentsProblem Recent Solvers3
Suggested Problems
-
2445 Solvers
-
600 Solvers
-
413 Solvers
-
68 Solvers
-
1004 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!