Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider a system consisting of point masses in 3 D . Write a C code that calculates the center of gravity. The number of masses

Consider a system consisting of point masses in 3D. Write a C code that calculates the center of gravity. The number of masses (N) will be input. Each point-mass has its location (x,y,z) and mass value (kg).(40pts)
The center of gravity can be expressed in vector form as:
R=1MTotali=1Nmiri where MTotal=i=1Nmi
It can also be calculated separately for each coordinate.
x=m1x1+m2x2+m3x3+cdotsm1+m2+m3+cdots,Y=m1y1+m2y2+m3y3+cdotsm1+m2+m3+cdots,Z=m1z+m2z3+m3z3+cdotsm1+m2+m3+cdots
You are supposed to use arrays. The masses and their locations can be stored in arrays. For example, you may use four 1-D arrays for each (mass,x,y,z. Then the center of gravity can be calculated with array operations.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Carlos Coronel, Steven Morris

14th Edition

978-0357673034

More Books

Students also viewed these Databases questions