Question: (In C++ if possible) 8A. Create a class asteroid (or roid for short) and randomly place them in 3d space. Each has an id number,

(In C++ if possible)

8A. Create a class asteroid (or roid for short) and randomly place them in 3d space. Each has an id number, a mass, and an array of size three that contains the %mass for three important natural resources, these percentages MUST sum to less than 100, and usually are far less, the rest of the mass is considered waste. The average sum is 21% for all asteroids. You can consider each then to have a mean of 21/3 or 7% with a standard deviation of 4. No percentage can be negative. These asteroids lay in a ring of radius 50 from a center of rotation (our star). Their radius from the ring has a mean of 8 and a standard deviation of 5. They are uniformly distributed along the ring (0 to 2PI) AND from the ring. No two asteroids can exist in the same location as any other. Allow the user to enter N, the number of asteroids, generate all the values, display the data to the screen, then create a 3d gnuplot of this ring of asteroids.

(Anon who keeps spamming wrong/incomplete answers, please stop.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!