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
Solution Comments
Show comments
Loading...
Problem Recent Solvers3
Suggested Problems
-
2817 Solvers
-
The Goldbach Conjecture, Part 2
2413 Solvers
-
287 Solvers
-
284 Solvers
-
Back to basics 12 - Input Arguments
619 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
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
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.
**Found error in solution and corrected; rescored submitted solutions. Cheers!